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

Side by Side Diff: media/base/audio_renderer_mixer_input_unittest.cc

Issue 2004283002: AudioConverter: Express delay in frames rather than msec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed files & removed rounding Created 4 years, 6 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
« no previous file with comments | « media/base/audio_renderer_mixer_input.cc ('k') | media/base/fake_audio_render_callback.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 #include <memory> 6 #include <memory>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 mixers_[idx].reset(new AudioRendererMixer(audio_parameters_, sink)); 73 mixers_[idx].reset(new AudioRendererMixer(audio_parameters_, sink));
74 } 74 }
75 EXPECT_CALL(*this, RemoveMixer(testing::_, device_id, testing::_)); 75 EXPECT_CALL(*this, RemoveMixer(testing::_, device_id, testing::_));
76 76
77 if (device_status) 77 if (device_status)
78 *device_status = OUTPUT_DEVICE_STATUS_OK; 78 *device_status = OUTPUT_DEVICE_STATUS_OK;
79 return mixers_[idx].get(); 79 return mixers_[idx].get();
80 } 80 }
81 81
82 double ProvideInput() { 82 double ProvideInput() {
83 return mixer_input_->ProvideInput(audio_bus_.get(), base::TimeDelta()); 83 return mixer_input_->ProvideInput(audio_bus_.get(), 0);
84 } 84 }
85 85
86 MOCK_METHOD3(RemoveMixer, 86 MOCK_METHOD3(RemoveMixer,
87 void(const AudioParameters&, 87 void(const AudioParameters&,
88 const std::string&, 88 const std::string&,
89 const url::Origin&)); 89 const url::Origin&));
90 90
91 MOCK_METHOD1(SwitchCallbackCalled, void(OutputDeviceStatus)); 91 MOCK_METHOD1(SwitchCallbackCalled, void(OutputDeviceStatus));
92 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) { 92 void SwitchCallback(base::RunLoop* loop, OutputDeviceStatus result) {
93 SwitchCallbackCalled(result); 93 SwitchCallbackCalled(result);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 EXPECT_CALL(*this, SwitchCallbackCalled(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL)); 271 EXPECT_CALL(*this, SwitchCallbackCalled(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL));
272 mixer_input_->SwitchOutputDevice( 272 mixer_input_->SwitchOutputDevice(
273 kDefaultDeviceId, url::Origin(), 273 kDefaultDeviceId, url::Origin(),
274 base::Bind(&AudioRendererMixerInputTest::SwitchCallback, 274 base::Bind(&AudioRendererMixerInputTest::SwitchCallback,
275 base::Unretained(this), &run_loop)); 275 base::Unretained(this), &run_loop));
276 mixer_input_->Stop(); 276 mixer_input_->Stop();
277 run_loop.Run(); 277 run_loop.Run();
278 } 278 }
279 279
280 } // namespace media 280 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_renderer_mixer_input.cc ('k') | media/base/fake_audio_render_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698