Merge pull request #1276 from RisingFog/flipped-audio-dump

Flipped Wave File Channels for Audio Dumping
This commit is contained in:
skidau 2014-10-18 13:15:23 +11:00
commit c80ba8704c
1 changed files with 6 additions and 2 deletions

View File

@ -137,8 +137,12 @@ void WaveFileWriter::AddStereoSamplesBE(const short *sample_data, u32 count)
return; return;
} }
for (u32 i = 0; i < count * 2; i++) for (u32 i = 0; i < count; i++)
conv_buffer[i] = Common::swap16((u16)sample_data[i]); {
//Flip the audio channels from RL to LR
conv_buffer[2 * i] = Common::swap16((u16)sample_data[2 * i + 1]);
conv_buffer[2 * i + 1] = Common::swap16((u16)sample_data[2 * i]);
}
file.WriteBytes(conv_buffer, count * 4); file.WriteBytes(conv_buffer, count * 4);
audio_size += count * 4; audio_size += count * 4;