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

Side by Side Diff: media/audio/win/device_enumeration_win.h

Issue 9566002: On windows, create PCMWaveInAudioInputStream instance with correct device ID. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the solution suggested by Henrik. Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_
6 #define MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_ 6 #define MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_
7 7
8 #include <string>
9
8 #include "media/audio/audio_device_name.h" 10 #include "media/audio/audio_device_name.h"
9 11
10 // Returns a list of audio input device structures (name and unique device ID) 12 // Returns a list of audio input device structures (name and unique device ID)
11 // using the MMDevice API which is supported on Windows Vista and higher. 13 // using the MMDevice API which is supported on Windows Vista and higher.
12 // Example record in the output list: 14 // Example record in the output list:
13 // - device_name: "Microphone (Realtek High Definition Audio)". 15 // - device_name: "Microphone (Realtek High Definition Audio)".
14 // - unique_id: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}" 16 // - unique_id: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}"
15 // This method must be called from a COM thread using MTA. 17 // This method must be called from a COM thread using MTA.
16 bool GetInputDeviceNamesWin(media::AudioDeviceNames* device_names); 18 bool GetInputDeviceNamesWin(media::AudioDeviceNames* device_names);
17 19
18 // Returns a list of audio input device structures (name and unique device ID) 20 // Returns a list of audio input device structures (name and unique device ID)
19 // using the WaveIn API which is supported on Windows XP and higher. 21 // using the WaveIn API which is supported on Windows XP and higher.
20 // Example record in the output list: 22 // Example record in the output list:
21 // - device_name: "Microphone (Realtek High Defini". 23 // - device_name: "Microphone (Realtek High Defini".
22 // - unique_id: "Microphone (Realtek High Defini" (same as friendly name). 24 // - unique_id: "Microphone (Realtek High Defini" (same as friendly name).
23 bool GetInputDeviceNamesWinXP(media::AudioDeviceNames* device_names); 25 bool GetInputDeviceNamesWinXP(media::AudioDeviceNames* device_names);
24 26
27 // Converts a device ID generated by |GetInputDeviceNamesWin()| to the
28 // corresponding ID by |GetInputDeviceNamesWinXP()|. Returns an empty string on
29 // failure.
30 // Example input and output:
31 // - input ID: "{0.0.1.00000000}.{8db6020f-18e3-4f25-b6f5-7726c9122574}"
32 // - output ID: "Microphone (Realtek High Defini"
33 std::string ConvertToWinXPDeviceId(const std::string& device_id);
34
25 #endif // MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_ 35 #endif // MEDIA_AUDIO_WIN_DEVICE_ENUMERATION_WIN_H_
26 36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698