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 #ifndef MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 5 #ifndef MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 6 #define MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
7 | 7 |
8 #include <AudioToolbox/AudioQueue.h> | 8 #include <AudioToolbox/AudioQueue.h> |
9 #include <AudioToolbox/AudioFormat.h> | 9 #include <AudioToolbox/AudioFormat.h> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "media/audio/audio_io.h" | 12 #include "media/audio/audio_io.h" |
13 #include "media/audio/audio_parameters.h" | 13 #include "media/audio/audio_parameters.h" |
14 | 14 |
15 namespace media { | |
16 | |
17 class AudioManagerMac; | 15 class AudioManagerMac; |
18 | 16 |
19 // Implementation of AudioInputStream for Mac OS X using the audio queue service | 17 // Implementation of AudioInputStream for Mac OS X using the audio queue service |
20 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream. | 18 // present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream. |
21 class PCMQueueInAudioInputStream : public AudioInputStream { | 19 class PCMQueueInAudioInputStream : public AudioInputStream { |
22 public: | 20 public: |
23 // Parameters as per AudioManager::MakeAudioInputStream. | 21 // Parameters as per AudioManager::MakeAudioInputStream. |
24 PCMQueueInAudioInputStream(AudioManagerMac* manager, | 22 PCMQueueInAudioInputStream(AudioManagerMac* manager, |
25 const AudioParameters& params); | 23 const AudioParameters& params); |
26 virtual ~PCMQueueInAudioInputStream(); | 24 virtual ~PCMQueueInAudioInputStream(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Handle to the OS audio queue object. | 71 // Handle to the OS audio queue object. |
74 AudioQueueRef audio_queue_; | 72 AudioQueueRef audio_queue_; |
75 // Size of each of the buffers in |audio_buffers_| | 73 // Size of each of the buffers in |audio_buffers_| |
76 uint32 buffer_size_bytes_; | 74 uint32 buffer_size_bytes_; |
77 // True iff Start() has been called successfully. | 75 // True iff Start() has been called successfully. |
78 bool started_; | 76 bool started_; |
79 | 77 |
80 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); | 78 DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); |
81 }; | 79 }; |
82 | 80 |
83 } // namespace media | |
84 | |
85 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ | 81 #endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_ |
OLD | NEW |