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

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

Issue 2567143002: media::SilentSinkSuspender should simulate |delay| and |delay_timestamp| (Closed)
Patch Set: build fix content_unittets & media_blink_unittsests Created 3 years, 11 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_hash_unittest.cc ('k') | media/base/audio_renderer_mixer_unittest.cc » ('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 25 matching lines...) Expand all
36 36
37 class AudioRendererMixerInputTest : public testing::Test, 37 class AudioRendererMixerInputTest : public testing::Test,
38 AudioRendererMixerPool { 38 AudioRendererMixerPool {
39 public: 39 public:
40 AudioRendererMixerInputTest() { 40 AudioRendererMixerInputTest() {
41 audio_parameters_ = AudioParameters( 41 audio_parameters_ = AudioParameters(
42 AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kSampleRate, 42 AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kSampleRate,
43 kBitsPerChannel, kBufferSize); 43 kBitsPerChannel, kBufferSize);
44 44
45 CreateMixerInput(kDefaultDeviceId); 45 CreateMixerInput(kDefaultDeviceId);
46 fake_callback_.reset(new FakeAudioRenderCallback(0)); 46 fake_callback_.reset(new FakeAudioRenderCallback(0, kSampleRate));
47 audio_bus_ = AudioBus::Create(audio_parameters_); 47 audio_bus_ = AudioBus::Create(audio_parameters_);
48 } 48 }
49 49
50 void CreateMixerInput(const std::string& device_id) { 50 void CreateMixerInput(const std::string& device_id) {
51 mixer_input_ = new AudioRendererMixerInput(this, kRenderFrameId, device_id, 51 mixer_input_ = new AudioRendererMixerInput(this, kRenderFrameId, device_id,
52 url::Origin(), 52 url::Origin(),
53 AudioLatency::LATENCY_PLAYBACK); 53 AudioLatency::LATENCY_PLAYBACK);
54 } 54 }
55 55
56 AudioRendererMixer* GetMixer(int owner_id, 56 AudioRendererMixer* GetMixer(int owner_id,
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 base::Bind(&AudioRendererMixerInputTest::SwitchCallback, 397 base::Bind(&AudioRendererMixerInputTest::SwitchCallback,
398 base::Unretained(this), &run_loop)); 398 base::Unretained(this), &run_loop));
399 run_loop.Run(); 399 run_loop.Run();
400 400
401 mixer_input_->Initialize(audio_parameters_, fake_callback_.get()); 401 mixer_input_->Initialize(audio_parameters_, fake_callback_.get());
402 mixer_input_->Start(); 402 mixer_input_->Start();
403 mixer_input_->Stop(); 403 mixer_input_->Stop();
404 } 404 }
405 405
406 } // namespace media 406 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_hash_unittest.cc ('k') | media/base/audio_renderer_mixer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698