| 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 // Implementation notes: | 5 // Implementation notes: |
| 6 // | 6 // |
| 7 // - It is recommended to first acquire the native sample rate of the default | 7 // - It is recommended to first acquire the native sample rate of the default |
| 8 // output device and then use the same rate when creating this object. | 8 // output device and then use the same rate when creating this object. |
| 9 // Use AudioManagerMac::HardwareSampleRate() to retrieve the sample rate. | 9 // Use AudioManagerMac::HardwareSampleRate() to retrieve the sample rate. |
| 10 // - Calling Close() also leads to self destruction. | 10 // - Calling Close() also leads to self destruction. |
| 11 // - The latency consists of two parts: | 11 // - The latency consists of two parts: |
| 12 // 1) Hardware latency, which includes Audio Unit latency, audio device | 12 // 1) Hardware latency, which includes Audio Unit latency, audio device |
| 13 // latency; | 13 // latency; |
| 14 // 2) The delay between the moment getting the callback and the scheduled time | 14 // 2) The delay between the moment getting the callback and the scheduled time |
| 15 // stamp that tells when the data is going to be played out. | 15 // stamp that tells when the data is going to be played out. |
| 16 // | 16 // |
| 17 #ifndef MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ | 17 #ifndef MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ |
| 18 #define MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ | 18 #define MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ |
| 19 | 19 |
| 20 #include <AudioUnit/AudioUnit.h> | 20 #include <AudioUnit/AudioUnit.h> |
| 21 #include <CoreAudio/CoreAudio.h> | 21 #include <CoreAudio/CoreAudio.h> |
| 22 #include <stddef.h> |
| 23 #include <stdint.h> |
| 22 | 24 |
| 23 #include "base/cancelable_callback.h" | 25 #include "base/cancelable_callback.h" |
| 24 #include "base/compiler_specific.h" | 26 #include "base/compiler_specific.h" |
| 25 #include "base/macros.h" | 27 #include "base/macros.h" |
| 26 #include "base/synchronization/lock.h" | 28 #include "base/synchronization/lock.h" |
| 27 #include "base/threading/thread_checker.h" | 29 #include "base/threading/thread_checker.h" |
| 28 #include "media/audio/audio_io.h" | 30 #include "media/audio/audio_io.h" |
| 29 #include "media/audio/audio_parameters.h" | 31 #include "media/audio/audio_parameters.h" |
| 30 | 32 |
| 31 namespace media { | 33 namespace media { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // Used to make sure control functions (Start(), Stop() etc) are called on the | 212 // Used to make sure control functions (Start(), Stop() etc) are called on the |
| 211 // right thread. | 213 // right thread. |
| 212 base::ThreadChecker thread_checker_; | 214 base::ThreadChecker thread_checker_; |
| 213 | 215 |
| 214 DISALLOW_COPY_AND_ASSIGN(AUHALStream); | 216 DISALLOW_COPY_AND_ASSIGN(AUHALStream); |
| 215 }; | 217 }; |
| 216 | 218 |
| 217 } // namespace media | 219 } // namespace media |
| 218 | 220 |
| 219 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ | 221 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ |
| OLD | NEW |