void Preload()

robot_2Generated
code_blocksInput

Description

The Preload method is a member of the SoundFile class in the Sandbox namespace. This method is used to preload the sound file into memory, ensuring that it is ready for immediate playback when needed. Preloading can help reduce latency when playing sounds, as the data is already loaded and does not need to be fetched from disk at the time of playback.

Usage

To use the Preload method, you must first have an instance of the SoundFile class. Once you have a sound file loaded, you can call the Preload method on that instance to load the sound data into memory.

Example usage:

SoundFile soundFile = SoundFile.Load("path/to/soundfile.wav");
soundFile.Preload();

After calling Preload, the sound file is ready for immediate playback.

Example

SoundFile soundFile = SoundFile.Load("path/to/soundfile.wav");
soundFile.Preload();