Open hunterwilliams opened 8 years ago
Could you upload a 32bit .wav for testing? Thanks.
I've put one in my dropbox. Not sure a great place to upload them.
@hunterwilliams , I could download the file you uploaded. Thank you.
@hunterwilliams , I tested, it's a bug of SimpleAudioEngine.
void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate)
{
...
if ((theFileFormat.mBitsPerChannel != 8) && (theFileFormat.mBitsPerChannel != 16)) {
// GOTO HERE, SINCE mBitsPerChannel is 32.
CDLOG(@"MyGetOpenALAudioData - Unsupported Format, must be 8 or 16 bit PCM\n"); goto Exit;
}
I also tested with AudioEngine
which uses openal to play audio. And it works ok.
It's better to switch to AudioEngine
which is more powerful. :)
Ah I didn't manage to see that pop in the logs. Maybe suggest a documentation mention unless I missed it :)
Steps to Reproduce:
SimpleAudioEngine::getInstance()->playEffect(filePath, false, 1, 0, 1);
The sound will not play. However converting with Audacity to a 16bit version works perfectly fine.
If I need to supply a test file let me know.