| 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 // Implementation of AudioInputStream for Mac OS X using the special AUHAL | 5 // Implementation of AudioInputStream for Mac OS X using the special AUHAL |
| 6 // input Audio Unit present in OS 10.4 and later. | 6 // input Audio Unit present in OS 10.4 and later. |
| 7 // The AUHAL input Audio Unit is for low-latency audio I/O. | 7 // The AUHAL input Audio Unit is for low-latency audio I/O. |
| 8 // | 8 // |
| 9 // Overview of operation: | 9 // Overview of operation: |
| 10 // | 10 // |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 const AudioTimeStamp* time_stamp, | 104 const AudioTimeStamp* time_stamp, |
| 105 UInt32 bus_number, | 105 UInt32 bus_number, |
| 106 UInt32 number_of_frames, | 106 UInt32 number_of_frames, |
| 107 AudioBufferList* io_data); | 107 AudioBufferList* io_data); |
| 108 OSStatus OnDataIsAvailable(AudioUnitRenderActionFlags* flags, | 108 OSStatus OnDataIsAvailable(AudioUnitRenderActionFlags* flags, |
| 109 const AudioTimeStamp* time_stamp, | 109 const AudioTimeStamp* time_stamp, |
| 110 UInt32 bus_number, | 110 UInt32 bus_number, |
| 111 UInt32 number_of_frames); | 111 UInt32 number_of_frames); |
| 112 | 112 |
| 113 // Pushes recorded data to consumer of the input audio stream. | 113 // Pushes recorded data to consumer of the input audio stream. |
| 114 OSStatus Provide(UInt32 number_of_frames, AudioBufferList* io_data, | 114 OSStatus Provide(UInt32 number_of_frames, |
| 115 AudioBufferList* io_data, |
| 115 const AudioTimeStamp* time_stamp); | 116 const AudioTimeStamp* time_stamp); |
| 116 | 117 |
| 117 // Callback functions called on different system threads from the Core Audio | 118 // Callback functions called on different system threads from the Core Audio |
| 118 // framework. These methods are called when device properties are changed. | 119 // framework. These methods are called when device properties are changed. |
| 119 static OSStatus OnDevicePropertyChanged( | 120 static OSStatus OnDevicePropertyChanged( |
| 120 AudioObjectID object_id, | 121 AudioObjectID object_id, |
| 121 UInt32 num_addresses, | 122 UInt32 num_addresses, |
| 122 const AudioObjectPropertyAddress addresses[], | 123 const AudioObjectPropertyAddress addresses[], |
| 123 void* context); | 124 void* context); |
| 124 OSStatus DevicePropertyChanged(AudioObjectID object_id, | 125 OSStatus DevicePropertyChanged(AudioObjectID object_id, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // this object is destroyed. | 332 // this object is destroyed. |
| 332 // Note that, all member variables should appear before the WeakPtrFactory. | 333 // Note that, all member variables should appear before the WeakPtrFactory. |
| 333 base::WeakPtrFactory<AUAudioInputStream> weak_factory_; | 334 base::WeakPtrFactory<AUAudioInputStream> weak_factory_; |
| 334 | 335 |
| 335 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); | 336 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); |
| 336 }; | 337 }; |
| 337 | 338 |
| 338 } // namespace media | 339 } // namespace media |
| 339 | 340 |
| 340 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ | 341 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ |
| OLD | NEW |