Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Music Looping — Gideros Forum

Music Looping

JesderJesder Member
edited June 2013 in General questions
Hi Guys,

I've been getting sfx and music implemented into our game and have a question regarding looping.

The play function takes a second parameter which indicates if the sound/music is to loop once complete. I've seen documentation (and even a post here on the forums) that say this parameter can be a numeric value to indicate the number of loops to perform, although that is not what I'm seeing while testing. True, 1 or 2, 3, 4 (and so on) will make it loop forever (which matches other documentation I've read).

Basically I want to be able to set some music tracks to loop 2 or 3 times, before I perform a cross fade to the next track. I've implemented cross fading (which works nicely), but I obviously don't want to cross fade if there is a still 1 or more loops to play on the track.

I don't mind if I have to internally keep track of the number of times the sound/music has looped, but I'm not sure how to go about this, or if there is actually support implemented in Gideros to determine how many times it has looped.

Is there an event that is fired when the sound loops? or a Gideros function I can call on the soundChannel to detect how many loops it has performed?

Thanks :)

Comments

Sign In or Register to comment.