mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 00:58:16 +00:00
- If the current irp buffer is finished, set the state to pause (fixes looping of last sample)
- Use KeSetTimer if Irql is below equal DISPATCH_LEVEL svn path=/trunk/; revision=39675
This commit is contained in:
parent
f5cfdeec77
commit
aa52ca9057
|
@ -105,9 +105,10 @@ IServiceSink_fnRequestService(
|
|||
NTSTATUS Status;
|
||||
|
||||
IPortPinWaveCyclicImpl * This = (IPortPinWaveCyclicImpl*)CONTAINING_RECORD(iface, IPortPinWaveCyclicImpl, lpVtblServiceSink);
|
||||
#if 0
|
||||
|
||||
if (This->ActiveIrp && This->ActiveIrpOffset >= This->ActiveIrpBufferSize)
|
||||
{
|
||||
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_PAUSE);
|
||||
if (KeGetCurrentIrql() > DISPATCH_LEVEL)
|
||||
{
|
||||
if (This->DelayedRequestInProgress)
|
||||
|
@ -140,7 +141,6 @@ IServiceSink_fnRequestService(
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!This->ActiveIrp)
|
||||
{
|
||||
|
@ -186,7 +186,8 @@ IServiceSink_fnRequestService(
|
|||
}
|
||||
else
|
||||
{
|
||||
This->Stream->lpVtbl->Silence(This->Stream, (PUCHAR)This->CommonBuffer + This->CommonBufferOffset, BytesToCopy);
|
||||
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_PAUSE);
|
||||
return;
|
||||
}
|
||||
BufferLength = Position;
|
||||
IrpLength = This->ActiveIrpBufferSize - This->ActiveIrpOffset;
|
||||
|
@ -210,6 +211,12 @@ IServiceSink_fnRequestService(
|
|||
BytesToCopy = min(BufferLength, IrpLength);
|
||||
DPRINT1("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
|
||||
|
||||
if (!BytesToCopy)
|
||||
{
|
||||
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_PAUSE);
|
||||
return;
|
||||
}
|
||||
|
||||
This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel,
|
||||
(PUCHAR)This->CommonBuffer + This->CommonBufferOffset,
|
||||
(PUCHAR)This->ActiveIrpBuffer + This->ActiveIrpOffset,
|
||||
|
|
|
@ -211,8 +211,11 @@ IServiceGroup_fnRequestDelayedService(
|
|||
|
||||
if (This->Initialized)
|
||||
{
|
||||
//KeSetTimer(&This->Timer, DueTime, &This->Dpc);
|
||||
KeInsertQueueDpc(&This->Dpc, NULL, NULL);
|
||||
if (KeGetCurrentIrql() <= DISPATCH_LEVEL)
|
||||
KeSetTimer(&This->Timer, DueTime, &This->Dpc);
|
||||
else
|
||||
KeInsertQueueDpc(&This->Dpc, NULL, NULL);
|
||||
|
||||
KeClearEvent(&This->DpcEvent);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue