Index: media/audio/mac/audio_low_latency_input_mac.h |
diff --git a/media/audio/mac/audio_low_latency_input_mac.h b/media/audio/mac/audio_low_latency_input_mac.h |
index 7726227eae5efce056c259d35178a0bb6fd63b42..059cf1f808b59dca4833038a759276df51cc54bb 100644 |
--- a/media/audio/mac/audio_low_latency_input_mac.h |
+++ b/media/audio/mac/audio_low_latency_input_mac.h |
@@ -45,11 +45,11 @@ |
#include "media/audio/agc_audio_stream.h" |
#include "media/audio/audio_io.h" |
#include "media/audio/audio_parameters.h" |
-#include "media/base/seekable_buffer.h" |
namespace media { |
class AudioBus; |
+class AudioFifo; |
class AudioManagerMac; |
class DataBuffer; |
@@ -59,7 +59,6 @@ class AUAudioInputStream : public AgcAudioStream<AudioInputStream> { |
// the audio manager who is creating this object. |
AUAudioInputStream(AudioManagerMac* manager, |
const AudioParameters& input_params, |
- const AudioParameters& output_params, |
AudioDeviceID audio_device_id); |
// The dtor is typically called by the AudioManager only and it is usually |
// triggered by calling AudioInputStream::Close(). |
@@ -115,7 +114,7 @@ class AUAudioInputStream : public AgcAudioStream<AudioInputStream> { |
AudioManagerMac* manager_; |
// Contains the desired number of audio frames in each callback. |
- size_t number_of_frames_; |
+ const size_t number_of_frames_; |
// Pointer to the object that will receive the recorded audio samples. |
AudioInputCallback* sink_; |
@@ -145,31 +144,24 @@ class AUAudioInputStream : public AgcAudioStream<AudioInputStream> { |
// Fixed capture hardware latency in frames. |
double hardware_latency_frames_; |
- // Delay due to the FIFO in bytes. |
- int fifo_delay_bytes_; |
- |
// The number of channels in each frame of audio data, which is used |
// when querying the volume of each channel. |
int number_of_channels_in_frame_; |
- // Accumulates recorded data packets until the requested size has been stored. |
- scoped_ptr<media::SeekableBuffer> fifo_; |
- |
- // Intermediate storage of data from the FIFO before sending it to the |
- // client using the OnData() callback. |
- scoped_refptr<media::DataBuffer> data_; |
- |
- // The client requests that the recorded data shall be delivered using |
- // OnData() callbacks where each callback contains this amount of bytes. |
- int requested_size_bytes_; |
+ // Dynamically allocated FIFO used to accumulates recorded data when |
+ // CoreAudio delivers non-requested frame size of data. |
+ scoped_ptr<media::AudioFifo> fifo_; |
// Used to defer Start() to workaround http://crbug.com/160920. |
base::CancelableClosure deferred_start_cb_; |
- // Extra audio bus used for storage of deinterleaved data for the OnData |
- // callback. |
+ // Audio bus used for storage of deinterleaved data for the OnData callback. |
scoped_ptr<media::AudioBus> audio_bus_; |
+ // Audio bus used to convert interleaved data to deinterleaved data before |
+ // storing data to FIFO or delivering data via OnData callback. |
+ scoped_ptr<media::AudioBus> audio_wrapper_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream); |
}; |