How does one properly use Preload Sample?

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.
  • I wasn't able to find any documentation on this so I'll ask here.

    I've got a hundred samples or so with evaluated path names and it would be nice to just play them from memory instead of accessing the hard drive every time they're needed. The problem is I have no idea of knowing what I have is working properly or not. There isn't much debugging tools for checking preloaded audio. Does Please login to see this link. .mfa look right?

    Please login to see this picture.

    Line 1 and 2 preloads samples by paths evaluated on runtime.
    Line 3 plays sample by file evaluating a new path the same way as before.

    Of course it is also possible Preload Sample is for something entirely different than I assume it is and I am completely mistaken. :)

    Bonus question: If not using Preload Sample, does Fusion still keep previously played audio files with evaluated path names in memory for "next time"?

    Please login to see this link. Please login to see this link.
    Freelance Dev | Currently Working on Jarvis | Please login to see this link.

  • >> There isn't much debugging tools for checking preloaded audio.

    You can compare the memory used by your application with and without these samples.

    This MFA will load all the entiere sample files to memory. When you play them they are played from memory.

    If you do not use Preload Sample File, the samples you play from disk will be always played from disk, they won't be put into some cache, and when they are played only the current part of the file that is being played is loaded into memory (it's similar to the "Play from disk" option in the sound properties).

  • Thanks for fast reply!

    That's a good point and the app does indeed increase in memory size after preloading the audio files. But what I meant was, how to test if the audio file played afterwards was truly the one from memory or if it still being accessed from disk.

    I did my own little test just now by manually removing the audio folder after my app had preloaded the samples within but now the app does not play the audio at all. Does the files still have to be existing even after loaded into memory or am I doing something else wrong here?

    Please login to see this link. Please login to see this link.
    Freelance Dev | Currently Working on Jarvis | Please login to see this link.

  • I did my own little test just now by manually removing the audio folder after my app had preloaded the samples within but now the app does not play the audio at all. Does the files still have to be existing even after loaded into memory or am I doing something else wrong here?

    Oops, bug... some code was copied to a wrong location and Preload Sample didn't work correctly anymore... sorry! This will be fixed in the next update. EDIT: if you need it urgently I can send you a fix.

  • How is preloading manually different to leaving the Preload setting as it is in the data elements section? I'm not actually sure when samples that are preloaded by default are actually loaded as I've sometimes experienced pauses from playing some sounds for the first time regardless of this setting.

    Please login to see this link.

    Please login to see this link.

    Please login to see this link.

  • The Preload option is for built-in sounds. When this option is selected (default), the entire sound data is loaded to memory when the frame starts. The other option is "Play from disk": if this option is selected, Fusion doesn't load the entire sound data, it loads the sound data progressively from disk when the sound is played.

    The Preload Sample File action is only for external files. It basically loads the sound file and adds it to the list of built-in sounds for the current frame.

  • Oops, bug... some code was copied to a wrong location and Preload Sample didn't work correctly anymore... sorry! This will be fixed in the next update. EDIT: if you need it urgently I can send you a fix.

    No worries! There is no hurry and the issue is not blocking any development nor is it urgent so I can just grab the full update when it's ready. But I am glad to hear it was just a matter of a quick-fix and that the preload-system is really as simple to use as I had hoped.

    Thank you for looking into it - As usual I am looking forward to next build!

    Please login to see this link. Please login to see this link.
    Freelance Dev | Currently Working on Jarvis | Please login to see this link.

Participate now!

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