From 25cf91cb14891f1ce72f077fc9726eba6d1760cf Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 15 Aug 2020 17:48:57 +0800 Subject: [PATCH] More clearly check supported pcm format by alsoft extends --- cocos/audio/src/AudioCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/audio/src/AudioCache.cpp b/cocos/audio/src/AudioCache.cpp index c4316578c1..e9d94636aa 100644 --- a/cocos/audio/src/AudioCache.cpp +++ b/cocos/audio/src/AudioCache.cpp @@ -144,10 +144,10 @@ void AudioCache::readDataTask(unsigned int selfId) case AUDIO_SOURCE_FORMAT::PCM_16: _format = channelCount > 1 ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; // bits depth: 16bits break; -#if CC_USE_ALSOFT case AUDIO_SOURCE_FORMAT::PCM_U8: _format = channelCount > 1 ? AL_FORMAT_STEREO8 : AL_FORMAT_MONO8; // bits depth: 8bits break; +#if CC_USE_ALSOFT case AUDIO_SOURCE_FORMAT::PCM_FLT32: _format = channelCount > 1 ? AL_FORMAT_STEREO_FLOAT32 : AL_FORMAT_MONO_FLOAT32; break;