audio

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: BSD-2-Clause Imports: 4 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.

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