diff options
| author | Fog <christhecoolist@gmail.com> | 2014-10-13 01:52:54 -0400 |
|---|---|---|
| committer | Fog <christhecoolist@gmail.com> | 2014-10-15 23:16:48 -0400 |
| commit | 108087bb68c7cda519d742fd6522ba6d8f158182 (patch) | |
| tree | b49294fdb46a09b14eb7d335c3afb0d564b23fea /Source/Core/AudioCommon/WaveFile.cpp | |
| parent | 9551650c42d8e256043a5783ba3b7b3aa18e350d (diff) | |
Flipped Wave File Channels
This change was done because with the previous method of dumping audio, the mixer would handle switching the RL being emitted by the DSP to LR, and thus would provide the proper channel orientation. Because we're now dumping directly from PushSamples() and PushStreamingSamples(), it was writing the right channel to the left channel of the wave file and vice versa.
Diffstat (limited to 'Source/Core/AudioCommon/WaveFile.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/WaveFile.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp index efbc512276..88a6a7e46a 100644 --- a/Source/Core/AudioCommon/WaveFile.cpp +++ b/Source/Core/AudioCommon/WaveFile.cpp @@ -137,8 +137,12 @@ void WaveFileWriter::AddStereoSamplesBE(const short *sample_data, u32 count) return; } - for (u32 i = 0; i < count * 2; i++) - conv_buffer[i] = Common::swap16((u16)sample_data[i]); + for (u32 i = 0; i < count; 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); audio_size += count * 4; |
