0 branches
Tree
Top files
Clone with HTTPS:
README.md
thirdparty, vlib: add thirdparty/stb_vorbis; add a thin wrapper module for it too + test in `encoding.vorbis` (#25427)
last Oct 2
574 bytes
link_to_libm.c.v
thirdparty, vlib: add thirdparty/stb_vorbis; add a thin wrapper module for it too + test in `encoding.vorbis` (#25427)
last Oct 2
658 bytes
version.v
thirdparty, vlib: add thirdparty/stb_vorbis; add a thin wrapper module for it too + test in `encoding.vorbis` (#25427)
last Oct 2
301 bytes
encoding.vorbis
This module is a thin wrapper around stb_vorbis, which is a public domain Ogg Vorbis audio decoder, originally written by Sean Barrett.
Example:
import encoding.vorbis
x := vorbis.decode_file('coin.ogg')!
dump(x)
unsafe { x.free() }
... may produce something like this:
[x.v:4] x: vorbis.VorbisData{
path: 'coin.ogg'
channels: 2
sample_rate: 48000
len: 5760800
data: &0
}
Note: x.data points to the actual memory block that has the decoded content.