mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 18:00:41 +00:00
- Quick & dirty implementation of WIDM_RESET / WODM_RESET
svn path=/trunk/; revision=43533
This commit is contained in:
parent
4bbe9c3785
commit
ba91ff3d49
1 changed files with 14 additions and 4 deletions
|
@ -65,6 +65,10 @@ DoWaveStreaming(
|
|||
HeaderExtension = (PWAVEHDR_EXTENSION) Header->reserved;
|
||||
SND_ASSERT( HeaderExtension );
|
||||
|
||||
/* Saniy checks */
|
||||
SND_ASSERT(Header->dwFlags & WHDR_PREPARED);
|
||||
SND_ASSERT(Header->dwFlags & WHDR_INQUEUE);
|
||||
|
||||
/* Can never be *above* the length */
|
||||
SND_ASSERT( HeaderExtension->BytesCommitted <= Header->dwBufferLength );
|
||||
|
||||
|
@ -170,6 +174,8 @@ CompleteIO(
|
|||
WaveHdr = (PWAVEHDR) SoundOverlapped->Header;
|
||||
SND_ASSERT( WaveHdr );
|
||||
|
||||
SND_ASSERT( ERROR_SUCCESS == dwErrorCode );
|
||||
|
||||
HdrExtension = (PWAVEHDR_EXTENSION) WaveHdr->reserved;
|
||||
SND_ASSERT( HdrExtension );
|
||||
|
||||
|
@ -239,8 +245,13 @@ StopStreamingInSoundThread(
|
|||
IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
|
||||
IN PVOID Parameter)
|
||||
{
|
||||
/* TODO */
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
/* complete all pending headers */
|
||||
while(SoundDeviceInstance->HeadWaveHeader)
|
||||
CompleteWaveHeader(SoundDeviceInstance, SoundDeviceInstance->HeadWaveHeader);
|
||||
|
||||
SND_ASSERT( NULL == SoundDeviceInstance->HeadWaveHeader );
|
||||
SND_ASSERT( NULL == SoundDeviceInstance->TailWaveHeader );
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
||||
MMRESULT
|
||||
|
@ -262,8 +273,7 @@ StopStreaming(
|
|||
if ( ! MMSUCCESS(Result) )
|
||||
return TranslateInternalMmResult(Result);
|
||||
|
||||
/* FIXME: What about wave input? */
|
||||
if ( DeviceType != WAVE_OUT_DEVICE_TYPE )
|
||||
if ( DeviceType != WAVE_OUT_DEVICE_TYPE && DeviceType != WAVE_IN_DEVICE_TYPE )
|
||||
return MMSYSERR_NOTSUPPORTED;
|
||||
|
||||
return CallSoundThread(SoundDeviceInstance,
|
||||
|
|
Loading…
Reference in a new issue