audio

package
v0.0.12345 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WavReader

type WavReader struct {
	riff.Parser
	DataSize int
	// contains filtered or unexported fields
}

WavReader allows reading wav from any io.Reader Streaming is supported

func NewWavReader

func NewWavReader(r io.Reader) *WavReader

func (*WavReader) Read

func (r *WavReader) Read(buf []byte) (n int, err error)

Read returns PCM underneath

func (*WavReader) ReadHeaders

func (r *WavReader) ReadHeaders() error

ReadHeaders reads until data chunk

type WavWriter

type WavWriter struct {
	SampleRate  int
	BitDepth    int
	NumChans    int
	AudioFormat int

	W io.Writer
	// contains filtered or unexported fields
}

func NewWavWriter

func NewWavWriter(w io.Writer, dataSize int) *WavWriter

func (*WavWriter) Write

func (ww *WavWriter) Write(audio []byte) (int, error)

Jump to

Keyboard shortcuts

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