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

Side by Side Diff: media/audio/audio_output_proxy_unittest.cc

Issue 10830268: Allow audio system to handle synchronized low-latency audio I/O (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "media/audio/audio_output_dispatcher_impl.h" 10 #include "media/audio/audio_output_dispatcher_impl.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 MOCK_METHOD0(GetMessageLoop, scoped_refptr<base::MessageLoopProxy>()); 74 MOCK_METHOD0(GetMessageLoop, scoped_refptr<base::MessageLoopProxy>());
75 MOCK_METHOD1(GetAudioInputDeviceNames, void( 75 MOCK_METHOD1(GetAudioInputDeviceNames, void(
76 media::AudioDeviceNames* device_name)); 76 media::AudioDeviceNames* device_name));
77 MOCK_METHOD0(IsRecordingInProcess, bool()); 77 MOCK_METHOD0(IsRecordingInProcess, bool());
78 }; 78 };
79 79
80 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { 80 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback {
81 public: 81 public:
82 MOCK_METHOD2(OnMoreData, int(AudioBus* audio_bus, 82 MOCK_METHOD2(OnMoreData, int(AudioBus* audio_bus,
83 AudioBuffersState buffers_state)); 83 AudioBuffersState buffers_state));
84 MOCK_METHOD3(OnMoreIOData, int(AudioBus* source,
85 AudioBus* dest,
86 AudioBuffersState buffers_state));
84 MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code)); 87 MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code));
85 }; 88 };
86 89
87 } // namespace 90 } // namespace
88 91
89 namespace media { 92 namespace media {
90 93
91 class AudioOutputProxyTest : public testing::Test { 94 class AudioOutputProxyTest : public testing::Test {
92 protected: 95 protected:
93 virtual void SetUp() { 96 virtual void SetUp() {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 proxy2->Start(&callback_); 611 proxy2->Start(&callback_);
609 612
610 Mock::VerifyAndClear(&callback_); 613 Mock::VerifyAndClear(&callback_);
611 614
612 proxy2->Close(); 615 proxy2->Close();
613 WaitForCloseTimer(kTestCloseDelayMs); 616 WaitForCloseTimer(kTestCloseDelayMs);
614 } 617 }
615 #endif 618 #endif
616 619
617 } // namespace media 620 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698