Tryst::SDL::AudioSpec
Sample format, channel count and sample rate - SDL_AudioSpec, which turns up wherever audio is described: the format a mixer produces, the format a loaded file is in, the format an AudioStream accepts.
The defaults are SDL_mixer's own working format: it mixes in float32 whatever the inputs and the device are.
Constructors
from_unsafe(spec : LibSDL::AudioSpec) : AudioSpec
@api private - the return trip, for reading a spec back out of a mixer or a stream.
Instance methods
channels
clone
Sourcecopy_with(format _format = @format, channels _channels = @channels, freq _freq = @freq)
Sourceformat
frame_size
Bytes in one sample FRAME - one sample per channel. The unit that buffer sizes have to be a whole multiple of.
freq
to_unsafe
Source