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

Unified Diff: content/renderer/media/render_audiosourceprovider.cc

Issue 10537121: Adds AudioDevice factory for all audio clients in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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
Index: content/renderer/media/render_audiosourceprovider.cc
diff --git a/content/renderer/media/render_audiosourceprovider.cc b/content/renderer/media/render_audiosourceprovider.cc
index 10803f8a57e834bbbad92a443b36fa5a76ab5363..039f75fb8f8c96dc3f01edf30ae50add4b65ebc3 100644
--- a/content/renderer/media/render_audiosourceprovider.cc
+++ b/content/renderer/media/render_audiosourceprovider.cc
@@ -6,8 +6,10 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "content/renderer/media/audio_device_factory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProviderClient.h"
+using content::AudioDeviceFactory;
using std::vector;
using WebKit::WebVector;
@@ -19,12 +21,11 @@ RenderAudioSourceProvider::RenderAudioSourceProvider()
volume_(1.0),
renderer_(NULL),
client_(NULL) {
- // We create the AudioDevice here because it must be created in the
- // main thread. But we don't yet know the audio format (sample-rate, etc.)
- // at this point. Later, when Initialize() is called, we have
- // the audio format information and call the AudioDevice::Initialize()
- // method to fully initialize it.
- default_sink_ = new AudioDevice();
+ // We create the AudioDevice here using the factory. But we don't yet know
+ // the audio format (sample-rate, etc.) at this point. Later, when
+ // Initialize() is called, we have the audio format information and call
+ // the AudioDevice::Initialize() method to fully initialize it.
+ default_sink_ = AudioDeviceFactory::Create();
}
void RenderAudioSourceProvider::setClient(
« no previous file with comments | « content/renderer/media/render_audiosourceprovider.h ('k') | content/renderer/media/renderer_webaudiodevice_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698