OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OUTPUT_MAC_H_ | 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_ |
6 #define MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_ | 6 #define MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_ |
7 | 7 |
8 #include <AudioToolbox/AudioFormat.h> | 8 #include <AudioToolbox/AudioFormat.h> |
9 #include <AudioToolbox/AudioQueue.h> | 9 #include <AudioToolbox/AudioQueue.h> |
10 #include <AudioUnit/AudioUnit.h> | 10 #include <AudioUnit/AudioUnit.h> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "media/audio/audio_io.h" | 14 #include "media/audio/audio_io.h" |
15 #include "media/audio/audio_parameters.h" | 15 #include "media/audio/audio_parameters.h" |
16 | 16 |
17 namespace media { | |
18 | |
19 class AudioManagerMac; | 17 class AudioManagerMac; |
20 | 18 |
21 // Implementation of AudioOuputStream for Mac OS X using the audio queue service | 19 // Implementation of AudioOuputStream for Mac OS X using the audio queue service |
22 // present in OS 10.5 and later. Audioqueue is the successor to the SoundManager | 20 // present in OS 10.5 and later. Audioqueue is the successor to the SoundManager |
23 // services but it is supported in 64 bits. | 21 // services but it is supported in 64 bits. |
24 class PCMQueueOutAudioOutputStream : public AudioOutputStream { | 22 class PCMQueueOutAudioOutputStream : public AudioOutputStream { |
25 public: | 23 public: |
26 // The ctor takes all the usual parameters, plus |manager| which is the | 24 // The ctor takes all the usual parameters, plus |manager| which is the |
27 // the audio manager who is creating this object. | 25 // the audio manager who is creating this object. |
28 PCMQueueOutAudioOutputStream(AudioManagerMac* manager, | 26 PCMQueueOutAudioOutputStream(AudioManagerMac* manager, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // Number of channels in device layout. | 90 // Number of channels in device layout. |
93 int num_core_channels_; | 91 int num_core_channels_; |
94 // A flag to determine if swizzle is needed from source to device layouts. | 92 // A flag to determine if swizzle is needed from source to device layouts. |
95 bool should_swizzle_; | 93 bool should_swizzle_; |
96 // A flag to determine if downmix is needed from source to device layouts. | 94 // A flag to determine if downmix is needed from source to device layouts. |
97 bool should_down_mix_; | 95 bool should_down_mix_; |
98 | 96 |
99 DISALLOW_COPY_AND_ASSIGN(PCMQueueOutAudioOutputStream); | 97 DISALLOW_COPY_AND_ASSIGN(PCMQueueOutAudioOutputStream); |
100 }; | 98 }; |
101 | 99 |
102 } // namespace media | |
103 | |
104 #endif // MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_ | 100 #endif // MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_ |
OLD | NEW |