stb_vorbis

package
v0.0.0-...-17244d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoError             = C.VORBIS__no_error
	NeedMoreData        = C.VORBIS_need_more_data
	InvalidAPIMixing    = C.VORBIS_invalid_api_mixing
	OutOfMem            = C.VORBIS_outofmem
	FeatureNotSupported = C.VORBIS_feature_not_supported
	TooManyChannels     = C.VORBIS_too_many_channels
	FileOpenFailure     = C.VORBIS_file_open_failure
	SeekWithoutLength   = C.VORBIS_seek_without_length
	UnexpectedEOF       = C.VORBIS_unexpected_eof
	SeekInvalid         = C.VORBIS_seek_invalid

	// vorbis errors:
	InvalidSetup  = C.VORBIS_invalid_setup
	InvalidStream = C.VORBIS_invalid_stream

	// ogg errors:
	MissingCapturePattern         = C.VORBIS_missing_capture_pattern
	InvalidStreamStructureVersion = C.VORBIS_invalid_stream_structure_version
	InvalidContinuedPacketFlag    = C.VORBIS_continued_packet_flag_invalid
	IncorrectStreamSerialNumber   = C.VORBIS_incorrect_stream_serial_number
	InvalidFirstPage              = C.VORBIS_invalid_first_page
	BadPacketType                 = C.VORBIS_bad_packet_type
	CantFindLastPage              = C.VORBIS_cant_find_last_page
	SeekFailed                    = C.VORBIS_seek_failed
)

Variables

This section is empty.

Functions

func DecodeFile

func DecodeFile(filename string) (result []int16, channels int, sampleRate int, err error)

Types

type Decoder

type Decoder struct {
	Ptr unsafe.Pointer
}

func OpenFile

func OpenFile(filename string) (Decoder, error)

func (Decoder) Close

func (d Decoder) Close()

func (Decoder) GetError

func (d Decoder) GetError() error

func (Decoder) GetInfo

func (d Decoder) GetInfo() Info

func (Decoder) GetSamplesShortInterleaved

func (d Decoder) GetSamplesShortInterleaved(channels int, buffer []byte) int

func (Decoder) StreamLengthInSamples

func (d Decoder) StreamLengthInSamples() uint

type Error

type Error struct {
	Code int
}

func (Error) Error

func (err Error) Error() string

type Info

type Info struct {
	SampleRate uint
	Channels   int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL