Documentation ¶
Overview ¶
Package bind is for modular binding of atomix to audio interface
Package bind is for modular binding of atomix to audio interface ¶
Package bind has native Go WAV I/O
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AudioCallback ¶
AudioCallback is an unsafe C++ callback function for go-sdl2
func OpenAudio ¶
func OpenAudio(spec *AudioSpec)
OpenAudio begins streaming to the bound output audio interface, via a callback function
func SetMixNextOutput ¶
func SetMixNextOutput(fn mixNextOutputFunc)
SetMixNextOutputFunc to stream mix output from go-atomix
Types ¶
type AudioFormat ¶
type AudioFormat uint8
AudioFormat represents the bit allocation for a single sample of audio
const AudioF32LSB AudioFormat = 35
AudioF32LSB is floating-point 32-bit, least-significant-bit order
const AudioF32MSB AudioFormat = 36
AudioF32MSB is floating-point 32-bit, most-significant-bit order
const AudioS16LSB AudioFormat = 17
AudioS16LSB is integer signed 16-bit, least-significant-bit order
const AudioS16MSB AudioFormat = 19
AudioS16MSB is integer signed 16-bit, most-significant-bit order
const AudioS32LSB AudioFormat = 32
AudioS32LSB is integer signed 32-bit, least-significant-bit order
const AudioS32MSB AudioFormat = 33
AudioS32MSB is integer signed 32-bit, most-significant-bit order
const AudioS8 AudioFormat = 2
AudioS8 is integer signed 8-bit
const AudioU16LSB AudioFormat = 16
AudioU16LSB is integer unsigned 16-bit, least-significant-bit order
const AudioU16MSB AudioFormat = 18
AudioU16MSB is integer unsigned 16-bit, most-significant-bit order
const AudioU8 AudioFormat = 1
AudioU8 is integer unsigned 8-bit
type AudioSpec ¶
type AudioSpec struct { Freq int32 Format AudioFormat Channels uint16 }
AudioSpec represents the frequency, format, # channels and sample rate of any audio I/O
type OptPlayback ¶
type OptPlayback uint8
OptPlayback represents a WAV I/O option
const OptPlaybackPortAudio OptPlayback = 1
OptPlaybackPortAudio to use Go-Native WAV file I/O
const OptPlaybackSDL OptPlayback = 2
OptPlaybackSDL to use SDL for WAV file I/O