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

Unified Diff: media/audio/audio_output_device_unittest.cc

Issue 293673004: Remove unused RenderIO() interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 7 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/audio/audio_output_device.cc ('k') | media/base/audio_renderer_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_device_unittest.cc
diff --git a/media/audio/audio_output_device_unittest.cc b/media/audio/audio_output_device_unittest.cc
index 7aca2627745f2f7c7e039fecbbc1493bd6230ad8..92d94250b4aa14e09b20424993433bdb0b3618e6 100644
--- a/media/audio/audio_output_device_unittest.cc
+++ b/media/audio/audio_output_device_unittest.cc
@@ -37,9 +37,6 @@ class MockRenderCallback : public AudioRendererSink::RenderCallback {
virtual ~MockRenderCallback() {}
MOCK_METHOD2(Render, int(AudioBus* dest, int audio_delay_milliseconds));
- MOCK_METHOD3(RenderIO, void(AudioBus* source,
- AudioBus* dest,
- int audio_delay_milliseconds));
MOCK_METHOD0(OnRenderError, void());
};
@@ -114,8 +111,6 @@ class AudioOutputDeviceTest
private:
int CalculateMemorySize();
- const bool synchronized_io_;
- const int input_channels_;
SharedMemory shared_memory_;
CancelableSyncSocket browser_socket_;
CancelableSyncSocket renderer_socket_;
@@ -124,24 +119,14 @@ class AudioOutputDeviceTest
};
int AudioOutputDeviceTest::CalculateMemorySize() {
- // Calculate output and input memory size.
- int output_memory_size =
- AudioBus::CalculateMemorySize(default_audio_parameters_);
-
- int frames = default_audio_parameters_.frames_per_buffer();
- int input_memory_size =
- AudioBus::CalculateMemorySize(input_channels_, frames);
-
- return output_memory_size + input_memory_size;
+ // Calculate output memory size.
+ return AudioBus::CalculateMemorySize(default_audio_parameters_);
}
-AudioOutputDeviceTest::AudioOutputDeviceTest()
- : synchronized_io_(GetParam()),
- input_channels_(synchronized_io_ ? 2 : 0) {
+AudioOutputDeviceTest::AudioOutputDeviceTest() {
default_audio_parameters_.Reset(
AudioParameters::AUDIO_PCM_LINEAR,
- CHANNEL_LAYOUT_STEREO, 2, input_channels_,
- 48000, 16, 1024);
+ CHANNEL_LAYOUT_STEREO, 2, 0, 48000, 16, 1024);
audio_output_ipc_ = new MockAudioOutputIPC();
audio_device_ = new AudioOutputDevice(
@@ -207,18 +192,11 @@ void AudioOutputDeviceTest::ExpectRenderCallback() {
// writing the interleaved audio data into the shared memory section.
// So, for the sake of this test, we consider the call to Render a sign
// of success and quit the loop.
- if (synchronized_io_) {
- // For synchronized I/O, we expect RenderIO().
- EXPECT_CALL(callback_, RenderIO(_, _, _))
- .WillOnce(QuitLoop(io_loop_.message_loop_proxy()));
- } else {
- // For output only we expect Render().
- const int kNumberOfFramesToProcess = 0;
- EXPECT_CALL(callback_, Render(_, _))
- .WillOnce(DoAll(
- QuitLoop(io_loop_.message_loop_proxy()),
- Return(kNumberOfFramesToProcess)));
- }
+ const int kNumberOfFramesToProcess = 0;
+ EXPECT_CALL(callback_, Render(_, _))
+ .WillOnce(DoAll(
+ QuitLoop(io_loop_.message_loop_proxy()),
+ Return(kNumberOfFramesToProcess)));
}
void AudioOutputDeviceTest::WaitUntilRenderCallback() {
@@ -280,6 +258,5 @@ TEST_P(AudioOutputDeviceTest, CreateStream) {
}
INSTANTIATE_TEST_CASE_P(Render, AudioOutputDeviceTest, Values(false));
-INSTANTIATE_TEST_CASE_P(RenderIO, AudioOutputDeviceTest, Values(true));
} // namespace media.
« no previous file with comments | « media/audio/audio_output_device.cc ('k') | media/base/audio_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698