Chromium Code Reviews| Index: content/browser/renderer_host/media/media_stream_manager.cc |
| diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc |
| index 4a0e1caf793401382218d8437f5fc448ef921e09..3adfaf4eaf53b63ee4a685221bb74b1bc2374fce 100644 |
| --- a/content/browser/renderer_host/media/media_stream_manager.cc |
| +++ b/content/browser/renderer_host/media/media_stream_manager.cc |
| @@ -25,7 +25,7 @@ |
| #include "content/public/common/media_stream_request.h" |
| #include "googleurl/src/gurl.h" |
| #include "media/audio/audio_manager_base.h" |
| -#include "media/audio/audio_util.h" |
| +#include "media/audio/audio_parameters.h" |
| #include "media/base/channel_layout.h" |
| #if defined(OS_WIN) |
| @@ -852,7 +852,9 @@ void MediaStreamManager::DevicesAccepted(const std::string& label, |
| // mirroring, we don't go through EnumerateDevices where these are usually |
| // initialized. |
| if (device_info.device.type == content::MEDIA_TAB_AUDIO_CAPTURE) { |
| - int sample_rate = media::GetAudioHardwareSampleRate(); |
| + const media::AudioParameters parameters = |
| + audio_manager_->GetDefaultOutputStreamParameters(); |
|
tommi (sloooow) - chröme
2013/03/01 11:29:29
Can we move this outside the loop?
no longer working on chromium
2013/03/01 16:44:33
We call GetDefaultOutputStreamParameters() only fo
|
| + int sample_rate = parameters.sample_rate(); |
| // If we weren't able to get the native sampling rate, it most likely |
| // means the system did not have an output device, but for mirroring we |
| // still want to startup the audio engine, so set reasonable defaults. |