Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: media/filters/audio_renderer_algorithm_unittest.cc

Issue 212103013: Add channel_count parameter back to AudioBuffer creation methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mstr
Patch Set: fix unit test Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/test_helpers.cc ('k') | media/filters/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_algorithm_unittest.cc
diff --git a/media/filters/audio_renderer_algorithm_unittest.cc b/media/filters/audio_renderer_algorithm_unittest.cc
index bde07a23f8439e7900ee2b610dd1fbba8d4d4fce..13fa28b2d0282ab09d8f3354395ad45482e80bf5 100644
--- a/media/filters/audio_renderer_algorithm_unittest.cc
+++ b/media/filters/audio_renderer_algorithm_unittest.cc
@@ -105,34 +105,40 @@ class AudioRendererAlgorithmTest : public testing::Test {
while (!algorithm_.IsQueueFull()) {
switch (sample_format_) {
case kSampleFormatU8:
- buffer = MakeAudioBuffer<uint8>(sample_format_,
- channel_layout_,
- samples_per_second_,
- 1,
- 1,
- kFrameSize,
- kNoTimestamp(),
- kNoTimestamp());
+ buffer = MakeAudioBuffer<uint8>(
+ sample_format_,
+ channel_layout_,
+ ChannelLayoutToChannelCount(channel_layout_),
+ samples_per_second_,
+ 1,
+ 1,
+ kFrameSize,
+ kNoTimestamp(),
+ kNoTimestamp());
break;
case kSampleFormatS16:
- buffer = MakeAudioBuffer<int16>(sample_format_,
- channel_layout_,
- samples_per_second_,
- 1,
- 1,
- kFrameSize,
- kNoTimestamp(),
- kNoTimestamp());
+ buffer = MakeAudioBuffer<int16>(
+ sample_format_,
+ channel_layout_,
+ ChannelLayoutToChannelCount(channel_layout_),
+ samples_per_second_,
+ 1,
+ 1,
+ kFrameSize,
+ kNoTimestamp(),
+ kNoTimestamp());
break;
case kSampleFormatS32:
- buffer = MakeAudioBuffer<int32>(sample_format_,
- channel_layout_,
- samples_per_second_,
- 1,
- 1,
- kFrameSize,
- kNoTimestamp(),
- kNoTimestamp());
+ buffer = MakeAudioBuffer<int32>(
+ sample_format_,
+ channel_layout_,
+ ChannelLayoutToChannelCount(channel_layout_),
+ samples_per_second_,
+ 1,
+ 1,
+ kFrameSize,
+ kNoTimestamp(),
+ kNoTimestamp());
break;
default:
NOTREACHED() << "Unrecognized format " << sample_format_;
@@ -232,7 +238,7 @@ class AudioRendererAlgorithmTest : public testing::Test {
void WsolaTest(float playback_rate) {
const int kSampleRateHz = 48000;
- const media::ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO;
+ const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO;
const int kBytesPerSample = 2;
const int kNumFrames = kSampleRateHz / 100; // 10 milliseconds.
@@ -252,6 +258,7 @@ class AudioRendererAlgorithmTest : public testing::Test {
scoped_refptr<AudioBuffer> input =
AudioBuffer::CreateBuffer(kSampleFormatPlanarF32,
kChannelLayout,
+ channels_,
kSampleRateHz,
kPulseWidthSamples);
« no previous file with comments | « media/base/test_helpers.cc ('k') | media/filters/audio_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698