Author: silverblade Date: Mon Jul 14 17:35:26 2008 New Revision: 34510
URL: http://svn.reactos.org/svn/reactos?rev=34510&view=rev Log: Added some more cases to wodMessage (wave out message handler). Also made the WODM_CLOSE message return WAVERR_STILLPLAYING in the case where an application tries to close a sound device before sending a WODM_RESET to stop it.
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wodMessage.c
Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wodMessage.c URL: http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/so... ============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wodMessage.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wodMessage.c [iso-8859-1] Mon Jul 14 17:35:26 2008 @@ -105,18 +105,24 @@
case WODM_CLOSE : { + MMRESULT Result; + DWORD State; //SOUND_DEBUG_HEX(Instance); ASSERT(Instance != NULL);
- /* TODO: Ensure its OK to close */ + /* Ensure its OK to close - is this the right state to check? */ + Result = GetWaveDeviceState(Instance, &State); + ASSERT(Result == MMSYSERR_NOERROR); + + if ( State == WAVE_DD_PLAYING ) + return WAVERR_STILLPLAYING;
Result = DestroySoundDeviceInstance(Instance); - /*SOUND_DEBUG_HEX(Result);*/ + ASSERT(Result == MMSYSERR_NOERROR);
- /* TODO: When do we send the callback? */ + /* TODO: Send the callback */
return Result; - /* CloseSoundDevice() */ }
case WODM_WRITE : @@ -151,13 +157,20 @@ }
case WODM_BREAKLOOP : - return MMSYSERR_INVALHANDLE; + return MMSYSERR_NOTSUPPORTED; /* yet */
/* Let WINMM take care of these */ case WODM_PREPARE : case WODM_UNPREPARE : return MMSYSERR_NOTSUPPORTED;
+ /* TODO */ + case WODM_SETVOLUME : + case WODM_GETVOLUME : + case WODM_SETPITCH : + case WODM_GETPITCH : + return MMSYSERR_NOTSUPPORTED; + default : return MMSYSERR_NOTSUPPORTED; }