OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "media/audio/audio_output_dispatcher_impl.h" | 10 #include "media/audio/audio_output_dispatcher_impl.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 MOCK_METHOD0(IsRecordingInProcess, bool()); | 110 MOCK_METHOD0(IsRecordingInProcess, bool()); |
111 | 111 |
112 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*( | 112 MOCK_METHOD1(MakeLinearOutputStream, AudioOutputStream*( |
113 const AudioParameters& params)); | 113 const AudioParameters& params)); |
114 MOCK_METHOD1(MakeLowLatencyOutputStream, AudioOutputStream*( | 114 MOCK_METHOD1(MakeLowLatencyOutputStream, AudioOutputStream*( |
115 const AudioParameters& params)); | 115 const AudioParameters& params)); |
116 MOCK_METHOD2(MakeLinearInputStream, AudioInputStream*( | 116 MOCK_METHOD2(MakeLinearInputStream, AudioInputStream*( |
117 const AudioParameters& params, const std::string& device_id)); | 117 const AudioParameters& params, const std::string& device_id)); |
118 MOCK_METHOD2(MakeLowLatencyInputStream, AudioInputStream*( | 118 MOCK_METHOD2(MakeLowLatencyInputStream, AudioInputStream*( |
119 const AudioParameters& params, const std::string& device_id)); | 119 const AudioParameters& params, const std::string& device_id)); |
| 120 MOCK_METHOD1(GetPreferredOutputStreamParameters, AudioParameters( |
| 121 const AudioParameters& params)); |
120 }; | 122 }; |
121 | 123 |
122 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { | 124 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { |
123 public: | 125 public: |
124 int OnMoreData(AudioBus* audio_bus, AudioBuffersState buffers_state) { | 126 int OnMoreData(AudioBus* audio_bus, AudioBuffersState buffers_state) { |
125 audio_bus->Zero(); | 127 audio_bus->Zero(); |
126 return audio_bus->frames(); | 128 return audio_bus->frames(); |
127 } | 129 } |
128 int OnMoreIOData(AudioBus* source, AudioBus* dest, | 130 int OnMoreIOData(AudioBus* source, AudioBus* dest, |
129 AudioBuffersState buffers_state) { | 131 AudioBuffersState buffers_state) { |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 WaitForCloseTimer(kTestCloseDelayMs); | 727 WaitForCloseTimer(kTestCloseDelayMs); |
726 EXPECT_TRUE(stream1.stop_called()); | 728 EXPECT_TRUE(stream1.stop_called()); |
727 EXPECT_TRUE(stream1.start_called()); | 729 EXPECT_TRUE(stream1.start_called()); |
728 EXPECT_TRUE(stream2.stop_called()); | 730 EXPECT_TRUE(stream2.stop_called()); |
729 EXPECT_TRUE(stream2.start_called()); | 731 EXPECT_TRUE(stream2.start_called()); |
730 EXPECT_FALSE(stream3.stop_called()); | 732 EXPECT_FALSE(stream3.stop_called()); |
731 EXPECT_FALSE(stream3.start_called()); | 733 EXPECT_FALSE(stream3.start_called()); |
732 } | 734 } |
733 | 735 |
734 } // namespace media | 736 } // namespace media |
OLD | NEW |