audio

package
v0.0.0-...-a4649ec Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBufferFromSamples

func NewBufferFromSamples(format beep.Format, samples []float32) *beep.Buffer

func Stream

func Stream(streamer beep.Streamer, numSamples int) ([]float32, error)

func StreamAll

func StreamAll(streamer beep.Streamer) ([]float32, error)

func ToWav

func ToWav(pcmData []float32, sampleRate int) ([]byte, error)

Types

type ByteSliceWriteSeeker

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

func NewByteSliceWriteSeeker

func NewByteSliceWriteSeeker(initialSize int64) *ByteSliceWriteSeeker

func (*ByteSliceWriteSeeker) Bytes

func (b *ByteSliceWriteSeeker) Bytes() []byte

func (*ByteSliceWriteSeeker) Seek

func (b *ByteSliceWriteSeeker) Seek(offset int64, whence int) (int64, error)

func (*ByteSliceWriteSeeker) Write

func (b *ByteSliceWriteSeeker) Write(p []byte) (n int, err error)

type Float32Stream

type Float32Stream struct {
	Samples []float32
	// contains filtered or unexported fields
}

func (*Float32Stream) Err

func (s *Float32Stream) Err() error

func (*Float32Stream) Stream

func (s *Float32Stream) Stream(samples [][2]float64) (n int, ok bool)

Jump to

Keyboard shortcuts

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