diff options
Diffstat (limited to 'media/audio/audio_util.cc')
-rw-r--r-- | media/audio/audio_util.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/media/audio/audio_util.cc b/media/audio/audio_util.cc index 9f4e6da..e3e94cd 100644 --- a/media/audio/audio_util.cc +++ b/media/audio/audio_util.cc @@ -59,9 +59,9 @@ static int AddChannel(int val, template<class Format, class Fixed, int min_value, int max_value, int bias> static void FoldChannels(Format* buf_out, - int sample_count, - const float volume, - int channels) { + int sample_count, + const float volume, + int channels) { Format* buf_in = buf_out; const int center_volume = static_cast<int>(volume * 0.707f * 65536); const int fixed_volume = static_cast<int>(volume * 65536); @@ -100,7 +100,7 @@ bool AdjustVolume(void* buf, memset(buf, 0, buflen); return true; } - if (channels > 0 && channels <= 6 && bytes_per_sample > 0) { + if (channels > 0 && channels <= 8 && bytes_per_sample > 0) { int sample_count = buflen / bytes_per_sample; const int fixed_volume = static_cast<int>(volume * 65536); if (bytes_per_sample == 1) { @@ -130,7 +130,7 @@ bool FoldChannels(void* buf, float volume) { DCHECK(buf); DCHECK(volume >= 0.0f && volume <= 1.0f); - if (channels >= 5 && channels <= 6 && bytes_per_sample > 0) { + if (channels > 2 && channels <= 8 && bytes_per_sample > 0) { int sample_count = buflen / (channels * bytes_per_sample); if (bytes_per_sample == 1) { FoldChannels<uint8, int32, -128, 127, 128>( |