Module spectrusty::audio

source ·
Expand description

Audio API.

                     /---- ensure_audio_frame_time ----\
  +----------------------+                         +--------+
  |    UlaAudioFrame:    |  render_*_audio_frame   |        |
  |      AudioFrame +    | ======================> |  Blep  |
  | EarMicOutAudioFrame +|     end_audio_frame     |        |
  |   EarInAudioFrame +  |                         |        |
  |   [ AyAudioFrame ]   |                         +--------+
  +----------------------+                             |     
  |      AmpLevels       |        /----------------- (sum)   
  +----------------------+        |                    v       
                                  v                 carousel 
                           +-------------+   +--------------------+
                           | (WavWriter) |   | AudioFrameProducer |
                           +-------------+   +--------------------+
                                               || (AudioBuffer) ||
                                             +====================+
                                             |  * audio thread *  |
                                             |                    |
                                             | AudioFrameConsumer |
                                             +====================+

Modules

Tools for assisting audio rendering via audio frameworks that run on separate threads.
Platform dependent audio device streaming implementations.
Music-related functions.
Hard sync without aliasing.

Structs

A wrapper Blep implementation that filters pulses’ ∆ amplitude before sending them to the underlying implementation.
A wrapper Blep implementation that redirects extra channels to a stereo Blep as a monophonic channel.
Implements AmpLevels trait, useful when rendering EAR IN audio.
Implements AmpLevels trait, useful when rendering combined EAR OUT and MIC OUT audio signal.
Implements AmpLevels trait, useful when rendering EAR OUT audio ignoring MIC OUT signal.

Constants

Traits

A digital level to a sample amplitude conversion trait.
A common trait for controllers rendering square-wave audio pulses.
Provides various methods to primitive types being used as audio samples.
A trait for interfacing Bandwidth-Limited Pulse Buffer implementations by square-wave audio generators.
A trait for controllers generating audio pulses from the EAR input.
A trait for controllers generating audio pulses from the EAR/MIC output.
For converting samples between types.
For converting samples between types.
This trait is being used for scaling sample amplitudes.
This trait is being used to calculate sample amplitude differences (∆).
A grouping trait of common audio rendering traits for all emulated Ula chipsets.

Functions

A helper method for rendering square-wave audio from slices containing updates of audio digital levels, sorted by T-state counter value.
A helper method for rendering square-wave audio from slices containing updates of audio digital levels, sorted by time encoded in VideoTs time stamps.

Type Definitions

A linear T-state timestamp type.