Does anyone know if .MP3 and .WMA streams can be played ‘gaplessly’ using subsounds?
I tried modifying my existing one-stream-at-a-time player to use subsounds and sentencing to stitch multiple tracks together, but the call to setSubSound() always returned an error about the stream format. After stumbling across the ‘realtimestitching’ example in the SDK which does the same thing, I discovered that it works okay with .OGG files but not with .MP3 or .WMA. Is this a bug, or a limitation of the engine?
- Seffles asked 13 years ago
In the documentation for setSubSoundSentence, it says:
“By default subsounds are stitched automatically from index 0 to the last index.”
But here I am trying to play a .fsb sample that contains only one sub-sample. If it is a stream, it plays fine, whereas if it is a sample, it hangs in playSound.
I am using the Xbox360 4.01.06 version. I am not overriding the memory allocators or the file system calls.
I am loading a set of fsb files, each containing a single sample, encoded as ADPCM. I notice that when I play the bank (the parent sound) using playSound I get a return value FMOD_ERR_FORMAT.
I tried calling setSubSoundSentence:
int subSoundList = 0;
res = pSound->setSubSoundSentence (&subSoundList, 1);
but this also returns FMOD_ERR_FORMAT.
If I change the sound to the subSound like so:
FMOD::Sound * pSubSound;
res = pSound->getSubSound (0, &pSubSound);
if (res == FMOD_OK)
pSound = pSubSound;
Then the sound plays, and “pSound->playSound ()” returns FMOD_OK. Can you suggest what I might be doing wrong?
I have written a separate app to try to isolate this behavior.
If I open the fsb files as streams (with FMOD_CREATESTREAM) then I can play them ok.
If I open the fsb file with FMOD_CREATESAMPLE then I get an exception somewhere in playSound. My callstack looks like the following:
unittest.exe!?playSound@SystemI@FMOD@@QAA?AW4FMOD_RESULT@@W4FMOD_CHANNELINDEX@@PAVSoundI@2@_NPAPAVChannelI@2@@Z() + 0xBC bytes
unittest.exe!?playSound@System@FMOD@@QAA?AW4FMOD_RESULT@@W4FMOD_CHANNELINDEX@@PAVSound@2@_NPAPAVChannel@2@@Z() + 0x44 bytes
Please login first to submit.