Will MMF2 ever get looping audio?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Quote from Nifflas

    That's not a bug or an error. That's just logical and makes sense. Loading a sample is not instant, and MMF2's events are executed once every frame rather than magically perform the "play sample" action out of place exactly when the previous sample stop. Then, there's the soundcard latency too. If CT included the feature to play separate samples after each other without a delay in between, you'd have to specify what sound to play next before the previous sound has stopped playing, so the program can pre-load the sample and take all the things above into account too. Having an event doing it triggered by a sample's end is not possible by plain logical reasons.

    That doesn't even make sense, given what people say. Apparently the gap is when you set a sample to loop, which means the sound is already in memory and essentially MMF knows exactly what's going to come.
    And the workaround seems to be to use a "every x seconds" event to start the next sound after the duration of the previous, in which case MMF does not know what's going to come, and yet it's fine.

    Why other games and programs can do it fine is because they precache the sounds / music. And so does MMF.

    <span style="font-style: italic">&quot;I'm not saying you don't know what you are talking about, but I don't know what you're talking about.&quot;</span>

  • You're taking my post out of it's context. I was not responding to a post concerning the use of sample loops, I was responding to one about triggering a sample using an event that checks if a previous one has stopped playing. "Is sample/channel playing" are false events and are triggered once every frame, and not the instant when the sound has actually stopped playing, and the small pause in between would produce a small pause (or more an instant pop). An audio playback needs to know what's comming on it's own, an event system that runs in a separate thread triggering a sample when a previous one has stopped doesn't count as that.

    Sample loops are different, of course MMF should see what's comming there (and to me they have always worked fine, I've not yet experienced what people are explaining here).

  • Oh sorry, must have missed that. You're right then. Using regular conditions wouldn't work. Don't we have something like "sample stopped" or so that gets triggered exactly when the sound is done playing?

    <span style="font-style: italic">&quot;I'm not saying you don't know what you are talking about, but I don't know what you're talking about.&quot;</span>

  • It probably works well, but if you're using an event to set the sample position, it can't be sample accurate by technical reasons (event system that runs in another thread taking care of looping the song). However, if you're lucky, it's close enough to sound good!

  • Yeah, but even if you specified the exact sample point to loop back to, you'd get a small offset just because the event engine runs in another thread. However, if it's close enough there's no reason to complain :)

    The best way do it from a technical point of view if the sound engine itself knows what's comming in advance, so that the beginning of the loop is already pre-buffered with sample accurate precision in the actual audio buffer (not just the RAM) before the end point has been reached.

    Don't get me wrong though, I'm not complaining really. I'm just describing the most optimal and streamlined way to handle it.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!