diff options
| author | Chris Burgener <christhecoolist@gmail.com> | 2016-06-30 20:43:59 -0400 |
|---|---|---|
| committer | Chris Burgener <christhecoolist@gmail.com> | 2016-07-01 00:59:25 -0400 |
| commit | 76abf1f727f7b17da49e99f1ea3d40d77a2eaabf (patch) | |
| tree | 2d8872ce1f30d1f8816ece684ea40393cb69b5cf /Source/Core/AudioCommon/WaveFile.cpp | |
| parent | 488847099fb076ace9bb0f39c9c504df8e51536f (diff) | |
Remove AddStereoSample function
Diffstat (limited to 'Source/Core/AudioCommon/WaveFile.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/WaveFile.cpp | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp index 3fb073f777..5634bd4157 100644 --- a/Source/Core/AudioCommon/WaveFile.cpp +++ b/Source/Core/AudioCommon/WaveFile.cpp @@ -94,31 +94,6 @@ void WaveFileWriter::Write4(const char* ptr) file.WriteBytes(ptr, 4); } -void WaveFileWriter::AddStereoSamples(const short* sample_data, u32 count, int sample_rate) -{ - if (!file) - PanicAlertT("WaveFileWriter - file not open."); - - if (skip_silence) - { - bool all_zero = true; - - for (u32 i = 0; i < count * 2; i++) - { - if (sample_data[i]) - all_zero = false; - } - - if (all_zero) - return; - } - - CheckSampleRate(sample_rate); - - file.WriteBytes(sample_data, count * 4); - audio_size += count * 4; -} - void WaveFileWriter::AddStereoSamplesBE(const short* sample_data, u32 count, int sample_rate) { if (!file) @@ -148,14 +123,6 @@ void WaveFileWriter::AddStereoSamplesBE(const short* sample_data, u32 count, int conv_buffer[2 * i + 1] = Common::swap16((u16)sample_data[2 * i]); } - CheckSampleRate(sample_rate); - - file.WriteBytes(conv_buffer.data(), count * 4); - audio_size += count * 4; -} - -void WaveFileWriter::CheckSampleRate(int sample_rate) -{ if (sample_rate != current_sample_rate) { Stop(); @@ -165,4 +132,7 @@ void WaveFileWriter::CheckSampleRate(int sample_rate) Start(filename.str(), sample_rate); current_sample_rate = sample_rate; } + + file.WriteBytes(conv_buffer.data(), count * 4); + audio_size += count * 4; } |
