mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Fixed NullOut to include channel count when calculating durations. Not
sure how I never noticed this before.
This commit is contained in:
parent
6d8111aa75
commit
0b7d61df50
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user