0
0

Hi,

I may have found a bug, of course I may just be doing something entirely wrong but if someone could perhaps give me a hand with this it would be great.

I’m streaming an .fsb for BGM which contains 7 tracks. So I create a stream using the relevant function call

[code:1zdxfx5g]
result = engine->createStream(pathName.c_str(), FMOD_DEFAULT, 0, &sound);
checkError(result);
[/code:1zdxfx5g]

I then want to split these sounds into subsounds so that I can change each tracks volume individually I do this through the follow method

[code:1zdxfx5g]
int nrOfSubSounds = 0;
sound->getNumSubSounds(&nrOfSubSounds);

std::vector<FMOD::Sound*> subSounds;

for(int i = 0; i < nrOfSubSounds; i++)
{
    FMOD::Sound* s;
    sound->getSubSound(i, &s);
    subSounds.push_back(s);
}

return subSounds;

[/code:1zdxfx5g]

Now ideally this gives me 7 seperate sounds however it doesn’t! It just gives me one sound copied over and over. however when I actually load the sounds into memory (i.e. don’t stream) it works just fine and I get 7 distinctly different tracks.

So is there something I may be missing or is it actually a bug within the system?

Thanks a lot,

Kurt

  • You must to post comments
0
0

When you stream an FSB there is 1 file handle and therefore 1 active subsound, the active subsound is switched when you call getSubSound.
If you want to have multiple streams you need to open the FSB multiple times.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.