| OLD | NEW |
| 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 #ifndef MEDIA_AUDIO_ALSA_AUDIO_MANAGER_ALSA_H_ | 5 #ifndef MEDIA_AUDIO_ALSA_AUDIO_MANAGER_ALSA_H_ |
| 6 #define MEDIA_AUDIO_ALSA_AUDIO_MANAGER_ALSA_H_ | 6 #define MEDIA_AUDIO_ALSA_AUDIO_MANAGER_ALSA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 static void ShowLinuxAudioInputSettings(); | 22 static void ShowLinuxAudioInputSettings(); |
| 23 | 23 |
| 24 // Implementation of AudioManager. | 24 // Implementation of AudioManager. |
| 25 virtual bool HasAudioOutputDevices() OVERRIDE; | 25 virtual bool HasAudioOutputDevices() OVERRIDE; |
| 26 virtual bool HasAudioInputDevices() OVERRIDE; | 26 virtual bool HasAudioInputDevices() OVERRIDE; |
| 27 virtual void ShowAudioInputSettings() OVERRIDE; | 27 virtual void ShowAudioInputSettings() OVERRIDE; |
| 28 virtual void GetAudioInputDeviceNames( | 28 virtual void GetAudioInputDeviceNames( |
| 29 AudioDeviceNames* device_names) OVERRIDE; | 29 AudioDeviceNames* device_names) OVERRIDE; |
| 30 virtual void GetAudioOutputDeviceNames( | 30 virtual void GetAudioOutputDeviceNames( |
| 31 AudioDeviceNames* device_names) OVERRIDE; | 31 AudioDeviceNames* device_names) OVERRIDE; |
| 32 virtual AudioParameters GetInputStreamParameters( | |
| 33 const std::string& device_id) OVERRIDE; | |
| 34 | 32 |
| 35 // Implementation of AudioManagerBase. | 33 // Implementation of AudioManagerBase. |
| 36 virtual AudioOutputStream* MakeLinearOutputStream( | 34 virtual AudioOutputStream* MakeLinearOutputStream( |
| 37 const AudioParameters& params) OVERRIDE; | 35 const AudioParameters& params) OVERRIDE; |
| 38 virtual AudioOutputStream* MakeLowLatencyOutputStream( | 36 virtual AudioOutputStream* MakeLowLatencyOutputStream( |
| 39 const AudioParameters& params, | 37 const AudioParameters& params, |
| 40 const std::string& device_id) OVERRIDE; | 38 const std::string& device_id) OVERRIDE; |
| 41 virtual AudioInputStream* MakeLinearInputStream( | 39 virtual AudioInputStream* MakeLinearInputStream( |
| 42 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 40 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
| 43 virtual AudioInputStream* MakeLowLatencyInputStream( | 41 virtual AudioInputStream* MakeLowLatencyInputStream( |
| 44 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 42 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
| 45 | 43 |
| 46 protected: | 44 protected: |
| 47 virtual ~AudioManagerAlsa(); | 45 virtual ~AudioManagerAlsa(); |
| 48 | 46 |
| 49 virtual AudioParameters GetPreferredOutputStreamParameters( | 47 virtual AudioParameters GetPreferredOutputStreamParameters( |
| 50 const std::string& output_device_id, | 48 const std::string& output_device_id, |
| 51 const AudioParameters& input_params) OVERRIDE; | 49 const AudioParameters& input_params) OVERRIDE; |
| 50 virtual AudioParameters GetPreferredInputStreamParameters( |
| 51 const std::string& input_device_id, |
| 52 const AudioParameters& input_params) OVERRIDE; |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 enum StreamType { | 55 enum StreamType { |
| 55 kStreamPlayback = 0, | 56 kStreamPlayback = 0, |
| 56 kStreamCapture, | 57 kStreamCapture, |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 // Gets a list of available ALSA devices. | 60 // Gets a list of available ALSA devices. |
| 60 void GetAlsaAudioDevices(StreamType type, | 61 void GetAlsaAudioDevices(StreamType type, |
| 61 media::AudioDeviceNames* device_names); | 62 media::AudioDeviceNames* device_names); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 84 const std::string& device_id); | 85 const std::string& device_id); |
| 85 | 86 |
| 86 scoped_ptr<AlsaWrapper> wrapper_; | 87 scoped_ptr<AlsaWrapper> wrapper_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(AudioManagerAlsa); | 89 DISALLOW_COPY_AND_ASSIGN(AudioManagerAlsa); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace media | 92 } // namespace media |
| 92 | 93 |
| 93 #endif // MEDIA_AUDIO_ALSA_AUDIO_MANAGER_ALSA_H_ | 94 #endif // MEDIA_AUDIO_ALSA_AUDIO_MANAGER_ALSA_H_ |
| OLD | NEW |