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( |