fn buffer_frames() int
audio.buffer_frames - return actual backend buffer size in number of frames
fn channels() int
audio.channels - actual number of channels
fn expect() int
audio.expect - get current number of frames to fill packet queue; use in combination with audio.push/2
fn fclamp(x f32, flo f32, fhi f32) f32
fn is_valid() bool
audio.is_valid - true after setup if audio backend was successfully initialized
fn max(x int, y int) int
fn min(x int, y int) int
fn push(frames &f32, num_frames int) int
audio.push - push sample frames from main thread, returns number of frames actually pushed
fn query() C.saudio_desc
audio.query - return a copy of the original saudio_desc struct
fn sample_rate() int
audio.sample_rate - actual sample rate
fn setup(desc C.saudio_desc)
fn shutdown()
audio.shutdown - shutdown sokol-audio
fn user_data() voidptr
audio.userdata - return the saudio_desc.user_data pointer
type FNStreamingCB = fn (buffer &f32, num_frames int, num_channels int)
fn (x FNStreamingCB) str() string
type FnStreamingCBWithUserData = fn (buffer &f32, num_frames int, num_channels int, user_data voidptr)
fn (x FnStreamingCBWithUserData) str() string
struct C.saudio_desc {
sample_rate int
num_channels int
buffer_frames int
packet_frames int
num_packets int
stream_cb FNStreamingCB
stream_userdata_cb FnStreamingCBWithUserData
user_data voidptr
}