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

Unified Diff: media/audio/audio_device_thread.cc

Issue 10832285: Switch OnMoreData() to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review ready. Created 8 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
Index: media/audio/audio_device_thread.cc
diff --git a/media/audio/audio_device_thread.cc b/media/audio/audio_device_thread.cc
index 3e14d3de53929ae88488fe03fc200c325529ca89..cccd7aff6344b4d913be76a91918097e7acc18c7 100644
--- a/media/audio/audio_device_thread.cc
+++ b/media/audio/audio_device_thread.cc
@@ -197,9 +197,7 @@ void AudioDeviceThread::Callback::InitializeOnAudioThread() {
MapSharedMemory();
DCHECK(shared_memory_.memory() != NULL);
- // TODO(dalecurtis): Instead of creating a new AudioBus and memcpy'ing into
- // the shared memory we should wrap the shared memory.
- audio_bus_ = AudioBus::Create(audio_parameters_);
+ audio_bus_ = AudioBus::WrapMemory(audio_parameters_, shared_memory_.memory());
Chris Rogers 2012/08/24 20:20:26 I think we should have a sanity check that the aud
DaleCurtis 2012/08/24 23:53:12 Done.
}
} // namespace media.

Powered by Google App Engine
This is Rietveld 408576698