| 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 <AudioUnit/AudioUnit.h> | 8 #include <AudioUnit/AudioUnit.h> |
| 9 #include <CoreAudio/AudioHardware.h> | 9 #include <CoreAudio/AudioHardware.h> |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 size_t output_streams() const { return output_streams_.size(); } | 116 size_t output_streams() const { return output_streams_.size(); } |
| 117 size_t low_latency_input_streams() const { | 117 size_t low_latency_input_streams() const { |
| 118 return low_latency_input_streams_.size(); | 118 return low_latency_input_streams_.size(); |
| 119 } | 119 } |
| 120 size_t basic_input_streams() const { return basic_input_streams_.size(); } | 120 size_t basic_input_streams() const { return basic_input_streams_.size(); } |
| 121 | 121 |
| 122 protected: | 122 protected: |
| 123 AudioParameters GetPreferredOutputStreamParameters( | 123 AudioParameters GetPreferredOutputStreamParameters( |
| 124 const std::string& output_device_id, | 124 const std::string& output_device_id, |
| 125 const AudioParameters& input_params) override; | 125 const AudioParameters& input_params) override; |
| 126 void ShutdownOnAudioThread() override; | 126 void ShutdownOnAudioThread(bool immediately) override; |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 void InitializeOnAudioThread(); | 129 void InitializeOnAudioThread(); |
| 130 | 130 |
| 131 int ChooseBufferSize(bool is_input, int sample_rate); | 131 int ChooseBufferSize(bool is_input, int sample_rate); |
| 132 | 132 |
| 133 // Notify streams of a device change if the default output device or its | 133 // Notify streams of a device change if the default output device or its |
| 134 // sample rate has changed, otherwise does nothing. | 134 // sample rate has changed, otherwise does nothing. |
| 135 void HandleDeviceChanges(); | 135 void HandleDeviceChanges(); |
| 136 | 136 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // Set to true in the destructor. Ensures that methods that touches native | 181 // Set to true in the destructor. Ensures that methods that touches native |
| 182 // Core Audio APIs are not executed during shutdown. | 182 // Core Audio APIs are not executed during shutdown. |
| 183 bool in_shutdown_; | 183 bool in_shutdown_; |
| 184 | 184 |
| 185 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 185 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 } // namespace media | 188 } // namespace media |
| 189 | 189 |
| 190 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 190 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
| OLD | NEW |