diff options
Diffstat (limited to 'Alc/converter.c')
-rw-r--r-- | Alc/converter.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) { |