OLD | NEW |
1 // Copyright (c) 2011 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 // 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "media/audio/audio_io.h" | 43 #include "media/audio/audio_io.h" |
44 #include "media/audio/audio_parameters.h" | 44 #include "media/audio/audio_parameters.h" |
45 | 45 |
46 class AudioManagerMac; | 46 class AudioManagerMac; |
47 | 47 |
48 class AUAudioInputStream : public AudioInputStream { | 48 class AUAudioInputStream : public AudioInputStream { |
49 public: | 49 public: |
50 // The ctor takes all the usual parameters, plus |manager| which is the | 50 // The ctor takes all the usual parameters, plus |manager| which is the |
51 // the audio manager who is creating this object. | 51 // the audio manager who is creating this object. |
52 AUAudioInputStream(AudioManagerMac* manager, | 52 AUAudioInputStream(AudioManagerMac* manager, |
53 const AudioParameters& params); | 53 const AudioParameters& params, |
| 54 AudioDeviceID audio_device_id); |
54 // The dtor is typically called by the AudioManager only and it is usually | 55 // The dtor is typically called by the AudioManager only and it is usually |
55 // triggered by calling AudioInputStream::Close(). | 56 // triggered by calling AudioInputStream::Close(). |
56 virtual ~AUAudioInputStream(); | 57 virtual ~AUAudioInputStream(); |
57 | 58 |
58 // Implementation of AudioInputStream. | 59 // Implementation of AudioInputStream. |
59 virtual bool Open() OVERRIDE; | 60 virtual bool Open() OVERRIDE; |
60 virtual void Start(AudioInputCallback* callback) OVERRIDE; | 61 virtual void Start(AudioInputCallback* callback) OVERRIDE; |
61 virtual void Stop() OVERRIDE; | 62 virtual void Stop() OVERRIDE; |
62 virtual void Close() OVERRIDE; | 63 virtual void Close() OVERRIDE; |
63 | 64 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // True after successfull Start(), false after successful Stop(). | 123 // True after successfull Start(), false after successful Stop(). |
123 bool started_; | 124 bool started_; |
124 | 125 |
125 // Fixed capture hardware latency in frames. | 126 // Fixed capture hardware latency in frames. |
126 double hardware_latency_frames_; | 127 double hardware_latency_frames_; |
127 | 128 |
128 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); | 129 DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); |
129 }; | 130 }; |
130 | 131 |
131 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ | 132 #endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_ |
OLD | NEW |