beep: github.com/faiface/beep/wav Index | Files

package wav

import "github.com/faiface/beep/wav"

Package wav implements audio data decoding and encoding in WAVE format.

Index

Package Files

decode.go doc.go encode.go

func Decode Uses

func Decode(rc io.ReadCloser) (s beep.StreamSeekCloser, format beep.Format, err error)

Decode takes a ReadCloser containing audio data in WAVE format and returns a StreamSeekCloser, which streams that audio. The Seek method will panic if rc is not io.Seeker.

Do not close the supplied ReadSeekCloser, instead, use the Close method of the returned StreamSeekCloser when you want to release the resources.

func Encode Uses

func Encode(w io.WriteSeeker, s beep.Streamer, format beep.Format) (err error)

Encode writes all audio streamed from s to w in WAVE format.

Format precision must be 1 or 2 bytes.

Package wav imports 7 packages (graph). Updated 2017-07-29. Refresh now. Tools for package owners.