| 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 | 22 |
| 23 #include "base/cancelable_callback.h" | 23 #include "base/cancelable_callback.h" |
| 24 #include "base/compiler_specific.h" | 24 #include "base/compiler_specific.h" |
| 25 #include "base/macros.h" |
| 25 #include "base/synchronization/lock.h" | 26 #include "base/synchronization/lock.h" |
| 26 #include "base/threading/thread_checker.h" | 27 #include "base/threading/thread_checker.h" |
| 27 #include "media/audio/audio_io.h" | 28 #include "media/audio/audio_io.h" |
| 28 #include "media/audio/audio_parameters.h" | 29 #include "media/audio/audio_parameters.h" |
| 29 | 30 |
| 30 namespace media { | 31 namespace media { |
| 31 | 32 |
| 32 class AudioManagerMac; | 33 class AudioManagerMac; |
| 33 class AudioPullFifo; | 34 class AudioPullFifo; |
| 34 | 35 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // Used to make sure control functions (Start(), Stop() etc) are called on the | 210 // Used to make sure control functions (Start(), Stop() etc) are called on the |
| 210 // right thread. | 211 // right thread. |
| 211 base::ThreadChecker thread_checker_; | 212 base::ThreadChecker thread_checker_; |
| 212 | 213 |
| 213 DISALLOW_COPY_AND_ASSIGN(AUHALStream); | 214 DISALLOW_COPY_AND_ASSIGN(AUHALStream); |
| 214 }; | 215 }; |
| 215 | 216 |
| 216 } // namespace media | 217 } // namespace media |
| 217 | 218 |
| 218 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ | 219 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ |
| OLD | NEW |