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

Unified Diff: media/audio/win/core_audio_util_win.h

Issue 367923004: Turn audio ducking on by default on Windows again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: media/audio/win/core_audio_util_win.h
diff --git a/media/audio/win/core_audio_util_win.h b/media/audio/win/core_audio_util_win.h
index 8727f97b51cd6c76be4e0a74c7c847f98b5fcc52..4e935318d365bf0ba10683d68d287eb37d36470f 100644
--- a/media/audio/win/core_audio_util_win.h
+++ b/media/audio/win/core_audio_util_win.h
@@ -200,10 +200,15 @@ class MEDIA_EXPORT CoreAudioUtil {
// If a valid event is provided in |event_handle|, the client will be
// initialized for event-driven buffer handling. If |event_handle| is set to
// NULL, event-driven buffer handling is not utilized.
+ // This function will initialize the audio client as part of the default
+ // audio session if NULL is passed for |session_guid|, otherwise the client
+ // will be associated with the specified session.
static HRESULT SharedModeInitialize(IAudioClient* client,
const WAVEFORMATPCMEX* format,
HANDLE event_handle,
- uint32* endpoint_buffer_size);
+ uint32* endpoint_buffer_size,
+ const GUID* session_guid);
+
// TODO(henrika): add ExclusiveModeInitialize(...)
// Create an IAudioRenderClient client for an existing IAudioClient given by
@@ -230,6 +235,13 @@ class MEDIA_EXPORT CoreAudioUtil {
DISALLOW_COPY_AND_ASSIGN(CoreAudioUtil);
};
+// The special audio session identifier we use when opening up the default
+// communication device. This has the effect that a separate volume control
+// will be shown in the system's volume mixer and control over ducking and
+// visually observing the behavior of ducking, is easier.
+// Use with |SharedModeInitialize|.
+extern const GUID kCommunicationsSessionId;
+
} // namespace media
#endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698