Expand description

Module for playing sounds

Re-exports

pub use interval::Interval;
pub use pcm_util::PCMSlice;
pub use audio_backends::*;

Modules

Structs

The core of AudioDeviceCore has common resources all platform-specific implementations will need.
Creating this object is not enough to play sound. We will need to convert this into a FlufflAudioDeviceContex
This struct is mostly used as a way to setup state, define a callback and specify things like channels, frequency, etc.
Look at the examples for a complete example on how to do this.
A POD-ish struct for defining properties of the sound we with to play
If one of the fields isn’t defined it will fallback to a somewhat sane default value

Traits

A trait used to define properties of the sound before playing

Functions

given a num_samples and frequency it returns the elapsed time in ms
given frequency (in sample/sec) and dt(in milliseconds), it can calculate samples required per channel
given frequency (in sample/sec) and dt(in milliseconds), it can calculate samples required per channel

Type Definitions

When playing/generating sound a callback will be required and it will need to be of this format.