fn buffer_frames #

fn buffer_frames() int

audio.buffer_frames - return actual backend buffer size in number of frames

fn channels #

fn channels() int

audio.channels - actual number of channels

fn expect #

fn expect() int

audio.expect - get current number of frames to fill packet queue; use in combination with audio.push/2

fn fclamp #

fn fclamp(x f32, flo f32, fhi f32) f32

fn is_valid #

fn is_valid() bool

audio.is_valid - true after setup if audio backend was successfully initialized

fn max #

fn max(x int, y int) int

fn min #

fn min(x int, y int) int

fn push #

fn push(frames &f32, num_frames int) int

audio.push - push sample frames from main thread, returns number of frames actually pushed

fn query #

fn query() C.saudio_desc

audio.query - return a copy of the original saudio_desc struct

fn sample_rate #

fn sample_rate() int

audio.sample_rate - actual sample rate

fn setup #

fn setup(desc C.saudio_desc)

fn shutdown #

fn shutdown()

audio.shutdown - shutdown sokol-audio

fn user_data #

fn user_data() voidptr

audio.userdata - return the saudio_desc.user_data pointer

type FNStreamingCB #

type FNStreamingCB = fn (buffer &f32, num_frames int, num_channels int)

fn (FNStreamingCB) str #

fn (x FNStreamingCB) str() string

type FnStreamingCBWithUserData #

type FnStreamingCBWithUserData = fn (buffer &f32, num_frames int, num_channels int, user_data voidptr)

fn (FnStreamingCBWithUserData) str #

fn (x FnStreamingCBWithUserData) str() string

struct C.saudio_desc #

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