![]() |
Deluge Firmware 1.3.0
Build date: 2026.11.22
|

Public Member Functions | |
| Error | setup (int32_t newNumChannels, AudioInputChannel newMode, bool newKeepingReasons, bool shouldRecordExtraMargins, AudioRecordingFolder newFolderID, int32_t buttonPressLatency, Output *outputRecordingFrom, RecorderConfig config={}) |
| void | setRecordingThreshold (RecorderConfig config) |
| void | feedAudio (std::span< StereoSample > input, bool applyGain=false, uint8_t gainToApply=5) |
| Error | cardRoutine () |
| void | endSyncedRecording (int32_t buttonLatencyForTempolessRecording) |
| bool | inputLooksDifferential () |
| bool | inputHasNoRightChannel () |
| void | removeFromOutput () |
| void | abort () |
| StereoFloatSample | getInputLevels () |
Public Attributes | |
| SampleRecorder * | next |
| gsl::owner< Sample * > | sample |
| int32_t | numSamplesToRunBeforeBeginningCapturing |
| uint32_t | numSamplesBeenRunning |
| uint32_t | numSamplesCaptured |
| uint32_t | numSamplesExtraToCaptureAtEndSyncingWise |
| int32_t | firstUnwrittenClusterIndex = 0 |
| int32_t | currentRecordClusterIndex = -1 |
| Cluster * | currentRecordCluster = nullptr |
| uint32_t | audioFileNumber |
| AudioRecordingFolder | folderID |
| char * | writePos |
| char * | clusterEndPos |
| String | filePathCreated |
| RecorderStatus | status = RecorderStatus::CAPTURING_DATA |
| AudioInputChannel | mode |
| Output * | outputRecordingFrom |
| bool | recordingOwnClip = false |
| bool | haveAddedSampleToArray = false |
| bool | allowFileAlterationAfter = false |
| bool | allowNormalization = true |
| bool | autoDeleteWhenDone = false |
| bool | keepingReasonsForFirstClusters |
| uint8_t | recordingNumChannels |
| bool | hadCardError = false |
| bool | reachedMaxFileSize = false |
| bool | recordingExtraMargins = false |
| bool | pointerHeldElsewhere = false |
| bool | capturedTooMuch = false |
| bool | thresholdRecording = false |
| bool | monitorInputLevels = false |
| uint32_t | minThresholdMargin = 0 |
| StereoFloatSample | approxRMSLevel {0} |
| bool | recordingClippedRecently |
| int32_t | recordPeakL |
| int32_t | recordPeakR |
| int32_t | recordPeakLMinusR |
| uint64_t | recordSumL |
| uint64_t | recordSumR |
| uint64_t | recordSumLPlusR |
| uint64_t | recordSumLMinusR |
| int32_t | recordMax |
| int32_t | recordMin |
| uint32_t | audioDataLengthBytesAsWrittenToFile |
| uint32_t | loopEndSampleAsWrittenToFile |
| float | startValueThreshold |
| int32_t * | sourcePos |
| std::optional< FatFS::File > | file |
Private Member Functions | |
| void | setExtraBytesOnPreviousCluster (Cluster *currentCluster, int32_t currentClusterIndex) |
| Error | writeCluster (int32_t clusterIndex, size_t numBytes) |
| Error | alterFile (MonitoringAction action, int32_t lshiftAmount, uint32_t idealFileSizeBeforeAction, uint64_t dataLengthAfterAction) |
| Error | finalizeRecordedFile () |
| Error | createNextCluster () |
| Error | writeAnyCompletedClusters () |
| void | finishCapturing () |
| void | updateDataLengthInFirstCluster (Cluster *cluster) |
| void | totalSampleLengthNowKnown (uint32_t totalLength, uint32_t loopEndPointSamples=0) |
| void | detachSample () |
| Error | truncateFileDownToSize (uint32_t newFileSize) |
| Error | writeOneCompletedCluster () |
Private Attributes | |
| AbsValueFollower | envelopeFollower {} |
| float | pendingPeakMeanL = 0 |
| float | pendingPeakMeanR = 0 |
| uint32_t | pendingLevelNumSamples = 0 |
| StereoFloatSample SampleRecorder::getInputLevels | ( | ) |
For monitorInputLevels: folds the peak levels collected by the audio routine since the last call into approxRMSLevel, and returns it. Keeps the envelope maths out of the audio routine once the threshold has triggered. Call from the UI, not the audio routine.