0
0

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

audio->Update();

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!
Thanks guys!
Chantelle x

  • You must to post comments
0
0

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!
Thank you!
Chantelle x

  • You must to post comments
0
0

Thank you so SO much! I was only loading it with FMOD_SOFTWARE! Added that in and bingo. Works like a charm. You have saved me countless hours of frustration! 😀 THANK YOU! x

  • You must to post comments
0
0

You dont need update to make a sound loop, just make sure the sound is loaded with FMOD_LOOP_NORMAL

  • You must to post comments
0
0

Are you periodicaly calling system::Update as you should?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.