|
lmms
Cross-platform music production software
|
#include <AudioEngine.h>
Classes | |
| class | RequestChangesGuard |
| RAII helper for requestChangesInModel. Used by AudioEngine::requestChangesGuard. More... | |
Signals | |
| void | qualitySettingsChanged () |
| void | sampleRateChanged () |
| void | nextAudioBuffer (const lmms::SampleFrame *buffer) |
Static Public Member Functions | |
| static sample_t | clip (const sample_t s) |
| static bool | isAudioDevNameValid (QString name) |
| static bool | isMidiDevNameValid (QString name) |
Private Member Functions | |
| void | renderNextBuffer (AudioBufferView< float > auto dst) |
| AudioEngine (bool renderOnly) | |
| ~AudioEngine () override | |
| void | startProcessing () |
| void | stopProcessing () |
| AudioDevice * | tryAudioDevices () |
| MidiClient * | tryMidiClients () |
| void | renderStageNoteSetup () |
| void | renderStageInstruments () |
| void | renderStageEffects () |
| void | renderStageMix () |
| void | swapBuffers () |
| void | clearInternal () |
| void | doSetAudioDevice (AudioDevice *_dev) |
Private Attributes | |
| bool | m_renderOnly |
| std::vector< AudioBusHandle * > | m_audioBusHandles |
| f_cnt_t | m_framesPerAudioBuffer |
| f_cnt_t | m_framesPerPeriod |
| sample_rate_t | m_baseSampleRate |
| SampleFrame * | m_inputBuffer [2] |
| f_cnt_t | m_inputBufferFrames [2] |
| f_cnt_t | m_inputBufferSize [2] |
| int | m_inputBufferRead |
| int | m_inputBufferWrite |
| std::unique_ptr< SampleFrame[]> | m_outputBufferRead |
| std::unique_ptr< SampleFrame[]> | m_outputBufferWrite |
| f_cnt_t | m_outputBufferReadIndex |
| std::vector< AudioEngineWorkerThread * > | m_workers |
| int | m_numWorkers |
| PlayHandleList | m_playHandles |
| LocklessList< PlayHandle * > | m_newPlayHandles |
| ConstPlayHandleList | m_playHandlesToRemove |
| float | m_masterGain |
| AudioDevice * | m_audioDev |
| AudioDevice * | m_oldAudioDev |
| QString | m_audioDevName |
| bool | m_audioDevStartFailed |
| MidiClient * | m_midiClient |
| QString | m_midiClientName |
| AudioEngineProfiler | m_profiler |
| bool | m_clearSignal |
| std::atomic< bool > | m_sanitizationEnabled = false |
| std::recursive_mutex | m_changeMutex |
Friends | |
| class | Engine |
| class | AudioEngineWorkerThread |
| class | ProjectRenderer |
|
private |
|
overrideprivate |
|
inline |
| bool lmms::AudioEngine::addPlayHandle | ( | PlayHandle * | handle | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| void lmms::AudioEngine::clear | ( | ) |
|
private |
| void lmms::AudioEngine::clearNewPlayHandles | ( | ) |
|
inline |
| bool lmms::AudioEngine::criticalXRuns | ( | ) | const |
|
inline |
| void lmms::AudioEngine::doneChangeInModel | ( | ) |
|
private |
|
inline |
|
inline |
| void lmms::AudioEngine::initDevices | ( | ) |
|
inline |
|
inline |
|
inline |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
|
signal |
|
inline |
|
inline |
|
inline |
| void lmms::AudioEngine::pushInputFrames | ( | SampleFrame * | _ab, |
| const f_cnt_t | _frames ) |
|
signal |
| void lmms::AudioEngine::removeAudioBusHandle | ( | AudioBusHandle * | busHandle | ) |
| void lmms::AudioEngine::removePlayHandle | ( | PlayHandle * | handle | ) |
| void lmms::AudioEngine::removePlayHandlesOfTypes | ( | Track * | track, |
| PlayHandle::Types | types ) |
|
inlineprivate |
|
inline |
Renders an audio buffer into dst.
Renders audio periods into dst. If dst is not a multiple of the period size, the remaining frames are partially rendered (an extra period may be rendered in such cases, which can degrade performance).
If dst has 1 channel, the channels are averaged to mono. If dst has 2 channels, the channels are directly copied. If dst has more than 2 channels, the stereo channels are copied and the rest are zero-filled.
| dst | An audio buffer view to write into. Both interleaved and planar overloads are provided. |
|
inline |
Renders an audio buffer into dst.
Renders audio periods into dst. If dst is not a multiple of the period size, the remaining frames are partially rendered (an extra period may be rendered in such cases, which can degrade performance).
If dst has 1 channel, the channels are averaged to mono. If dst has 2 channels, the channels are directly copied. If dst has more than 2 channels, the stereo channels are copied and the rest are zero-filled.
| dst | An audio buffer view to write into. Both interleaved and planar overloads are provided. |
| std::span< const SampleFrame > lmms::AudioEngine::renderNextPeriod | ( | ) |
Renders the next audio period.
An audio period is a fixed-size chunk of audio the engine generates, and represents a single cycle of the engine's output. The rendering is chunked into smaller periods to timely handle per-buffer updates like non-sample-accurate automation, as well as to improve memory cache performance.
The audio period generated is interleaved and stereo.
|
inline |
|
private |
|
private |
|
private |
|
private |
| void lmms::AudioEngine::requestChangeInModel | ( | ) |
Block until a change in model can be done (i.e. wait for audio thread).
|
inline |
| void lmms::AudioEngine::restoreAudioDevice | ( | ) |
|
signal |
|
inline |
| void lmms::AudioEngine::setAudioDevice | ( | AudioDevice * | _dev, |
| bool | startNow ) |
Set new audio device. Old device will be deleted, unless it's stored using storeAudioDevice
|
inline |
|
inline |
Enable/disable sanitization of inf/nan values.
|
inlineprivate |
|
inlineprivate |
| void lmms::AudioEngine::storeAudioDevice | ( | ) |
|
private |
|
private |
|
private |
|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |