Ken Thomases : winecoreaudio:
Report when the render callback is just providing silence.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Dec 21 10:36:34 CST 2006
Module: wine
Branch: master
Commit: 0bb13dd31c40eeda294935285629fced1f6fa3bd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0bb13dd31c40eeda294935285629fced1f6fa3bd
Author: Ken Thomases <ken at codeweavers.com>
Date: Thu Dec 21 03:49:24 2006 -0600
winecoreaudio: Report when the render callback is just providing silence.
---
dlls/winmm/winecoreaudio/audio.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/winmm/winecoreaudio/audio.c b/dlls/winmm/winecoreaudio/audio.c
index c967ebb..ae1067a 100644
--- a/dlls/winmm/winecoreaudio/audio.c
+++ b/dlls/winmm/winecoreaudio/audio.c
@@ -63,6 +63,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave);
typedef void *AudioUnit;
/* From AudioUnit/AUComponents.h */
+enum
+{
+ kAudioUnitRenderAction_OutputIsSilence = (1 << 4),
+ /* provides hint on return from Render(): if set the buffer contains all zeroes */
+};
typedef UInt32 AudioUnitRenderActionFlags;
/* only allow 10 output devices through this driver, this ought to be adequate */
@@ -1441,6 +1446,8 @@ OSStatus CoreAudio_woAudioUnitIOProc(voi
}
else
{
+ if (!dataProvided)
+ *ioActionFlags |= kAudioUnitRenderAction_OutputIsSilence;
memset((char*)ioData->mBuffers[0].mData + dataProvided, 0, dataNeeded);
dataProvided += dataNeeded;
dataNeeded = 0;
More information about the wine-cvs
mailing list