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

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: Rebase, update tests, logging and documentation 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..28eded171dc55b6ce4852af24609ef363731bec2 100644
--- a/media/audio/win/core_audio_util_win.h
+++ b/media/audio/win/core_audio_util_win.h
@@ -200,10 +200,21 @@ 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.
static HRESULT SharedModeInitialize(IAudioClient* client,
no longer working on chromium 2014/07/08 10:42:35 it seems that this method is not used in productio
tommi (sloooow) - chröme 2014/07/08 12:30:56 I removed it and renamed the other one to SharedMo
const WAVEFORMATPCMEX* format,
HANDLE event_handle,
uint32* endpoint_buffer_size);
+
+ // Same as SharedModeInitialize with the addition of being able to specify
+ // a specific audio session to initialize the audio client as part of.
+ // NULL can be passed for |session_guid| which represents the default session.
+ static HRESULT SharedModeInitializeWithSession(IAudioClient* client,
+ const WAVEFORMATPCMEX* format,
+ HANDLE event_handle,
+ uint32* endpoint_buffer_size,
+ const GUID* session_guid);
// TODO(henrika): add ExclusiveModeInitialize(...)
// Create an IAudioRenderClient client for an existing IAudioClient given by
@@ -230,6 +241,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 |SharedModeInitializeWithSession|.
+extern const GUID kCommunicationsSessionId;
+
} // namespace media
#endif // MEDIA_AUDIO_WIN_CORE_AUDIO_UTIL_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698