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 #ifndef MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
6 #define MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "media/audio/audio_manager_base.h"
16 class MEDIA_EXPORT AudioManagerCras
: public AudioManagerBase
{
20 // AudioManager implementation.
21 virtual bool HasAudioOutputDevices() OVERRIDE
;
22 virtual bool HasAudioInputDevices() OVERRIDE
;
23 virtual void ShowAudioInputSettings() OVERRIDE
;
24 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames
* device_names
)
26 virtual AudioParameters
GetInputStreamParameters(
27 const std::string
& device_id
) OVERRIDE
;
29 // AudioManagerBase implementation.
30 virtual AudioOutputStream
* MakeLinearOutputStream(
31 const AudioParameters
& params
) OVERRIDE
;
32 virtual AudioOutputStream
* MakeLowLatencyOutputStream(
33 const AudioParameters
& params
) OVERRIDE
;
34 virtual AudioInputStream
* MakeLinearInputStream(
35 const AudioParameters
& params
, const std::string
& device_id
) OVERRIDE
;
36 virtual AudioInputStream
* MakeLowLatencyInputStream(
37 const AudioParameters
& params
, const std::string
& device_id
) OVERRIDE
;
40 virtual ~AudioManagerCras();
42 virtual AudioParameters
GetPreferredOutputStreamParameters(
43 const AudioParameters
& input_params
) OVERRIDE
;
46 // Gets a list of available cras input devices.
47 void GetCrasAudioInputDevices(media::AudioDeviceNames
* device_names
);
49 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
50 AudioOutputStream
* MakeOutputStream(const AudioParameters
& params
);
52 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
53 AudioInputStream
* MakeInputStream(const AudioParameters
& params
,
54 const std::string
& device_id
);
56 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras
);
61 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_