v / vlib / encoding / vorbis / README.md
26 lines · 21 sloc · 574 bytes · 8287d5dd97821042e05ac55803af906c9276825c
Raw

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.