| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 size_t* io_buffer_frame_size); | 118 size_t* io_buffer_frame_size); |
| 119 | 119 |
| 120 // Number of constructed output and input streams. | 120 // Number of constructed output and input streams. |
| 121 size_t output_streams() const { return output_streams_.size(); } | 121 size_t output_streams() const { return output_streams_.size(); } |
| 122 size_t low_latency_input_streams() const { | 122 size_t low_latency_input_streams() const { |
| 123 return low_latency_input_streams_.size(); | 123 return low_latency_input_streams_.size(); |
| 124 } | 124 } |
| 125 size_t basic_input_streams() const { return basic_input_streams_.size(); } | 125 size_t basic_input_streams() const { return basic_input_streams_.size(); } |
| 126 | 126 |
| 127 protected: | 127 protected: |
| 128 friend class media::AudioManagerDeleter; | |
| 129 | |
| 130 ~AudioManagerMac() override; | 128 ~AudioManagerMac() override; |
| 131 AudioParameters GetPreferredOutputStreamParameters( | 129 AudioParameters GetPreferredOutputStreamParameters( |
| 132 const std::string& output_device_id, | 130 const std::string& output_device_id, |
| 133 const AudioParameters& input_params) override; | 131 const AudioParameters& input_params) override; |
| 134 | 132 |
| 135 private: | 133 private: |
| 136 void InitializeOnAudioThread(); | 134 void InitializeOnAudioThread(); |
| 137 | 135 |
| 138 int ChooseBufferSize(bool is_input, int sample_rate); | 136 int ChooseBufferSize(bool is_input, int sample_rate); |
| 139 | 137 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // Set to true in the destructor. Ensures that methods that touches native | 186 // Set to true in the destructor. Ensures that methods that touches native |
| 189 // Core Audio APIs are not executed during shutdown. | 187 // Core Audio APIs are not executed during shutdown. |
| 190 bool in_shutdown_; | 188 bool in_shutdown_; |
| 191 | 189 |
| 192 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); | 190 DISALLOW_COPY_AND_ASSIGN(AudioManagerMac); |
| 193 }; | 191 }; |
| 194 | 192 |
| 195 } // namespace media | 193 } // namespace media |
| 196 | 194 |
| 197 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ | 195 #endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_ |
| OLD | NEW |