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

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

Issue 510073002: Reland 501823002: Used native deinterleaved and float point format for the input streams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uint8 -> float Created 6 years, 4 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 c8e43fa7ff70f06d6f39836392460334814244b6..53d8cb4995c6c23927bfa40c75693ac48670509c 100644
--- a/media/audio/mac/audio_low_latency_input_mac.h
+++ b/media/audio/mac/audio_low_latency_input_mac.h
@@ -45,10 +45,10 @@
#include "media/audio/agc_audio_stream.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-#include "media/base/audio_block_fifo.h"
namespace media {
+class AudioBlockFifo;
class AudioBus;
class AudioManagerMac;
class DataBuffer;
@@ -78,7 +78,7 @@ class AUAudioInputStream : public AgcAudioStream<AudioInputStream> {
bool started() const { return started_; }
AudioUnit audio_unit() { return audio_unit_; }
- AudioBufferList* audio_buffer_list() { return &audio_buffer_list_; }
+ AudioBufferList* audio_buffer_list() { return audio_buffer_list_.get(); }
private:
// AudioOutputUnit callback.
@@ -90,7 +90,8 @@ class AUAudioInputStream : public AgcAudioStream<AudioInputStream> {
AudioBufferList* io_data);
// Pushes recorded data to consumer of the input audio stream.
- OSStatus Provide(UInt32 number_of_frames, AudioBufferList* io_data,
+ OSStatus Provide(UInt32 number_of_frames,
+ AudioBufferList* io_data,
const AudioTimeStamp* time_stamp);
// Gets the fixed capture hardware latency and store it during initialization.
@@ -132,11 +133,11 @@ class AUAudioInputStream : public AgcAudioStream<AudioInputStream> {
AudioDeviceID input_device_id_;
// Provides a mechanism for encapsulating one or more buffers of audio data.
- AudioBufferList audio_buffer_list_;
+ scoped_ptr<AudioBufferList, base::FreeDeleter> audio_buffer_list_;
// Temporary storage for recorded data. The InputProc() renders into this
// array as soon as a frame of the desired buffer size has been recorded.
- scoped_ptr<uint8[]> audio_data_buffer_;
+ scoped_ptr<float, base::AlignedFreeDeleter> audio_data_buffer_;
// True after successfull Start(), false after successful Stop().
bool started_;
@@ -148,8 +149,12 @@ class AUAudioInputStream : public AgcAudioStream<AudioInputStream> {
// when querying the volume of each channel.
int number_of_channels_in_frame_;
- // FIFO used to accumulates recorded data.
- media::AudioBlockFifo fifo_;
+ // Dynamically allocated FIFO used when CoreAudio asks for unexpected frame
+ // sizes.
+ scoped_ptr<AudioBlockFifo> fifo_;
+
+ // AudioBus wrapper for delievering data via AudioSourceCallback::OnData().
+ scoped_ptr<AudioBus> audio_wrapper_;
// Used to defer Start() to workaround http://crbug.com/160920.
base::CancelableClosure deferred_start_cb_;
« 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