From 0b7d61df50b5d38acb2bb9a016195ac8863b754e Mon Sep 17 00:00:00 2001 From: casey langen Date: Fri, 4 Aug 2017 01:01:59 -0700 Subject: [PATCH] Fixed NullOut to include channel count when calculating durations. Not sure how I never noticed this before. --- src/plugins/nullout/NullOut.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/nullout/NullOut.cpp b/src/plugins/nullout/NullOut.cpp index 0429a447e..8ca7ee616 100644 --- a/src/plugins/nullout/NullOut.cpp +++ b/src/plugins/nullout/NullOut.cpp @@ -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;