Deluge Firmware 1.3.0
Build date: 2026.03.02
Loading...
Searching...
No Matches
AudioFileManager Class Reference
Collaboration diagram for AudioFileManager:

Public Member Functions

void init ()
AudioFilegetAudioFileFromFilename (String &fileName, bool mayReadCard, Error *error, FilePointer *filePointer, AudioFileType type, bool makeWaveTableWorkAtAllCosts=false)
bool loadCluster (Cluster &cluster, int32_t minNumReasonsAfter=0)
void loadAnyEnqueuedClusters (int32_t maxNum=128, bool mayProcessUserActionsBetween=false)
void removeReasonFromCluster (Cluster &cluster, char const *errorCode, bool deletingSong=false)
bool ensureEnoughMemoryForOneMoreAudioFile ()
void slowRoutine ()
Error setupAlternateAudioFilePath (String &newPath, int32_t dirPathLength, String &oldPath)
Error setupAlternateAudioFileDir (String &newPath, char const *rootDir, String &songFilenameWithoutExtension)
bool loadingQueueHasAnyLowestPriorityElements ()
Error getUnusedAudioRecordingFilePath (String &filePath, String *tempFilePathForRecording, AudioRecordingFolder folder, uint32_t *getNumber, const char *channelName, String *songName)
void deleteAnyTempRecordedSamplesFromMemory ()
void deleteUnusedAudioFileFromMemory (AudioFile &audioFile, int32_t i)
void deleteUnusedAudioFileFromMemoryIndexUnknown (AudioFile &audioFile)
bool tryToDeleteAudioFileFromMemoryIfItExists (char const *filePath)
void thingBeginningLoading (ThingType newThingType)
void thingFinishedLoading ()
void setCardRead ()
void setCardEjected ()
void firstCardRead ()

Public Attributes

AudioFileVector audioFiles
ClusterPriorityQueue loadingQueue
ClusterclusterBeingLoaded
int32_t minNumReasonsForClusterBeingLoaded
String alternateAudioFileLoadPath
AlternateLoadDirStatus alternateLoadDirStatus = AlternateLoadDirStatus::NONE_SET
ThingType thingTypeBeingLoaded = ThingType::NONE
DIR alternateLoadDir
std::array< int32_t, kNumAudioRecordingFolders > highestUsedAudioRecordingNumber
std::bitset< kNumAudioRecordingFolders > highestUsedAudioRecordingNumberNeedsReChecking

Private Member Functions

void cardReinserted ()
int32_t readBytes (char *buffer, int32_t num, int32_t *byteIndexWithinCluster, Cluster **currentCluster, uint32_t *currentClusterIndex, uint32_t fileSize, Sample *sample)
int32_t loadAiff (Sample *newSample, uint32_t fileSize, Cluster **currentCluster, uint32_t *currentClusterIndex)
int32_t loadWav (Sample *newSample, uint32_t fileSize, Cluster **currentCluster, uint32_t *currentClusterIndex)

Private Attributes

bool cardReadOnce {false}
bool cardEjected
bool cardDisabled = false
uint32_t clusterSizeAtBoot {0}

Member Function Documentation

◆ getUnusedAudioRecordingFilePath()

Error AudioFileManager::getUnusedAudioRecordingFilePath ( String & filePath,
String * tempFilePathForRecording,
AudioRecordingFolder folder,
uint32_t * getNumber,
const char * channelName,
String * songName )

If songname isn't supplied the file is placed in the main recording folder and named as samples/folder/REC###. If song and channel are supplied then it's placed in samples/folder/song/channel_###


The documentation for this class was generated from the following files: