mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Remove AddStereoSample function
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user