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

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

Issue 1806313003: Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implemented ScopedAudioManagerPtr Created 4 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/audio/fake_audio_manager.h" 5 #include "media/audio/fake_audio_manager.h"
6 6
7 namespace media { 7 namespace media {
8 8
9 namespace { 9 namespace {
10 10
11 const int kDefaultInputBufferSize = 1024; 11 const int kDefaultInputBufferSize = 1024;
12 const int kDefaultSampleRate = 48000; 12 const int kDefaultSampleRate = 48000;
13 13
14 } // namespace 14 } // namespace
15 15
16 FakeAudioManager::FakeAudioManager(AudioLogFactory* audio_log_factory) 16 FakeAudioManager::FakeAudioManager(
17 : AudioManagerBase(audio_log_factory) {} 17 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
18 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner,
19 AudioLogFactory* audio_log_factory)
20 : AudioManagerBase(task_runner, worker_task_runner, audio_log_factory) {}
alokp 2016/03/22 21:47:07 Do all these constructors require std::move too?
18 21
19 FakeAudioManager::~FakeAudioManager() { 22 FakeAudioManager::~FakeAudioManager() {
20 Shutdown(); 23 Shutdown();
21 } 24 }
22 25
23 // Implementation of AudioManager. 26 // Implementation of AudioManager.
24 bool FakeAudioManager::HasAudioOutputDevices() { return false; } 27 bool FakeAudioManager::HasAudioOutputDevices() { return false; }
25 28
26 bool FakeAudioManager::HasAudioInputDevices() { return false; } 29 bool FakeAudioManager::HasAudioInputDevices() { return false; }
27 30
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 73 }
71 74
72 AudioParameters FakeAudioManager::GetInputStreamParameters( 75 AudioParameters FakeAudioManager::GetInputStreamParameters(
73 const std::string& device_id) { 76 const std::string& device_id) {
74 return AudioParameters( 77 return AudioParameters(
75 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, 78 AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
76 kDefaultSampleRate, 16, kDefaultInputBufferSize); 79 kDefaultSampleRate, 16, kDefaultInputBufferSize);
77 } 80 }
78 81
79 } // namespace media 82 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698