wav

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(sampleRate uint32, bitPerSample, numOfChannels uint16, raw []byte) ([]byte, error)

Write ...

Types

type Data

type Data struct {
	ID   string
	Size uint32
}

Data data chunk

func (*Data) String

func (d *Data) String() string

type Format

type Format struct {
	ID           string
	Size         uint32
	AudioFormat  uint16
	Channels     uint16
	SampleRate   uint32
	ByteRate     uint32
	BlockAlign   uint16
	BitPerSample uint16
	Extra        []byte
}

Format format chunk

func (*Format) String

func (f *Format) String() string

type Info

type Info struct {
	FileSize uint32
	Duration int64
	RIFF     *RIFF
	Format   *Format
	Data     *Data
	Extra    map[string]uint32
}

Info wave information.

func Read

func Read(raw []byte) (*Info, error)

Read ...

func (*Info) String

func (i *Info) String() string

type RIFF

type RIFF struct {
	ID     string
	Size   uint32
	Format string
}

RIFF riff chunk

func (*RIFF) String

func (r *RIFF) String() string

Jump to

Keyboard shortcuts

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