0
0

Hi!

I’ve just started making things with FMOD and now I’m trying to stitch two sounds together… I’ve copied a bit from the stitching example and my code looks like this:

[code:1g80ittj]
memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));

exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.defaultfrequency = 44100;
exinfo.numsubsounds = 2;
exinfo.numchannels = 1;
exinfo.format = FMOD_SOUND_FORMAT_PCM16;

result = system->createSound(0, FMOD_SOFTWARE | FMOD_OPENUSER, &exinfo, &sound1);
ERRCHECK(result);

result = system->createSound("ljud1.wav", FMOD_SOFTWARE, 0, &sound2);
ERRCHECK(result);

result = system->createSound("ljud2.wav", FMOD_SOFTWARE, 0, &sound3);
ERRCHECK(result);

result = sound1->setSubSound(0, sound2);
ERRCHECK(result);

result = sound1->setSubSound(1, sound3);
ERRCHECK(result);

int soundlist[2] = { 0, 1 };

result = sound1->setSubSoundSentence(soundlist, 2);
ERRCHECK(result);

[/code:1g80ittj]

When I try to run this I get an FMOD error: Unsupported file or audio format. (I get it at sound1->setSubSoundSentence)

If I change my sounds to streams instead it works just wonderful… So what am I doing wrong? I hope someone might be able to help me… The thing is that I must be able to play several instances of these sounds at the same time and I can’t do that with streams, right?

Hope someone can help me out! Thanks in advance!

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.