audio

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectMimeTypeFromFile added in v0.2.0

func DetectMimeTypeFromFile(path string) (string, error)

func DetectMimeTypeFromReader added in v0.2.0

func DetectMimeTypeFromReader(reader io.Reader) (string, error)

Types

type FLACSource

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

func ReadFLACFromFile

func ReadFLACFromFile(path string) (*FLACSource, error)

func ReadFLACFromReader

func ReadFLACFromReader(reader io.Reader) (*FLACSource, error)

func (*FLACSource) Frames

func (f *FLACSource) Frames() [][]float64

func (*FLACSource) Info

func (f *FLACSource) Info() Info

type Info

type Info struct {
	NumChannels   int
	SampleRate    int
	BitsPerSample int
}

type Source

type Source interface {
	Info() Info
	Frames() [][]float64
}

func ReadFromFile

func ReadFromFile(path string) (Source, error)

type WAVSource

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

func ReadWAVFromFile

func ReadWAVFromFile(path string) (*WAVSource, error)

func ReadWAVFromReader

func ReadWAVFromReader(reader io.Reader) (*WAVSource, error)

func (*WAVSource) Frames

func (wavSource *WAVSource) Frames() [][]float64

func (*WAVSource) Info

func (wavSource *WAVSource) Info() Info

Jump to

Keyboard shortcuts

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