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

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

Issue 1097553003: Switch to STA mode for audio thread and WASAPI I/O streams. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 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_AUDIO_MANAGER_WIN_H_ 5 #ifndef MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
6 #define MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ 6 #define MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "media/audio/audio_manager_base.h" 10 #include "media/audio/audio_manager_base.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 enum EnumerationType { 57 enum EnumerationType {
58 kMMDeviceEnumeration, 58 kMMDeviceEnumeration,
59 kWaveEnumeration, 59 kWaveEnumeration,
60 }; 60 };
61 61
62 // Allow unit test to modify the utilized enumeration API. 62 // Allow unit test to modify the utilized enumeration API.
63 friend class AudioManagerTest; 63 friend class AudioManagerTest;
64 64
65 EnumerationType enumeration_type_; 65 EnumerationType enumeration_type_;
66 EnumerationType enumeration_type() { return enumeration_type_; } 66 EnumerationType enumeration_type() { return enumeration_type_; }
67 void SetEnumerationType(EnumerationType type) { 67 void set_enumeration_type(EnumerationType type) {
68 enumeration_type_ = type; 68 enumeration_type_ = type;
69 } 69 }
70 70
71 inline bool core_audio_supported() const { 71 inline bool core_audio_supported() const {
72 return enumeration_type_ == kMMDeviceEnumeration; 72 return enumeration_type_ == kMMDeviceEnumeration;
73 } 73 }
74 74
75 // Returns a PCMWaveInAudioInputStream instance or NULL on failure. 75 // Returns a PCMWaveInAudioInputStream instance or NULL on failure.
76 // This method converts MMDevice-style device ID to WaveIn-style device ID if 76 // This method converts MMDevice-style device ID to WaveIn-style device ID if
77 // necessary. 77 // necessary.
(...skipping 12 matching lines...) Expand all
90 90
91 // Listen for output device changes. 91 // Listen for output device changes.
92 scoped_ptr<AudioDeviceListenerWin> output_device_listener_; 92 scoped_ptr<AudioDeviceListenerWin> output_device_listener_;
93 93
94 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin); 94 DISALLOW_COPY_AND_ASSIGN(AudioManagerWin);
95 }; 95 };
96 96
97 } // namespace media 97 } // namespace media
98 98
99 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_ 99 #endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698