Module audio

Source
Expand description

Provides an interface to output sound to the user’s speakers.

It consists of two main types: SoundData is just an array of raw sound data bytes, and a Source is a SoundData connected to a particular sound channel ready to be played.

Structs§

AudioContext
A struct that contains all information for tracking sound info.
SoundData
Static sound data stored in memory. It is Arc’ed, so cheap to clone.
Source
A source of audio data that is connected to an output channel and ready to play. It will stop playing when dropped.
SpatialSource
A source of audio data located in space relative to a listener’s ears. Will stop playing when dropped.

Traits§

SoundSource
A trait defining the operations possible on a sound; it is implemented by both Source and SpatialSource.