[−][src]Module spectrusty::audio
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
carousel | Tools for assisting audio rendering via audio frameworks that run on separate threads. |
host | Platform dependent audio device streaming implementations. |
music | Music-related functions. |
synth | Hard sync without aliasing. |
Structs
BlepAmpFilter | A wrapper Blep implementation that filters pulses' ∆ amplitude before sending them to the underlying implementation. |
BlepStereo | A wrapper Blep implementation that redirects extra channels to a stereo Blep as a monophonic channel. |
EarInAmps2 | Implements AmpLevels trait, useful when rendering EAR IN audio. |
EarMicAmps4 | Implements AmpLevels trait, useful when rendering combined EAR OUT and MIC OUT audio signal. |
EarOutAmps4 | Implements AmpLevels trait, useful when rendering EAR OUT audio ignoring MIC OUT signal. |
Constants
AMPS_EAR_IN | |
AMPS_EAR_IN_I16 | |
AMPS_EAR_IN_I32 | |
AMPS_EAR_MIC | |
AMPS_EAR_MIC_I16 | |
AMPS_EAR_MIC_I32 | |
AMPS_EAR_OUT | |
AMPS_EAR_OUT_I16 | |
AMPS_EAR_OUT_I32 | |
MARGIN_TSTATES |
Traits
AmpLevels | A digital level to a sample amplitude conversion trait. |
AudioFrame | A common trait for controllers rendering square-wave audio pulses. |
AudioSample | Provides various methods to primitive types being used as audio samples. |
Blep | A trait for interfacing Bandwidth-Limited Pulse Buffer implementations by square-wave audio generators. |
EarInAudioFrame | A trait for controllers generating audio pulses from the EAR input. |
EarMicOutAudioFrame | A trait for controllers generating audio pulses from the EAR/MIC output. |
FromSample | For converting samples between types. |
IntoSample | For converting samples between types. |
MulNorm | This trait is being used for scaling sample amplitudes. |
SampleDelta | This trait is being used to calculate sample amplitude differences (∆). |
UlaAudioFrame | A grouping trait of common audio rendering traits for all emulated |
Functions
render_audio_frame_ts | A helper method for rendering square-wave audio from slices containing updates of audio digital levels, sorted by T-state counter value. |
render_audio_frame_vts | 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
FTs | A linear T-state timestamp type. |