Hi dudes!
I checked out "realtimestitching" example. It uses separate files on the disk. Is there any solution to do same for sounds that are stored in a single fsb-file?
Thanks.
- torin_duboshit asked 8 years ago
- You must login to post comments
Yes, real-time stitching with FSB subsounds is very easy. Make sure you open the FSB as stream, then use Sound::getSubSound to access those subsounds, you can then use those FMOD::Sound objects the same as the realtimestitching example.
- Guest answered 8 years ago
- You must login to post comments
Well, setSubSound returns FMOD_ERR_SUBSOUND_ALLOCATED.
- torin_duboshit answered 8 years ago
- You must login to post comments
Sorry my previous answer was a little misleading. The FSB is already a parent to the subsounds, which means you don’t need to reparent them to the OPEN_USER sound. To create a subsound sentence using the FSB you can just use setSubSoundSentence directly on the FSB.
[code:n3003ddn]FMOD::Sound* bank;
ERRCHECK(result = sys->createStream("C:/media/mybank.fsb", FMOD_DEFAULT, 0, &bank));
int sentence[] = {3, 0, 1, 3, 2, 4};
ERRCHECK(result = bank->setSubSoundSentence(sentence, sizeof(sentence)/sizeof(sentence)));
FMOD::Channel chan;
ERRCHECK(result = sys->playSound(FMOD_CHANNEL_FREE, bank, false, &chan));[/code:n3003ddn]
- Guest answered 8 years ago
- You must login to post comments
Oh, ok. But I need the same mechanics as in the sample. I need to queue random sounds dinamically.
E.g., I’ve got a start-loop-stop sound. It plays start sound, then it plays random loops. (Different looping samples that I queue in a random sequence). It plays until I get a message from script that this sound should play stop sound and finish its playing.
- torin_duboshit answered 8 years ago
- You must login to post comments
So, is there any way to implement this?
- torin_duboshit answered 8 years ago
- You must login to post comments
Please login first to submit.