# Functions
BatchLoad attempts to load all audio files within a given directory should their file ending match a registered audio file parser.
BlankBatchLoad acts like BatchLoad, but replaces all loaded assets with empty audio constructs.
FadeIn wraps a reader such that it will linearly fade in over the given duration.
FadeOut wraps a reader such that it will linearly fade out over the given duration.
Get calls Get on the Default Cache.
Init initializes the pcm package to create writer objects with a specific audio driver.
InitDefault calls Init with the following value by OS: windows: DriverDirectSound linux,osx: DriverPulse.
Load calls Load on the Default Cache.
LoopReader will cache read bytes as they are read and resend them after the reader returns EOF.
MustNewWriter calls NewWriter and panics if an error is returned.
NewCache returns an empty Cache.
NewWriter returns a writer which can accept audio streamed matching the given format.
Play will copy data from the provided src to the provided dst until ctx is cancelled.
ReadAll will read all of the content within a reader and convert it into a BytesReader.
ReadAtLeast acts like io.ReadAtLeast with a pcm Reader.
ReadFull acts like io.ReadFull with a pcm Reader.
# Constants
DriverDefault indicates to this package to use a default driver based on the OS.
WriterBufferLengthInSeconds defines how much data os-level writers provided by this package will rotate through in a theoretical circular buffer.
# Variables
DefaultCache is the receiver for package level loading operations.
ErrMismatchedPCMFormat will be returned by operations streaming from Readers to Writers where the PCM formats of those Readers and Writers are not equivalent.
TODO: do other drivers need this? Can we pick devices more intelligently?.
# Structs
A BytesReader acts like a bytes.Buffer for converting raw []bytes into pcm Readers.
Cache is a simple audio data cache.
A LoopingReader will read from Reader continually, even after it has been fully consumed.
PlayOptions define ways to configure how playback of some audio proceeds.
# Type aliases
A Driver defines the underlying interface that should be used for initializing PCM audio writers.
A PlayOption sets some value on a PlayOptions struct.