Handle 0-length convolution buffers

This commit is contained in:
Chris Robinson
2020-08-27 21:32:25 -07:00
parent 0ad7bb577a
commit a9ebcdcb7f
+3
View File
@@ -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;