Module awedio::sounds::wrappers

source ·
Expand description

Wrappers add functionality or modify an existing Sound.

This is the Decorator pattern.

This are normally accessed from functions on the Sound trait instead of directly.

Re-exports

Modules

Structs

  • A wrapper that adjusts the speed of the inner sound.
  • A wrapper that adjusts the volume of the inner sound.
  • Convert a Sound to have a specified number of output channels. For example convert a mono sound to stereo or vice versa.
  • Notify via a std::sync::mpsc::Receiver when the contained Sound has Finished. A single message is sent when the sound has completed.
  • Wrap a Sound so that it can be controlled via a Controller even after it has been added to the Manager and/or started playing.
  • The remote Controller for a Sound wrapped in a Controllable.
  • Play the first part of an inner Sound measured in seconds then stop even if the inner sound still has samples remaining. Finishes early if the inner sound finishes before duration. Any time the inner sample is paused does not count against the duration (i.e. duration only includes time of samples).
  • A wrapper to make a Sound pausable.
  • Convert a Sound from one sample rate (number of samples per second) to another.

Traits

  • A Sound which contains other sounds that can be added to it.
  • A Sound which contains other sounds and those Sounds can be cleared.
  • A Sound which can be paused.
  • A sound that can have the playback speed adjusted.
  • A sound that can have the loudness adjusted.
  • Super trait that implements all traits that a wrapper Sound should transparently pass through if implemented by the inner sound. If you have a wrapper that should handle any of these traits specially besides just passing through, then you should not implement this trait but implement all of the traits individually.