| 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 #ifndef MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
| 6 #define MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 6 #define MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Implementation of AudioManagerBase. | 31 // Implementation of AudioManagerBase. |
| 32 virtual AudioOutputStream* MakeLinearOutputStream( | 32 virtual AudioOutputStream* MakeLinearOutputStream( |
| 33 const AudioParameters& params) OVERRIDE; | 33 const AudioParameters& params) OVERRIDE; |
| 34 virtual AudioOutputStream* MakeLowLatencyOutputStream( | 34 virtual AudioOutputStream* MakeLowLatencyOutputStream( |
| 35 const AudioParameters& params) OVERRIDE; | 35 const AudioParameters& params) OVERRIDE; |
| 36 virtual AudioInputStream* MakeLinearInputStream( | 36 virtual AudioInputStream* MakeLinearInputStream( |
| 37 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 37 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
| 38 virtual AudioInputStream* MakeLowLatencyInputStream( | 38 virtual AudioInputStream* MakeLowLatencyInputStream( |
| 39 const AudioParameters& params, const std::string& device_id) OVERRIDE; | 39 const AudioParameters& params, const std::string& device_id) OVERRIDE; |
| 40 | 40 |
| 41 static bool GetDefaultOutputDevice(AudioDeviceID* device); | |
| 42 | |
| 43 static bool GetDefaultOutputChannels(int* channels, | |
| 44 int* channels_per_frame); | |
| 45 | |
| 46 static bool GetDeviceChannels(AudioDeviceID device, | |
| 47 AudioObjectPropertyScope scope, | |
| 48 int* channels, | |
| 49 int* channels_per_frame); | |
| 50 | |
| 51 protected: | 41 protected: |
| 52 virtual ~AudioManagerMac(); | 42 virtual ~AudioManagerMac(); |
| 53 | 43 |
| 54 virtual AudioParameters GetPreferredOutputStreamParameters( | 44 virtual AudioParameters GetPreferredOutputStreamParameters( |
| 55 const AudioParameters& input_params) OVERRIDE; | 45 const AudioParameters& input_params) OVERRIDE; |
| 56 | 46 |
| 57 private: | 47 private: |
| 58 // Helper methods for constructing AudioDeviceListenerMac on the audio thread. | 48 // Helper methods for constructing AudioDeviceListenerMac on the audio thread. |
| 59 void CreateDeviceListener(); | 49 void CreateDeviceListener(); |
| 60 void DestroyDeviceListener(); | 50 void DestroyDeviceListener(); |
| 61 void DelayedDeviceChange(); | 51 void DelayedDeviceChange(); |
| 62 | 52 |
| 63 scoped_ptr<AudioDeviceListenerMac> output_device_listener_; | 53 scoped_ptr<AudioDeviceListenerMac> output_device_listener_; |
| 64 | 54 |
| 65 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 55 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
| 66 }; | 56 }; |
| 67 | 57 |
| 68 } // namespace media | 58 } // namespace media |
| 69 | 59 |
| 70 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 60 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
| OLD | NEW |