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
3 // found in the LICENSE file.
5 #include "content/renderer/media/webrtc_audio_device_not_impl.h"
9 WebRtcAudioDeviceNotImpl::WebRtcAudioDeviceNotImpl()
10 : last_process_time_(base::TimeTicks::Now()) {
13 int64_t WebRtcAudioDeviceNotImpl::TimeUntilNextProcess() {
14 const int64_t kMillisecondsBetweenProcessCalls
= 5000;
15 base::TimeDelta delta_time
= (base::TimeTicks::Now() - last_process_time_
);
16 return kMillisecondsBetweenProcessCalls
- delta_time
.InMilliseconds();
19 int32_t WebRtcAudioDeviceNotImpl::Process() {
20 last_process_time_
= base::TimeTicks::Now();
24 int32_t WebRtcAudioDeviceNotImpl::RegisterEventObserver(
25 webrtc::AudioDeviceObserver
* event_callback
) {
29 int32_t WebRtcAudioDeviceNotImpl::ActiveAudioLayer(
30 AudioLayer
* audio_layer
) const {
34 webrtc::AudioDeviceModule::ErrorCode
35 WebRtcAudioDeviceNotImpl::LastError() const {
36 return AudioDeviceModule::kAdmErrNone
;
39 int16_t WebRtcAudioDeviceNotImpl::PlayoutDevices() {
43 int16_t WebRtcAudioDeviceNotImpl::RecordingDevices() {
47 int32_t WebRtcAudioDeviceNotImpl::PlayoutDeviceName(
48 uint16_t index
, char name
[webrtc::kAdmMaxDeviceNameSize
],
49 char guid
[webrtc::kAdmMaxGuidSize
]) {
53 int32_t WebRtcAudioDeviceNotImpl::RecordingDeviceName(
54 uint16_t index
, char name
[webrtc::kAdmMaxDeviceNameSize
],
55 char guid
[webrtc::kAdmMaxGuidSize
]) {
59 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutDevice(uint16_t index
) {
63 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutDevice(WindowsDeviceType device
) {
67 int32_t WebRtcAudioDeviceNotImpl::SetRecordingDevice(uint16_t index
) {
71 int32_t WebRtcAudioDeviceNotImpl::SetRecordingDevice(WindowsDeviceType device
) {
75 int32_t WebRtcAudioDeviceNotImpl::InitPlayout() {
79 int32_t WebRtcAudioDeviceNotImpl::InitRecording() {
83 int32_t WebRtcAudioDeviceNotImpl::SetWaveOutVolume(uint16_t volume_left
,
84 uint16_t volume_right
) {
88 int32_t WebRtcAudioDeviceNotImpl::WaveOutVolume(
89 uint16_t* volume_left
, uint16_t* volume_right
) const {
93 int32_t WebRtcAudioDeviceNotImpl::InitSpeaker() {
97 bool WebRtcAudioDeviceNotImpl::SpeakerIsInitialized() const {
101 int32_t WebRtcAudioDeviceNotImpl::InitMicrophone() {
105 bool WebRtcAudioDeviceNotImpl::MicrophoneIsInitialized() const {
109 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolumeIsAvailable(bool* available
) {
113 int32_t WebRtcAudioDeviceNotImpl::SetSpeakerVolume(uint32_t volume
) {
117 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolume(uint32_t* volume
) const {
121 int32_t WebRtcAudioDeviceNotImpl::MaxSpeakerVolume(uint32_t* max_volume
) const {
125 int32_t WebRtcAudioDeviceNotImpl::MinSpeakerVolume(uint32_t* min_volume
) const {
129 int32_t WebRtcAudioDeviceNotImpl::SpeakerVolumeStepSize(
130 uint16_t* step_size
) const {
134 int32_t WebRtcAudioDeviceNotImpl::MicrophoneVolumeIsAvailable(bool* available
) {
138 int32_t WebRtcAudioDeviceNotImpl::MicrophoneVolumeStepSize(
139 uint16_t* step_size
) const {
143 int32_t WebRtcAudioDeviceNotImpl::SpeakerMuteIsAvailable(bool* available
) {
147 int32_t WebRtcAudioDeviceNotImpl::SetSpeakerMute(bool enable
) {
151 int32_t WebRtcAudioDeviceNotImpl::SpeakerMute(bool* enabled
) const {
155 int32_t WebRtcAudioDeviceNotImpl::MicrophoneMuteIsAvailable(bool* available
) {
159 int32_t WebRtcAudioDeviceNotImpl::SetMicrophoneMute(bool enable
) {
163 int32_t WebRtcAudioDeviceNotImpl::MicrophoneMute(bool* enabled
) const {
167 int32_t WebRtcAudioDeviceNotImpl::MicrophoneBoostIsAvailable(bool* available
) {
171 int32_t WebRtcAudioDeviceNotImpl::SetMicrophoneBoost(bool enable
) {
175 int32_t WebRtcAudioDeviceNotImpl::MicrophoneBoost(bool* enabled
) const {
179 int32_t WebRtcAudioDeviceNotImpl::SetStereoPlayout(bool enable
) {
183 int32_t WebRtcAudioDeviceNotImpl::StereoPlayout(bool* enabled
) const {
187 int32_t WebRtcAudioDeviceNotImpl::SetStereoRecording(bool enable
) {
191 int32_t WebRtcAudioDeviceNotImpl::StereoRecording(bool* enabled
) const {
195 int32_t WebRtcAudioDeviceNotImpl::SetRecordingChannel(
196 const ChannelType channel
) {
200 int32_t WebRtcAudioDeviceNotImpl::RecordingChannel(ChannelType
* channel
) const {
204 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutBuffer(const BufferType type
,
209 int32_t WebRtcAudioDeviceNotImpl::PlayoutBuffer(BufferType
* type
,
210 uint16_t* size_ms
) const {
214 int32_t WebRtcAudioDeviceNotImpl::CPULoad(uint16_t* load
) const {
218 int32_t WebRtcAudioDeviceNotImpl::StartRawOutputFileRecording(
219 const char pcm_file_name_utf8
[webrtc::kAdmMaxFileNameSize
]) {
223 int32_t WebRtcAudioDeviceNotImpl::StopRawOutputFileRecording() {
227 int32_t WebRtcAudioDeviceNotImpl::StartRawInputFileRecording(
228 const char pcm_file_name_utf8
[webrtc::kAdmMaxFileNameSize
]) {
232 int32_t WebRtcAudioDeviceNotImpl::StopRawInputFileRecording() {
236 int32_t WebRtcAudioDeviceNotImpl::SetRecordingSampleRate(
237 const uint32_t samples_per_sec
) {
241 int32_t WebRtcAudioDeviceNotImpl::SetPlayoutSampleRate(
242 const uint32_t samples_per_sec
) {
246 int32_t WebRtcAudioDeviceNotImpl::ResetAudioDevice() {
250 int32_t WebRtcAudioDeviceNotImpl::SetLoudspeakerStatus(bool enable
) {
254 int32_t WebRtcAudioDeviceNotImpl::GetLoudspeakerStatus(bool* enabled
) const {
258 int32_t WebRtcAudioDeviceNotImpl::SetAGC(bool enable
) {
262 bool WebRtcAudioDeviceNotImpl::AGC() const {
266 bool WebRtcAudioDeviceNotImpl::BuiltInAECIsAvailable() const {
270 int32_t WebRtcAudioDeviceNotImpl::EnableBuiltInAEC(bool enable
) {
274 } // namespace content