aboutsummaryrefslogtreecommitdiff
path: root/pd/portaudio/pa_win_wmme
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2006-06-03 19:13:08 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2006-06-03 19:13:08 +0000
commitbeb2211b63b4b80ee07a807e5ffdd441aeea6354 (patch)
tree876eb052d5cec7755053328a470c75e0638b6b94 /pd/portaudio/pa_win_wmme
parenteb976fa09171036cbaeaabf920708b2d39c49acc (diff)
FFT package selection
Zmoelnig's multi-'$' patch big-soundfile support Patch to set open directories (openpanel, savepanel) patch to allow funny characters in extern names fixed makefile.in to support intel mac svn path=/trunk/; revision=5164
Diffstat (limited to 'pd/portaudio/pa_win_wmme')
-rw-r--r--pd/portaudio/pa_win_wmme/pa_win_wmme.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/pd/portaudio/pa_win_wmme/pa_win_wmme.c b/pd/portaudio/pa_win_wmme/pa_win_wmme.c
index c3d7fe6d..1a9ea59e 100644
--- a/pd/portaudio/pa_win_wmme/pa_win_wmme.c
+++ b/pd/portaudio/pa_win_wmme/pa_win_wmme.c
@@ -1,5 +1,5 @@
/*
- * $Id: pa_win_wmme.c,v 1.6.2.86 2004/02/21 11:38:28 rossbencina Exp $
+ * $Id: pa_win_wmme.c,v 1.6.2.88 2006/02/16 01:56:45 rossbencina Exp $
* pa_win_wmme.c
* Implementation of PortAudio for Windows MultiMedia Extensions (WMME)
*
@@ -128,6 +128,13 @@ Non-critical stuff for the future:
#pragma comment(lib, "winmm.lib")
#endif
+/*
+ provided in newer platform sdks
+ */
+#ifndef DWORD_PTR
+#define DWORD_PTR DWORD
+#endif
+
/************************************************* Constants ********/
#define PA_MME_USE_HIGH_DEFAULT_LATENCY_ (0) /* For debugging glitches. */
@@ -1555,10 +1562,10 @@ static PaError InitializeWaveHandles( PaWinMmeHostApiRepresentation *winMmeHostA
if( isInput )
mmresult = waveInOpen( &((HWAVEIN*)handlesAndBuffers->waveHandles)[i], winMmeDeviceId, &wfx,
- (DWORD)handlesAndBuffers->bufferEvent, (DWORD)0, CALLBACK_EVENT );
+ (DWORD_PTR)handlesAndBuffers->bufferEvent, (DWORD_PTR)0, CALLBACK_EVENT );
else
mmresult = waveOutOpen( &((HWAVEOUT*)handlesAndBuffers->waveHandles)[i], winMmeDeviceId, &wfx,
- (DWORD)handlesAndBuffers->bufferEvent, (DWORD)0, CALLBACK_EVENT );
+ (DWORD_PTR)handlesAndBuffers->bufferEvent, (DWORD_PTR)0, CALLBACK_EVENT );
if( mmresult != MMSYSERR_NOERROR )
{
@@ -1616,11 +1623,15 @@ static PaError TerminateWaveHandles( PaWinMmeSingleDirectionHandlesAndBuffers *h
{
if( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] )
mmresult = waveInClose( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] );
+ else
+ mmresult = MMSYSERR_NOERROR;
}
else
{
if( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] )
mmresult = waveOutClose( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] );
+ else
+ mmresult = MMSYSERR_NOERROR;
}
if( mmresult != MMSYSERR_NOERROR &&