wav

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Overview

Package wav provides functionality to handle .wav files and .wav encoded data

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(r io.Reader) (audio.Audio, error)

Load loads wav data from the incoming reader as an audio

func Save

func Save(r io.ReadWriter, a audio.Audio) error

Save will eventually save an audio encoded as a wav to the given writer

Types

type Data

type Data struct {
	ChunkSize uint32 // L

	Subchunk1Size uint32 // L

	AudioFormat   uint16 // L
	NumChannels   uint16 // L
	SampleRate    uint32 // L
	ByteRate      uint32 // L
	BlockAlign    uint16 // L
	BitsPerSample uint16 // L

	Subchunk2Size uint32 // L
	Data          []byte // L
	// contains filtered or unexported fields
}

Data stores the raw information contained in a wav file

func Read

func Read(r io.Reader) (Data, error)

Read returns raw wav data from an input reader

Jump to

Keyboard shortcuts

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