20#include "OSLikeStuff/scheduler_api.h"
21#include "definitions_cxx.hpp"
22#include "dsp/compressor/rms_feedback.h"
23#include "dsp/envelope_follower/absolute_value.h"
24#include "memory/fast_allocator.h"
25#include "memory/object_pool.h"
26#include "model/output.h"
27#include "util/containers.h"
31struct InterruptsDisabled;
56enum class Polarity : uint8_t;
58namespace deluge::dsp {
137#define DO_AUDIO_LOG 0
139namespace AudioEngine {
140#define logAction(string) logAudioAction(string, __FILE__, __LINE__)
142using VoicePool = deluge::memory::ObjectPool<Voice, deluge::memory::fast_allocator>;
143using VoiceSamplePool = deluge::memory::ObjectPool<VoiceSample, deluge::memory::fast_allocator>;
144using TimeStretcherPool = deluge::memory::ObjectPool<TimeStretcher, deluge::memory::fast_allocator>;
147void routineWithClusterLoading(
bool mayProcessUserActionsBetween =
false);
164void previewSample(
String* path, FilePointer* filePointer,
bool shouldActuallySound,
PreviewVolume const& volume);
165void stopAnyPreviewing();
167void songSwapAboutToHappen();
168void killAllVoices(
bool deletingSong =
false);
169void logAudioAction(
char const*
string,
const char* file,
int line);
171void getReverbParamsFromSong(
Song* song);
174void voiceSampleUnassigned(
VoiceSample* voiceSample);
179LiveInputBuffer* getOrCreateLiveInputBuffer(OscType inputType,
bool mayCreate);
181void doRecorderCardRoutines();
183int32_t getNumSamplesLeftToOutputFromPreviousRender();
185void registerSideChainHit(int32_t strength);
187SampleRecorder* getNewRecorder(int32_t numChannels, AudioRecordingFolder folderID, AudioInputChannel mode,
188 bool keepFirstReasons,
bool writeLoopPoints, int32_t buttonPressLatency,
191bool isAnyInternalRecordingHappening();
195uint8_t logNextIndex = 0;
196uint32_t logAbsoluteIndex = 0;
197char* getEmptyLogEntry();
200int32_t getNumAudio();
201int32_t getNumVoices();
202bool doSomeOutputting();
203void updateReverbParams();
205extern bool headphonesPluggedIn;
206extern bool micPluggedIn;
207extern bool lineInPluggedIn;
208extern bool renderInStereo;
209extern uint32_t audioSampleTimer;
213extern bool inputMonitoringWarmedUp;
214extern bool mustUpdateReverbParamsBeforeNextRender;
215extern bool bypassCulling;
216extern uint32_t i2sTXBufferPos;
217extern uint32_t i2sRXBufferPos;
218extern int32_t cpuDireness;
219extern InputMonitoringMode inputMonitoringMode;
220extern bool audioRoutineLocked;
221extern bool routineBeenCalled;
222extern uint8_t numHopsEndedThisRoutineCall;
224extern uint32_t timeThereWasLastSomeReverb;
225extern deluge::fast_vector<Sound*> sounds;
227extern uint32_t nextVoiceState;
229extern int32_t reverbSidechainVolume;
230extern int32_t reverbSidechainShape;
231extern int32_t reverbPan;
235extern uint32_t timeLastSideChainHit;
236extern int32_t sizeLastSideChainHit;
239extern TaskID routine_task_id;
240void feedReverbBackdoorForGrain(
int index, q31_t value);
243q31_t getInputMonitoringGain(uint32_t offset);
246bool allowedToStartVoice();
250void cancelScheduledGates(uint8_t gateMask,
const InterruptsDisabled&);
252void midiGateOutputTimerFired();
Definition absolute_value.h:24
Definition instrument.h:45
Definition metronome.h:26
Definition model_stack.h:287
Definition param_manager.h:175
Definition rms_feedback.h:26
Definition sample_recorder.h:53
Definition sidechain.h:27
Definition sound_drum.h:28
Definition time_stretcher.h:37
Definition voice_sample.h:36
Definition audio_engine.h:154
int32_t velocityCableDepth
depth of the VELOCITY -> LOCAL_VOLUME patch cable
Definition audio_engine.h:157
int32_t volumePostFX
params::GLOBAL_VOLUME_POST_FX
Definition audio_engine.h:155
int32_t localVolume
params::LOCAL_VOLUME
Definition audio_engine.h:156
Polarity velocityCablePolarity
polarity of the VELOCITY -> LOCAL_VOLUME patch cable
Definition audio_engine.h:158
static PreviewVolume neutral()
The defaults the preview drum is built with, from Sound::initParams() and Sound::setupAsSample().
Definition audio_engine.cpp:1552
Definition sample_recorder.h:49
Definition functions.h:444
Definition stereo_sample.h:25