audio

package
v0.0.0-...-e78e2ff Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2018 License: BSD-3-Clause Imports: 2 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeSoundChunk

func EncodeSoundChunk(soundData SoundData) []byte

EncodeSoundChunk encodes the provided sound data into a byte array for a chunk.

Types

type SoundData

type SoundData interface {
	// SampleRate returns the amount of samples per second.
	SampleRate() float32
	// SampleCount returns the number of samples available from this data.
	SampleCount() int
	// Samples returns the samples in the given range
	Samples(from, to int) []byte
}

SoundData wraps the basic information about a collection of sound samples. The format is mono with usigned 8-bit PCM coding.

func DecodeSoundChunk

func DecodeSoundChunk(data []byte) (SoundData, error)

DecodeSoundChunk decodes the data of a chunk of type SoundData.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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