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

Unified Diff: media/audio/win/audio_manager_win.cc

Issue 2667843007: Revert a behavioral change in AudioManagerWin::GetInputStreamParameters. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_manager_win.cc
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc
index b5b262fb414afd8158980ca12e84270969c68633..119ac3a2f4a2f078ce44135e499de67498f46a57 100644
--- a/media/audio/win/audio_manager_win.cc
+++ b/media/audio/win/audio_manager_win.cc
@@ -285,7 +285,14 @@ AudioParameters AudioManagerWin::GetInputStreamParameters(
if (FAILED(hr) || !parameters.IsValid()) {
LOG(WARNING) << "Unable to get preferred audio params for " << device_id
<< " 0x" << std::hex << hr;
- return parameters;
+ // TODO(tommi): We appear to have callers to GetInputStreamParameters that
+ // rely on getting valid audio parameters returned for an invalid or
+ // unavailable device. We should track down those code paths (it is likely
+ // that they actually don't need a real device but depend on the audio
+ // code path somehow for a configuration - e.g. tab capture).
+ parameters =
+ AudioParameters(AudioParameters::AUDIO_PCM_LINEAR,
+ CHANNEL_LAYOUT_STEREO, 48000, 16, kFallbackBufferSize);
}
int user_buffer_size = GetUserBufferSize();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698