Fixed NullOut to include channel count when calculating durations. Not

sure how I never noticed this before.
This commit is contained in:
casey langen 2017-08-04 01:01:59 -07:00
parent 6d8111aa75
commit 0b7d61df50

View File

@ -87,7 +87,7 @@ int NullOut::Play(IBuffer *buffer, IBufferProvider *provider) {
}
/* order of operations matters, otherwise overflow. */
int micros = ((buffer->Samples() * 1000) / buffer->SampleRate() * 1000);
int micros = ((buffer->Samples() * 1000) / buffer->SampleRate() * 1000) / buffer->Channels();
usleep(micros);
provider->OnBufferProcessed(buffer);
return OutputBufferWritten;