summaryrefslogtreecommitdiffstats
path: root/media/audio/mock_audio_manager.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-04 13:25:23 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-04 13:25:23 +0000
commit578f35f9004eb03dc2088e85cc6ab75f4f14277f (patch)
tree806790fd9fa434315569c8baae7df67db47e9d9b /media/audio/mock_audio_manager.cc
parent5c8e43b6572257c672865f26fc6b2fe3a92e6f51 (diff)
downloadchromium_src-578f35f9004eb03dc2088e85cc6ab75f4f14277f.zip
chromium_src-578f35f9004eb03dc2088e85cc6ab75f4f14277f.tar.gz
chromium_src-578f35f9004eb03dc2088e85cc6ab75f4f14277f.tar.bz2
Add GetOutputStreamParameters, GetAssociatedOutputDeviceID to AudioManager.
- GetOutputStreamParameters(device_id). Does the same thing as GetDefaultOutputStreamParameters except that it allows the caller to choose the device. - GetAssociatedOutputDeviceID(input_device_id): Does a best effort dig to match an output device to an input device (both devices belong to the same audio card). This is useful for heuristic algorithms to distinguish headphones from webcams (w/mic). GetOutputStreamParameters is fully implemented on Windows but works only for the default device on other platforms (same as GetDefaultOutputStreamParameters). - This is OK for now since we don't rely on GetOutputStreamParameters yet. Added implementation of GetAssociatedOutputDeviceID on Windows. Default implementation of GetAssociatedOutputDeviceID just returns an empty string (i.e. assume the default output device). Did a little bit of a cleanup in the WASAPI/CoreAudio implementation on Windows where we were doing the same operation unnecessarily often. BUG=276894 R=henrika@chromium.org Review URL: https://codereview.chromium.org/23523023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/mock_audio_manager.cc')
-rw-r--r--media/audio/mock_audio_manager.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/audio/mock_audio_manager.cc b/media/audio/mock_audio_manager.cc
index 8e223fc..0fd345f 100644
--- a/media/audio/mock_audio_manager.cc
+++ b/media/audio/mock_audio_manager.cc
@@ -79,9 +79,19 @@ AudioParameters MockAudioManager::GetDefaultOutputStreamParameters() {
return AudioParameters();
}
+AudioParameters MockAudioManager::GetOutputStreamParameters(
+ const std::string& device_id) {
+ return AudioParameters();
+}
+
AudioParameters MockAudioManager::GetInputStreamParameters(
const std::string& device_id) {
return AudioParameters();
}
+std::string MockAudioManager::GetAssociatedOutputDeviceID(
+ const std::string& input_device_id) {
+ return std::string();
+}
+
} // namespace media.