aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/effects/convolution.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index 8213113b..2ebb9f51 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -136,6 +136,9 @@ EffectBufferBase *ConvolutionState::createBuffer(const ALCdevice *device,
const al::byte *sampleData, ALuint sampleRate, FmtType sampleType,
FmtChannels channelType, ALuint numSamples)
{
+ /* An empty buffer doesn't need a convolution filter. */
+ if(numSamples < 1) return nullptr;
+
/* FIXME: Support anything. */
if(channelType != FmtMono && channelType != FmtStereo)
return nullptr;