Import with #import "std/audio_types".
OK :: 0Invalid :: 2Malformed :: 3Unsupported :: 4LimitExceeded :: 5NativeFailure :: 6AllocationFailed :: 7IOFailure :: 8PCM :: struct { samples: Vec(float32); rate: s32; channels: s32; }Memory/work bounds apply before allocations. Rates are bounded to avoid
MaxBytes :: 268435456Memory/work bounds apply before allocations. Rates are bounded to avoid enormous output for hostile headers. Whole-file APIs are intentionally bounded.
MaxFrames :: 28800000ValidPCM :: (pcm: *PCM) -> boolErrorText :: (code: s32) -> stringLittle :: (input: []u8, at: s64, count: s64) -> u64PutLittle :: (output: []u8, at: s64, count: s64, value: u64)Magic :: (input: []u8, at: s64, text: string) -> boolPcm16 :: (value: float64) -> s16The PCM16 boundary for finite samples: clip overshoot to [-1, 32767/32768], scale by 32768 and truncate, as WAV output does.
SwapSamples :: (pcm: *PCM, samples: *Vec(float32))Move ownership between caller vector and PCM without copying samples.