audio-time-0.0.1-alpha.1 has been yanked.
Encode and convert audio time spans between representations in number of samples, number of bytes and time duration.
#
# use Duration;
# use *;
#
// the Audio CD standard defines the encoding system as follows:
// 2 channels of LPCM audio, each signed 16-bit values sampled at 44100 Hz
let samples = from_duration;
assert_eq!;
let bytes = samples.into_bytes;
assert_eq!;
// both `Samples` and `Bytes` can be converted back into `Duration`s:
assert_eq!;
assert_eq!;
// let's define our own `System`
const SYSTEM: System = system!;
let samples = from_duration;
assert_eq!;
let bytes = samples.into_bytes;
assert_eq!;