Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK .NET / SOUND LOOP Issue

Author
Message
aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 2nd Feb 2012 01:33
Okay, I've got something odd happening with sound loops I am using. I have multiple audio objects that are being cued at different times. I need to pause one audio loop to play another, and then resume the paused loop once the current one is finished. But this is what happens--

Audio1.loop
...then later
Audio1.Pause
Audio2.Play
if Audio2.playing = false
Audio1.Resume
end if

But, Audio1 will resume playing. But, once it reaches the end of the audio file length, it stops instead of looping. It acts as if the original command was Audio1.play, not Audio1.loop

Any ideas?

Russell B. Davis/aerostudios
jojoofu
15
Years of Service
User Offline
Joined: 23rd Feb 2009
Location: Where ever Carmen Sandiego is
Posted: 3rd Feb 2012 16:37
Are you running this test in your main loop ? Make sure to call core.sync method every pass this will update the audio as well as the visual parts of the program.

" The best slaves are the ones who think they are free. "
aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 4th Feb 2012 14:29
Yes I have the sync command happening all over the place!

What I elected to do, is simply set the volume of Audio1 to 0, and then play Audio2. Once Audio2 is completed, I just turn the volume back up on Audio1. So I never pause Audio1 at all. That works as well for my purposes.

Russell B. Davis/aerostudios

Login to post a reply

Server time is: 2024-04-16 18:36:24
Your offset time is: 2024-04-16 18:36:24