mp3

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

Stream is a decoded stream.

func Decode

func Decode(src convert.ReadSeekCloser, sr int) (*Stream, error)

Decode decodes MP3 source and returns a decoded stream.

Decode returns error when decoding fails or IO error happens.

Decode automatically resamples the stream to fit with the audio context if necessary.

func (*Stream) Close

func (s *Stream) Close() error

Close is implementation of io.Closer's Close.

func (*Stream) Length

func (s *Stream) Length() int64

Length returns the size of decoded stream in bytes.

func (*Stream) Read

func (s *Stream) Read(buf []byte) (int, error)

Read is implementation of io.Reader's Read.

func (*Stream) Seek

func (s *Stream) Seek(offset int64, whence int) (int64, error)

Seek is implementation of io.Seeker's Seek.

func (*Stream) Size

func (s *Stream) Size() int64

Size is deprecated as of 1.6.0-alpha. Use Length instead.

Jump to

Keyboard shortcuts

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