Index: content/renderer/pepper/pepper_platform_audio_output_impl.cc |
diff --git a/content/renderer/pepper/pepper_platform_audio_output_impl.cc b/content/renderer/pepper/pepper_platform_audio_output_impl.cc |
index 6681d0aab61387dc4f1b472bb38d7e6280ef43ab..2a6dbf6b9753ecba004bac49c71bec462c7893e4 100644 |
--- a/content/renderer/pepper/pepper_platform_audio_output_impl.cc |
+++ b/content/renderer/pepper/pepper_platform_audio_output_impl.cc |
@@ -11,9 +11,9 @@ |
#include "build/build_config.h" |
#include "content/common/child_process.h" |
#include "content/common/media/audio_messages.h" |
-#include "content/renderer/media/audio_hardware.h" |
#include "content/renderer/media/audio_message_filter.h" |
#include "content/renderer/render_thread_impl.h" |
+#include "media/base/audio_hardware_config.h" |
#include "media/base/media_switches.h" |
namespace content { |
@@ -125,14 +125,17 @@ bool PepperPlatformAudioOutputImpl::Initialize( |
media::AudioParameters::Format format; |
const int kMaxFramesForLowLatency = 2047; |
+ media::AudioHardwareConfig* hardware_config = |
+ RenderThreadImpl::current()->GetAudioHardwareConfig(); |
+ |
const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
if (!cmd_line->HasSwitch(switches::kDisableAudioOutputResampler)) { |
// Rely on AudioOutputResampler to handle any inconsistencies between the |
// hardware params required for low latency and the requested params. |
format = media::AudioParameters::AUDIO_PCM_LOW_LATENCY; |
- } else if (sample_rate == GetAudioOutputSampleRate() && |
+ } else if (sample_rate == hardware_config->GetOutputSampleRate() && |
frames_per_buffer <= kMaxFramesForLowLatency && |
- frames_per_buffer % content::GetAudioOutputBufferSize() == 0) { |
+ frames_per_buffer % hardware_config->GetOutputBufferSize() == 0) { |
// Use the low latency back end if the client request is compatible, and |
// the sample count is low enough to justify using AUDIO_PCM_LOW_LATENCY. |
format = media::AudioParameters::AUDIO_PCM_LOW_LATENCY; |