ogg

package module
v0.0.0-...-508bbcd Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2011 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

NAME
    ogg is a Go wrapper around C libogg library.

AUTHORS
    Viacheslav Chumushuk <voice@root.ua>

COPYING
    This programm is released under the GNU General Public License version 3 or later, which is
    distributed in the COPYING file. You should have received a copy of the GNU General Public License along with
    this program.  If not, see <http://www.gnu.org/licenses/>.

Documentation

Index

Constants

View Source
const (
	LittleEndian = 0
	BigEndian    = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	UserComments []string
	Vendor       string
}

The Comment structure defines an Ogg Vorbis comment.

type File

type File struct {

	// Specifies big or little endian byte packing.
	Endianness int
	// Specifies word size. Possible arguments are 1 for 8-bit samples, or 2 or 16-bit samples. Typical value is 2.
	WordSize int
	// Signed or unsigned data. 0 for unsigned, 1 for signed. Typically 1.
	Signed bool
	// contains filtered or unexported fields
}

The File structure defines an Ogg Vorbis file.

func New

func New(filename string) (file *File, err os.Error)

New is the simplest function used to open and initialize an File structure. It sets up all the related decoding structure.

func (*File) Close

func (file *File) Close()

Close release file related resources.

func (*File) Comment

func (file *File) Comment() *Comment

Comment returns Comment structure for the file.

func (*File) Info

func (file *File) Info() *Info

Info returns Info structure for the file.

func (*File) Read

func (file *File) Read(buf []byte) int

Read returns up to the specified number of bytes of decoded PCM audio. Return number of read 16-bit words.

func (*File) TimeTell

func (file *File) TimeTell() float64

TimeTell returns the current decoding offset in seconds.

func (*File) TimeTotal

func (file *File) TimeTotal() float64

TimeTotal returns the total time in seconds of the physical bitstream.

type Info

type Info struct {
	Version        int
	Channels       int
	Rate           int32
	BitrateUpper   int32
	BitrateNominal int32
	BitrateLower   int32
	BitrateWindow  int32
}

The Info structure contains basic information about the audio in a vorbis bitstream.

Jump to

Keyboard shortcuts

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