FreeBSD Manual Pages
load_asample(3) Arcan Lua API load_asample(3) NAME load_asample - Preload an audio sample for later/repeated playback. SYNOPSIS aid load_asample( string:resource, number:gain ) load_asample( int:channels=2, tblfloat:values ) load_asample( int:channels=2, int:rate=48000, tblfloat:values ) DESCRIPTION This function is used to creat a short audio samples that can be trig- gered repeatedly, usable for sound effects and audio feedback to user events. There are two forms to this function, the first one where a re- source with a RIFF / WAV file backing where the format defines the pa- rameters. The other is for caller supplied buffer of normalised, inter- leaved float values in the -1..1 range. EXAMPLE function load_asample0() aid = load_asample("test.wav", 0.5); play_audio(aid); end SEE ALSO: play_audio(3) audio April 2025 load_asample(3)
NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=load_asample&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>