Hi guys! I’ve built an audio system using FMOD for my final year group project game at university. I’ve housed it in a separate class which only needs one instance created and stores multiple sounds in a vector.
e.g. CAudio audio = new CAudio;
audio->LoadStream( "sound.mp3" );
audio->PlaySound( 0 ); // 0 = vector index
However I can’t get the sound loaded to loop. I’ve been using channel->setLoopCount( -1 ) relative to the particular sound I want looped and housed it in a separate function and I’ve called it in multiple places in my code to get it to work, but it just won’t loop! After calling setLoopCount() I then call channel->setPosition( 0, FMOD_TIMEUNIT_MS ) but that doesn’t seem to make any difference either. FMOD isn’t throwing any errors. For the life of me, it just won’t loop! I’ve also tried setLoopPoint() and that doesn’t want to hear about it either!
Any help would be greatly appreciated! And if you need me to post code samples of how I’ve written my audio code I’m more than happy to post that too!
Sorry to be double posting and bumping but I need help again with looping sound! Even though I’ve got the sound looping, I can’t control how many loops I loop it by! After I create a stream I’m using sound->setLoopCount() and then sound->setLoopPoints(). But I only want the sound to play once.. which from the documentation I need to set the loop count as 0. But what do I set the loop points to? Or is this even the right method?! Please help!
Please login first to submit.