Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultFramesPerBuffer default amount of audio frames read per buffer DefaultFramesPerBuffer int = 4096 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is the type for a function option
func FramesPerBuffer ¶
FramesPerBuffer is a functional option which sets the amount of audio frames the wavReader will provide when executing the callback. Example: A buffer with 960 frames at 48000kHz / stereo contains 1920 samples and results in 20ms Audio.
type Options ¶
type Options struct {
FramesPerBuffer int
}
Options contains the parameters for initializing a wav Reader.
type WavReader ¶
WavReader implements the audio.Source interface and is used to read (play) audio frames from a wav source (e.g. file).
func NewWavReader ¶
NewWavReader reads a wav file from disk into memory and returns a WavReader object which implements the audio.Source interface.
Click to show internal directories.
Click to hide internal directories.