OLD | NEW |
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::CoreAudioUtil::IsSupported() for this purpose. | 7 // Use media::CoreAudioUtil::IsSupported() 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 |
11 #ifndef MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ | 11 #ifndef MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ |
12 #define MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ | 12 #define MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ |
13 | 13 |
14 #include <audioclient.h> | 14 #include <audioclient.h> |
15 #include <mmdeviceapi.h> | 15 #include <mmdeviceapi.h> |
16 #include <stdint.h> | 16 #include <stdint.h> |
17 #include <string> | 17 #include <string> |
18 | 18 |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "base/win/scoped_comptr.h" | 21 #include "base/win/scoped_comptr.h" |
22 #include "media/audio/audio_device_name.h" | 22 #include "media/audio/audio_device_name.h" |
23 #include "media/audio/audio_parameters.h" | 23 #include "media/base/audio_parameters.h" |
24 #include "media/base/media_export.h" | 24 #include "media/base/media_export.h" |
25 | 25 |
26 using base::win::ScopedComPtr; | 26 using base::win::ScopedComPtr; |
27 | 27 |
28 namespace media { | 28 namespace media { |
29 | 29 |
30 | 30 |
31 // Represents audio channel configuration constants as understood by Windows. | 31 // Represents audio channel configuration constants as understood by Windows. |
32 // E.g. KSAUDIO_SPEAKER_MONO. For a list of possible values see: | 32 // E.g. KSAUDIO_SPEAKER_MONO. For a list of possible values see: |
33 // http://msdn.microsoft.com/en-us/library/windows/hardware/ff537083(v=vs.85).as
px | 33 // http://msdn.microsoft.com/en-us/library/windows/hardware/ff537083(v=vs.85).as
px |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // The special audio session identifier we use when opening up the default | 243 // The special audio session identifier we use when opening up the default |
244 // communication device. This has the effect that a separate volume control | 244 // communication device. This has the effect that a separate volume control |
245 // will be shown in the system's volume mixer and control over ducking and | 245 // will be shown in the system's volume mixer and control over ducking and |
246 // visually observing the behavior of ducking, is easier. | 246 // visually observing the behavior of ducking, is easier. |
247 // Use with |SharedModeInitialize|. | 247 // Use with |SharedModeInitialize|. |
248 extern const GUID kCommunicationsSessionId; | 248 extern const GUID kCommunicationsSessionId; |
249 | 249 |
250 } // namespace media | 250 } // namespace media |
251 | 251 |
252 #endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ | 252 #endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_ |
OLD | NEW |