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 "content/renderer/pepper/pepper_platform_audio_input_impl.h" | 5 #include "content/renderer/pepper/pepper_platform_audio_input_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 FROM_HERE, | 86 FROM_HERE, |
87 base::Bind(&PepperPlatformAudioInputImpl::InitializeOnIOThread, | 87 base::Bind(&PepperPlatformAudioInputImpl::InitializeOnIOThread, |
88 this, params)); | 88 this, params)); |
89 return true; | 89 return true; |
90 } | 90 } |
91 | 91 |
92 void PepperPlatformAudioInputImpl::InitializeOnIOThread( | 92 void PepperPlatformAudioInputImpl::InitializeOnIOThread( |
93 const AudioParameters& params) { | 93 const AudioParameters& params) { |
94 stream_id_ = filter_->AddDelegate(this); | 94 stream_id_ = filter_->AddDelegate(this); |
95 filter_->Send(new AudioInputHostMsg_CreateStream( | 95 filter_->Send(new AudioInputHostMsg_CreateStream( |
96 stream_id_, params, AudioManagerBase::kDefaultDeviceId)); | 96 stream_id_, params, AudioManagerBase::kDefaultDeviceId, false)); |
97 } | 97 } |
98 | 98 |
99 void PepperPlatformAudioInputImpl::StartCaptureOnIOThread() { | 99 void PepperPlatformAudioInputImpl::StartCaptureOnIOThread() { |
100 if (stream_id_) | 100 if (stream_id_) |
101 filter_->Send(new AudioInputHostMsg_RecordStream(stream_id_)); | 101 filter_->Send(new AudioInputHostMsg_RecordStream(stream_id_)); |
102 } | 102 } |
103 | 103 |
104 void PepperPlatformAudioInputImpl::StopCaptureOnIOThread() { | 104 void PepperPlatformAudioInputImpl::StopCaptureOnIOThread() { |
105 if (stream_id_) | 105 if (stream_id_) |
106 filter_->Send(new AudioInputHostMsg_CloseStream(stream_id_)); | 106 filter_->Send(new AudioInputHostMsg_CloseStream(stream_id_)); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } | 146 } |
147 | 147 |
148 void PepperPlatformAudioInputImpl::OnVolume(double volume) { | 148 void PepperPlatformAudioInputImpl::OnVolume(double volume) { |
149 } | 149 } |
150 | 150 |
151 void PepperPlatformAudioInputImpl::OnStateChanged(AudioStreamState state) { | 151 void PepperPlatformAudioInputImpl::OnStateChanged(AudioStreamState state) { |
152 } | 152 } |
153 | 153 |
154 void PepperPlatformAudioInputImpl::OnDeviceReady(const std::string&) { | 154 void PepperPlatformAudioInputImpl::OnDeviceReady(const std::string&) { |
155 } | 155 } |
OLD | NEW |