Documentation ¶
Overview ¶
Package ov implements the Go bindings of a subset of the functions of the Ogg Vorbis File C library.
It also implements a loader so the library can be dynamically loaded. The libvorbisfile C API reference is at: https://xiph.org/vorbis/doc/vorbisfile/reference.html
Index ¶
- Constants
- func Clear(f *File) error
- func Info(f *File, link int, info *VorbisInfo) error
- func IsLoaded() bool
- func Load() error
- func PcmSeek(f *File, pos int64) error
- func PcmTotal(f *File, i int) (int64, error)
- func Read(f *File, buffer unsafe.Pointer, length int, bigendianp bool, word int, ...) (int, int, error)
- func Seekable(f *File) bool
- func TimeTell(f *File) (float64, error)
- func TimeTotal(f *File, i int) (float64, error)
- type File
- type VorbisInfo
Constants ¶
const ( Eread = C.OV_EREAD Efault = C.OV_EFAULT Eimpl = C.OV_EIMPL Einval = C.OV_EINVAL EnotVorbis = C.OV_ENOTVORBIS EbadHeader = C.OV_EBADHEADER Eversion = C.OV_EVERSION EnotAudio = C.OV_ENOTAUDIO EbadPacket = C.OV_EBADPACKET EbadLink = C.OV_EBADLINK EnoSeek = C.OV_ENOSEEK )
Variables ¶
This section is empty.
Functions ¶
func Info ¶
func Info(f *File, link int, info *VorbisInfo) error
Info updates the specified VorbisInfo structure with contains basic information about the audio in a vorbis stream
func Load ¶
func Load() error
Load tries to load dinamically the libvorbisfile shared library/dll. Most of the functions of this package can only be called only after the library was successfully loaded.
func PcmSeek ¶
Seek seeks to the offset specified (in number pcm samples) within the physical bitstream. This function only works for seekable streams. Updates everything needed within the decoder, so you can immediately call Read() and get data from the newly seeked to position.
func PcmTotal ¶
PcmTotal returns the total number of pcm samples of the physical bitstream or a specified logical bit stream. To retrieve the total pcm samples for the entire physical bitstream, the 'link' parameter should be set to -1
func Read ¶
func Read(f *File, buffer unsafe.Pointer, length int, bigendianp bool, word int, sgned bool) (int, int, error)
Read decodes next data from the file updating the specified buffer contents and returns the number of bytes read, the number of current logical bitstream and an error