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 28 matching lines...) Expand all Loading... |
39 #include <AudioUnit/AudioUnit.h> | 39 #include <AudioUnit/AudioUnit.h> |
40 | 40 |
41 #include "base/atomicops.h" | 41 #include "base/atomicops.h" |
42 #include "base/memory/scoped_ptr.h" | 42 #include "base/memory/scoped_ptr.h" |
43 #include "base/synchronization/lock.h" | 43 #include "base/synchronization/lock.h" |
44 #include "base/time.h" | 44 #include "base/time.h" |
45 #include "media/audio/audio_io.h" | 45 #include "media/audio/audio_io.h" |
46 #include "media/audio/audio_input_stream_impl.h" | 46 #include "media/audio/audio_input_stream_impl.h" |
47 #include "media/audio/audio_parameters.h" | 47 #include "media/audio/audio_parameters.h" |
48 | 48 |
49 namespace media { | |
50 | |
51 class AudioManagerMac; | 49 class AudioManagerMac; |
52 | 50 |
53 class AUAudioInputStream : public AudioInputStreamImpl { | 51 class AUAudioInputStream : public AudioInputStreamImpl { |
54 public: | 52 public: |
55 // The ctor takes all the usual parameters, plus |manager| which is the | 53 // The ctor takes all the usual parameters, plus |manager| which is the |
56 // the audio manager who is creating this object. | 54 // the audio manager who is creating this object. |
57 AUAudioInputStream(AudioManagerMac* manager, | 55 AUAudioInputStream(AudioManagerMac* manager, |
58 const AudioParameters& params, | 56 const AudioParameters& params, |
59 AudioDeviceID audio_device_id); | 57 AudioDeviceID audio_device_id); |
60 // The dtor is typically called by the AudioManager only and it is usually | 58 // The dtor is typically called by the AudioManager only and it is usually |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // Fixed capture hardware latency in frames. | 139 // Fixed capture hardware latency in frames. |
142 double hardware_latency_frames_; | 140 double hardware_latency_frames_; |
143 | 141 |
144 // The number of channels in each frame of audio data, which is used | 142 // The number of channels in each frame of audio data, which is used |
145 // when querying the volume of each channel. | 143 // when querying the volume of each channel. |
146 int number_of_channels_in_frame_; | 144 int number_of_channels_in_frame_; |
147 | 145 |
148 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); | 146 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); |
149 }; | 147 }; |
150 | 148 |
151 } // namespace media | |
152 | |
153 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ | 149 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ |
OLD | NEW |