| 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..c7895d19fc207a227349c962a9951e73f7afecf9 100644
|
| --- a/content/renderer/media/render_audiosourceprovider.cc
|
| +++ b/content/renderer/media/render_audiosourceprovider.cc
|
| @@ -6,12 +6,14 @@
|
|
|
| #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 std::vector;
|
| using WebKit::WebVector;
|
|
|
| -RenderAudioSourceProvider::RenderAudioSourceProvider()
|
| +RenderAudioSourceProvider::RenderAudioSourceProvider(
|
| + AudioDeviceFactoryInterface* audio_device_factory)
|
| : is_initialized_(false),
|
| channels_(0),
|
| sample_rate_(0),
|
| @@ -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_ = audio_device_factory->Create();
|
| }
|
|
|
| void RenderAudioSourceProvider::setClient(
|
|
|