Index: components/copresence/mediums/audio/audio_recorder.cc |
diff --git a/components/copresence/mediums/audio/audio_recorder.cc b/components/copresence/mediums/audio/audio_recorder.cc |
index 0946ba86bf80cf4caa0526277bd617993523d180..4d36651c4c0cc7c0580163eb9d8e3c55ce371177 100644 |
--- a/components/copresence/mediums/audio/audio_recorder.cc |
+++ b/components/copresence/mediums/audio/audio_recorder.cc |
@@ -39,7 +39,7 @@ void AudioBusToString(scoped_ptr<media::AudioBus> source, std::string* buffer) { |
// converts our samples to the required sample rate, interleaves the samples |
// and sends them to the whispernet decoder to process. |
void ProcessSamples(scoped_ptr<media::AudioBus> bus, |
- const AudioRecorder::DecodeSamplesCallback& callback) { |
+ const AudioRecorder::RecordedSamplesCallback& callback) { |
std::string samples; |
AudioBusToString(bus.Pass(), &samples); |
content::BrowserThread::PostTask( |
@@ -50,15 +50,16 @@ void ProcessSamples(scoped_ptr<media::AudioBus> bus, |
// Public methods. |
-AudioRecorder::AudioRecorder(const DecodeSamplesCallback& decode_callback) |
+AudioRecorder::AudioRecorder() |
: is_recording_(false), |
stream_(NULL), |
- decode_callback_(decode_callback), |
+ temp_conversion_buffer_(NULL), |
total_buffer_frames_(0), |
buffer_frame_index_(0) { |
} |
-void AudioRecorder::Initialize() { |
+void AudioRecorder::Initialize(const RecordedSamplesCallback& decode_callback) { |
+ decode_callback_ = decode_callback; |
media::AudioManager::Get()->GetTaskRunner()->PostTask( |
FROM_HERE, |
base::Bind(&AudioRecorder::InitializeOnAudioThread, |