GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
load_asample(3) Arcan Lua API load_asample(3)

load_asample - Preload an audio sample for later/repeated playback.

aid
load_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 )

This 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'.

function load_asample0()
      aid = load_asample("test.wav", 0.5);
      play_audio(aid);
end

play_audio(3)

June 2022 audio

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.