Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
LOOP event triggered on sound channel loop — Gideros Forum

LOOP event triggered on sound channel loop

JesderJesder Member
edited June 2013 in Suggestions & requests
Hi guys,

I'd like to request a feature for a future version.

I would love to see an effect triggered when a sound channel loops. Since there is no way to set a loop counter or detect if a channel has looped (or even how many times it has looped), it would be handy to be able to listen to some sort of LOOP event and use that.

Cheers,

Comments

  • SinisterSoftSinisterSoft Maintainer
    I seem to remember that an event IS called when the sound finishes (loops)...
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • JesderJesder Member
    The only audio event I'm aware of is the COMPLETE event (Event.COMPLETE) which is triggered on a sound channel finishing.

    With looping sound channels, this event isn't fired (i presume because the channel technically isn't finished).
  • SinisterSoftSinisterSoft Maintainer
    Flay it without repeat, catch the finished event - then restart the sound and do what else you want to do at the same time.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • oh, this is one we've discussed here.. Best you can do for now is some combination between having a timer and getPosition on the sound channel :/

    I'm being told a more interesting and fairly complete audio solution is coming.


    @SinisterSoft - event.complete+play creates an audible gap I'm afraid...
    http://esem.name/sound ♫ sound and music at ShadyLabs (Clouds of Steel, Aftermath Alvin)
  • JesderJesder Member
    I'm getting around it for now using the timer method which resets the looping state of the channel part way through the final loop. While this method is OK (and is the cleanest solution available), I think an even cleaner solution would be to see the event implemented into Gideros (hence this request).

    I'd have to test the catch complete event and replay method, but I'd have thought that would result in at least a frame of no audio, causing a noticeable jump in the loop . :-/
Sign In or Register to comment.