Help us shape the future of Go! Take the 2026 Go Developer Survey

wav

package module
v0.0.0-...-fda505a Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2014 License: BSD-3-Clause Imports: 4 Imported by: 0

README

GoDoc

wav

Package wav is a wav file reader and writer

Documentation

Overview

Package wav implements wave file reader and writer.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileFormat = errors.New("Unexpected data in header")
	ErrClosed     = errors.New("Closed")
)

Functions

This section is empty.

Types

type Header struct {
	Channels   uint8
	SampleRate uint32
	BPS        uint16
}

type Reader

type Reader struct {
	Header
	// contains filtered or unexported fields
}

Reader is a wav file reader.

func NewReader

func NewReader(r io.Reader) (*Reader, error)

NewReader creates wav reader from Reader.

func (*Reader) Close

func (m *Reader) Close() error

func (*Reader) Read

func (m *Reader) Read(p []byte) (n int, err error)

type Writer

type Writer struct {
	Header
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.WriteSeeker, h Header) (*Writer, error)

func (*Writer) Close

func (m *Writer) Close() error

func (*Writer) Write

func (m *Writer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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