From 9d01ac440de6adfe348005622a065ebd4bd35e8f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 23 Jun 2017 08:13:42 -0700 Subject: [PATCH] Don't report any output samples for no input samples --- Alc/converter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Alc/converter.c b/Alc/converter.c index 9fe76faa..ee8bb7fb 100644 --- a/Alc/converter.c +++ b/Alc/converter.c @@ -194,6 +194,12 @@ ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframe prepcount = 0; } + if(srcframes < 1) + { + /* No output samples if there's no input samples. */ + return 0; + } + if(prepcount < MAX_POST_SAMPLES+MAX_PRE_SAMPLES && MAX_POST_SAMPLES+MAX_PRE_SAMPLES-prepcount >= srcframes) { -- 2.11.4.GIT