Chromium Code Reviews| Index: media/audio/mac/audio_auhal_mac.h |
| diff --git a/media/audio/mac/audio_auhal_mac.h b/media/audio/mac/audio_auhal_mac.h |
| index 66feb8d0d11f43358626b5d657e2a51b4edcd00f..5f3b7eb05a022ff7c3a95870e80e344ad3aafcf2 100644 |
| --- a/media/audio/mac/audio_auhal_mac.h |
| +++ b/media/audio/mac/audio_auhal_mac.h |
| @@ -24,6 +24,7 @@ |
| #include "base/synchronization/lock.h" |
| #include "media/audio/audio_io.h" |
| #include "media/audio/audio_parameters.h" |
| +#include "media/base/audio_pull_fifo.h" |
|
scherkus (not reviewing)
2013/11/13 18:35:19
fwd decl instead?
DaleCurtis
2013/11/13 20:06:24
Done.
|
| namespace media { |
| @@ -83,6 +84,9 @@ class AUHALStream : public AudioOutputStream { |
| UInt32 number_of_frames, |
| AudioBufferList* io_data); |
| + // Called by either |audio_fifo_| or Render() to provide audio data. |
| + void ProvideInput(int frame_delay, AudioBus* dest); |
| + |
| // Helper method to enable input and output. |
| bool EnableIO(bool enable, UInt32 scope); |
| @@ -108,15 +112,15 @@ class AUHALStream : public AudioOutputStream { |
| double GetPlayoutLatency(const AudioTimeStamp* output_time_stamp); |
| // Our creator, the audio manager needs to be notified when we close. |
| - AudioManagerMac* manager_; |
| + AudioManagerMac* const manager_; |
| - AudioParameters params_; |
| + const AudioParameters params_; |
| // For convenience - same as in params_. |
| - int input_channels_; |
| - int output_channels_; |
| + const int input_channels_; |
| + const int output_channels_; |
| // Buffer-size. |
| - size_t number_of_frames_; |
| + const size_t number_of_frames_; |
| // Pointer to the object that will provide the audio samples. |
| AudioSourceCallback* source_; |
| @@ -131,7 +135,7 @@ class AUHALStream : public AudioOutputStream { |
| // The audio device to use with the AUHAL. |
| // We can potentially handle both input and output with this device. |
| - AudioDeviceID device_; |
| + const AudioDeviceID device_; |
| // The AUHAL Audio Unit which talks to |device_|. |
| AudioUnit audio_unit_; |
| @@ -145,10 +149,6 @@ class AUHALStream : public AudioOutputStream { |
| // The flag used to stop the streaming. |
| bool stopped_; |
| - // The flag used to indicate if the AudioManager has been notified of a |
| - // potential device change. Reset to false during Start(). |
| - bool notified_for_possible_device_change_; |
| - |
| // The input AudioUnit renders its data here. |
| scoped_ptr<uint8[]> input_buffer_list_storage_; |
| AudioBufferList* input_buffer_list_; |
| @@ -159,6 +159,13 @@ class AUHALStream : public AudioOutputStream { |
| // Container for retrieving data from AudioSourceCallback::OnMoreIOData(). |
| scoped_ptr<AudioBus> output_bus_; |
| + // Dynamically allocated FIFO used when CoreAudio asks for unexpected frame |
| + // sizes. |
| + scoped_ptr<AudioPullFifo> audio_fifo_; |
| + |
| + // Current buffer delay. Set by Render(). |
| + uint32 current_hardware_pending_bytes_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AUHALStream); |
| }; |