wasapi: fixed the bug when on stream stop/start/stop/start sequence callback could be called with number of samples smaller than requested by user in Pa_OpenStream
This commit is contained in:
parent
b906a9d336
commit
3fb0ef9e30
1 changed files with 17 additions and 8 deletions
|
|
@ -4733,16 +4733,25 @@ PA_THREAD_FUNC ProcThreadPoll(void *param)
|
|||
if (stream->bufferMode == paUtilFixedHostBufferSize)
|
||||
{
|
||||
if (frames >= stream->out.framesPerBuffer)
|
||||
{
|
||||
frames = stream->out.framesPerBuffer;
|
||||
}
|
||||
|
||||
if (frames != 0)
|
||||
{
|
||||
if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
|
||||
{
|
||||
LogHostError(hr); // not fatal, just log
|
||||
}
|
||||
}
|
||||
if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
|
||||
{
|
||||
LogHostError(hr); // not fatal, just log
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (frames != 0)
|
||||
{
|
||||
if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK)
|
||||
{
|
||||
LogHostError(hr); // not fatal, just log
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue