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. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 // Volume level from 0 to 1. | 139 // Volume level from 0 to 1. |
140 float volume_; | 140 float volume_; |
141 | 141 |
142 // Fixed playout hardware latency in frames. | 142 // Fixed playout hardware latency in frames. |
143 double hardware_latency_frames_; | 143 double hardware_latency_frames_; |
144 | 144 |
145 // The flag used to stop the streaming. | 145 // The flag used to stop the streaming. |
146 bool stopped_; | 146 bool stopped_; |
147 | 147 |
| 148 // The flag used to indicate if the AudioManager has been notified of a |
| 149 // potential device change. Reset to false during Start(). |
| 150 bool notified_for_possible_device_change_; |
| 151 |
148 // The input AudioUnit renders its data here. | 152 // The input AudioUnit renders its data here. |
149 scoped_ptr<uint8[]> input_buffer_list_storage_; | 153 scoped_ptr<uint8[]> input_buffer_list_storage_; |
150 AudioBufferList* input_buffer_list_; | 154 AudioBufferList* input_buffer_list_; |
151 | 155 |
152 // Holds the actual data for |input_buffer_list_|. | 156 // Holds the actual data for |input_buffer_list_|. |
153 scoped_ptr<AudioBus> input_bus_; | 157 scoped_ptr<AudioBus> input_bus_; |
154 | 158 |
155 // Container for retrieving data from AudioSourceCallback::OnMoreIOData(). | 159 // Container for retrieving data from AudioSourceCallback::OnMoreIOData(). |
156 scoped_ptr<AudioBus> output_bus_; | 160 scoped_ptr<AudioBus> output_bus_; |
157 | 161 |
158 DISALLOW_COPY_AND_ASSIGN(AUHALStream); | 162 DISALLOW_COPY_AND_ASSIGN(AUHALStream); |
159 }; | 163 }; |
160 | 164 |
161 } // namespace media | 165 } // namespace media |
162 | 166 |
163 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ | 167 #endif // MEDIA_AUDIO_MAC_AUDIO_AUHAL_MAC_H_ |
OLD | NEW |