Indentation issues

This commit is contained in:
bsongis
2014-02-28 23:18:21 +01:00
parent 3ab86c90a6
commit 09e427d73e
+13 -8
View File
@@ -303,7 +303,7 @@ void getPhaseAudioFile(char * filename, int index, unsigned int event)
char * tmp = strcat_phasename(str, index); char * tmp = strcat_phasename(str, index);
strcpy(tmp, suffixes[event]); strcpy(tmp, suffixes[event]);
strcat(tmp, SOUNDS_EXT); strcat(tmp, SOUNDS_EXT);
} }
void getSwitchAudioFile(char * filename, int index) void getSwitchAudioFile(char * filename, int index)
{ {
@@ -314,7 +314,7 @@ void getSwitchAudioFile(char * filename, int index)
if (*str == '\300') { if (*str == '\300') {
strcpy(str, "-up"); strcpy(str, "-up");
str += 3; str += 3;
} }
else if (*str == '-') { else if (*str == '-') {
strcpy(str, "-mid"); strcpy(str, "-mid");
str += 4; str += 4;
@@ -387,7 +387,7 @@ void referenceModelAudioFiles()
sdAvailableSwitchAudioFiles |= MASK_SWITCH_AUDIO_FILE(i); sdAvailableSwitchAudioFiles |= MASK_SWITCH_AUDIO_FILE(i);
found = true; found = true;
} }
} }
// Logical Switches Audio Files <switchname>-[on|off].wav // Logical Switches Audio Files <switchname>-[on|off].wav
for (int i=0; i<NUM_CSW && !found; i++) { for (int i=0; i<NUM_CSW && !found; i++) {
@@ -589,20 +589,25 @@ int WavContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade)
if (state.codec == CODEC_ID_PCM_S16LE) { if (state.codec == CODEC_ID_PCM_S16LE) {
read /= 2; read /= 2;
for (uint32_t i=0; i<read; i++) { for (uint32_t i=0; i<read; i++) {
for (uint8_t j=0; j<state.resampleRatio; j++) for (uint8_t j=0; j<state.resampleRatio; j++) {
mixSample(samples++, ((int16_t *)wavBuffer)[i], fade+2-volume); mixSample(samples++, ((int16_t *)wavBuffer)[i], fade+2-volume);
} }
} }
}
else if (state.codec == CODEC_ID_PCM_ALAW) { else if (state.codec == CODEC_ID_PCM_ALAW) {
for (uint32_t i=0; i<read; i++) for (uint32_t i=0; i<read; i++) {
for (uint8_t j=0; j<state.resampleRatio; j++) for (uint8_t j=0; j<state.resampleRatio; j++) {
mixSample(samples++, alawTable[wavBuffer[i]], fade+2-volume); mixSample(samples++, alawTable[wavBuffer[i]], fade+2-volume);
} }
}
}
else if (state.codec == CODEC_ID_PCM_MULAW) { else if (state.codec == CODEC_ID_PCM_MULAW) {
for (uint32_t i=0; i<read; i++) for (uint32_t i=0; i<read; i++) {
for (uint8_t j=0; j<state.resampleRatio; j++) for (uint8_t j=0; j<state.resampleRatio; j++) {
mixSample(samples++, ulawTable[wavBuffer[i]], fade+2-volume); mixSample(samples++, ulawTable[wavBuffer[i]], fade+2-volume);
} }
}
}
return samples - buffer->data; return samples - buffer->data;
} }