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

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

Issue 12049070: Avoids irregular OnMoreData callbacks on Windows using Core Audio (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed audio glitch at startup Created 7 years, 11 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 c8a37d6e2f6307bfa2c43d5b6bae0dcf939462c7..6dbdbfb2625d48ed8b922e8dd2fec98d2f733a23 100644
--- a/media/audio/win/core_audio_util_win.h
+++ b/media/audio/win/core_audio_util_win.h
@@ -104,6 +104,13 @@ class MEDIA_EXPORT CoreAudioUtil {
static HRESULT GetSharedModeMixFormat(IAudioClient* client,
WAVEFORMATPCMEX* format);
+ // Get the mix format that the audio engine uses internally for processing
+ // of shared-mode streams using the default IMMDevice where flow direction
+ // and role is define by |data_flow| and |role|.
+ static HRESULT GetDefaultSharedModeMixFormat(EDataFlow data_flow,
+ ERole role,
+ WAVEFORMATPCMEX* format);
+
// Returns true if the specified |client| supports the format in |format|
// for the given |share_mode| (shared or exclusive).
static bool IsFormatSupported(IAudioClient* client,
@@ -156,6 +163,12 @@ class MEDIA_EXPORT CoreAudioUtil {
static ScopedComPtr<IAudioCaptureClient> CreateCaptureClient(
IAudioClient* client);
+ // Fills up the endpoint rendering buffer with silence for an existing
+ // IAudioClient given by |client| and a corresponding IAudioRenderClient
+ // given by |render_client|.
+ static bool FillRenderEndpointBufferWithSilence(
+ IAudioClient* client, IAudioRenderClient* render_client);
+
private:
CoreAudioUtil() {}
~CoreAudioUtil() {}

Powered by Google App Engine
This is Rietveld 408576698