secondaryDesc.dwSize = sizeof(DSBUFFERDESC);
secondaryDesc.dwFlags = DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;
secondaryDesc.dwBufferBytes = bytesPerBuffer;
- secondaryDesc.lpwfxFormat = (WAVEFORMATEX*)&waveFormat;
+ secondaryDesc.lpwfxFormat = (WAVEFORMATEX*)&waveFormat; /* waveFormat contains whatever format was negotiated for the primary buffer above */
// Create the secondary buffer
if ((result = IDirectSound_CreateSoundBuffer( stream->pDirectSound,
&secondaryDesc, &stream->pDirectSoundOutputBuffer, NULL)) != DS_OK)
stream->pDirectSound = NULL;
}
+#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
if( stream->pDirectSoundFullDuplex8 )
{
IDirectSoundFullDuplex_Release( stream->pDirectSoundFullDuplex8 );
stream->pDirectSoundFullDuplex8 = NULL;
}
-
+#endif
if( bufferProcessorIsInitialized )
PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
stream->pDirectSound = NULL;
}
+#ifdef PAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE
if( stream->pDirectSoundFullDuplex8 )
{
IDirectSoundFullDuplex_Release( stream->pDirectSoundFullDuplex8 );
stream->pDirectSoundFullDuplex8 = NULL;
}
+#endif
PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );