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

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

Issue 155863003: Add basic support for "googDucking" to getUserMedia on Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Initialize enumeration flag in constructor Created 6 years, 10 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
« no previous file with comments | « media/audio/win/audio_manager_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Utility methods for the Core Audio API on Windows. 5 // Utility methods for the Core Audio API on Windows.
6 // Always ensure that Core Audio is supported before using these methods. 6 // Always ensure that Core Audio is supported before using these methods.
7 // Use media::CoreAudioIsSupported() for this purpose. 7 // Use media::CoreAudioIsSupported() for this purpose.
8 // Also, all methods must be called on a valid COM thread. This can be done 8 // Also, all methods must be called on a valid COM thread. This can be done
9 // by using the base::win::ScopedCOMInitializer helper class. 9 // by using the base::win::ScopedCOMInitializer helper class.
10 10
(...skipping 19 matching lines...) Expand all
30 // Represents audio channel configuration constants as understood by Windows. 30 // Represents audio channel configuration constants as understood by Windows.
31 // E.g. KSAUDIO_SPEAKER_MONO. For a list of possible values see: 31 // E.g. KSAUDIO_SPEAKER_MONO. For a list of possible values see:
32 // http://msdn.microsoft.com/en-us/library/windows/hardware/ff537083(v=vs.85).as px 32 // http://msdn.microsoft.com/en-us/library/windows/hardware/ff537083(v=vs.85).as px
33 typedef uint32 ChannelConfig; 33 typedef uint32 ChannelConfig;
34 34
35 class MEDIA_EXPORT CoreAudioUtil { 35 class MEDIA_EXPORT CoreAudioUtil {
36 public: 36 public:
37 // Returns true if Windows Core Audio is supported. 37 // Returns true if Windows Core Audio is supported.
38 // Always verify that this method returns true before using any of the 38 // Always verify that this method returns true before using any of the
39 // methods in this class. 39 // methods in this class.
40 // WARNING: This function must be called once from the main thread before
41 // it is safe to call from other threads.
40 static bool IsSupported(); 42 static bool IsSupported();
41 43
42 // Converts between reference time to base::TimeDelta. 44 // Converts between reference time to base::TimeDelta.
43 // One reference-time unit is 100 nanoseconds. 45 // One reference-time unit is 100 nanoseconds.
44 // Example: double s = RefererenceTimeToTimeDelta(t).InMillisecondsF(); 46 // Example: double s = RefererenceTimeToTimeDelta(t).InMillisecondsF();
45 static base::TimeDelta RefererenceTimeToTimeDelta(REFERENCE_TIME time); 47 static base::TimeDelta RefererenceTimeToTimeDelta(REFERENCE_TIME time);
46 48
47 // Returns AUDCLNT_SHAREMODE_EXCLUSIVE if --enable-exclusive-mode is used 49 // Returns AUDCLNT_SHAREMODE_EXCLUSIVE if --enable-exclusive-mode is used
48 // as command-line flag and AUDCLNT_SHAREMODE_SHARED otherwise (default). 50 // as command-line flag and AUDCLNT_SHAREMODE_SHARED otherwise (default).
49 static AUDCLNT_SHAREMODE GetShareMode(); 51 static AUDCLNT_SHAREMODE GetShareMode();
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 226
225 private: 227 private:
226 CoreAudioUtil() {} 228 CoreAudioUtil() {}
227 ~CoreAudioUtil() {} 229 ~CoreAudioUtil() {}
228 DISALLOW_COPY_AND_ASSIGN(CoreAudioUtil); 230 DISALLOW_COPY_AND_ASSIGN(CoreAudioUtil);
229 }; 231 };
230 232
231 } // namespace media 233 } // namespace media
232 234
233 #endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ 235 #endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_
OLDNEW
« no previous file with comments | « media/audio/win/audio_manager_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698