Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: media/audio/mac/audio_low_latency_input_mac.h

Issue 358823002: changed the input low latency input impl to use client's requested buffer size on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang-format Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/audio/mac/audio_low_latency_input_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | media/audio/mac/audio_low_latency_input_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698