Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
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 triggered
     repeatedly, usable for sound effects and audio  feedback  to  user  events.
     There are two forms to this function, the first one where a resource with a
     RIFF / WAV  file backing where the format defines the parameters. The other
     is  for  caller  supplied buffer of normalised, interleaved 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				   August 2026			 load_asample(3)

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+15.1.quarterly>

home | help