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

Unified Diff: media/audio/audio_manager_base.cc

Issue 1769933002: Looking up device id by session id for AudioRendererMixerInput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and bug ref to remove AudioManagerBase dependency Created 4 years, 8 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 | « media/audio/audio_manager_base.h ('k') | media/audio/audio_output_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index 9e884423bee84a514f6835e23b65a7c52e148d9c..8a6acc2e7bc89afafedffcb1e857f3c653063028 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -77,10 +77,18 @@ class AudioManagerBase::CompareByParams {
const DispatcherParams* dispatcher_;
};
-static bool IsDefaultDeviceId(const std::string& device_id) {
+// static
+bool AudioManagerBase::IsDefaultDeviceId(const std::string& device_id) {
return device_id.empty() || device_id == AudioManagerBase::kDefaultDeviceId;
}
+// static
+bool AudioManagerBase::UseSessionIdToSelectDevice(
+ int session_id,
+ const std::string& device_id) {
+ return session_id && device_id.empty();
+}
+
AudioManagerBase::AudioManagerBase(AudioLogFactory* audio_log_factory)
: max_num_output_streams_(kDefaultMaxOutputStreams),
max_num_input_streams_(kDefaultMaxInputStreams),
« no previous file with comments | « media/audio/audio_manager_base.h ('k') | media/audio/audio_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698