|
NAMEload_asample - Preload an audio sample for later/repeated playback.SYNOPSISaidload_asample( string:resource, number:gain ) load_asample( int:channels=2, tblfloat:values ) load_asample( int:channels=2, int:rate=48000, tblfloat:values ) load_asample( int:channels=2, int:rate=48000, string:format="stereo", tblfloat:values ) DESCRIPTIONThis function is used to creata 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. The optional 'format' controls the interpretation of the values, where current possible formats are 'stereo' and 'mono'.EXAMPLEfunction load_asample0() aid = load_asample("test.wav", 0.5); play_audio(aid); end SEE ALSO:play_audio(3)
Visit the GSP FreeBSD Man Page Interface. |