sample_loaded? path (string)
Given a path to a .wav, .wave, .aif, .aiff or .flac file, returns true if the sample has already been loaded.
.wav
.wave
.aif
.aiff
.flac
true
Introduced in v2.2
load_sample :elec_blip puts sample_loaded? :elec_blip puts sample_loaded? :misc_burp
# :elec_blip is now loaded and ready to play as a sample # prints true because it has been pre-loaded # prints false because it has not been loaded