tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_AudioFileManager.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
14class TracktionThumbnailCache;
15
16//==============================================================================
20{
21public:
24
25 AudioFile getAudioFile (ProjectItemID);
26 AudioFileInfo getInfo (const AudioFile&);
27
28 void checkFileForChangesAsync (const AudioFile&);
29 void checkFileForChanges (const AudioFile&);
30 void checkFilesForChanges();
31 void forceFileUpdate (const AudioFile&);
32 void validateFile (const AudioFile&, bool updateInfo);
33
34 void releaseFile (const AudioFile&);
35 void releaseAllFiles();
36
37 juce::AudioThumbnailCache& getAudioThumbnailCache() { return *thumbnailCache; }
38
39 Engine& engine;
40 AudioProxyGenerator proxyGenerator;
41 AudioFileCache cache;
42
43private:
44 struct KnownFile;
46 juce::CriticalSection knownFilesLock;
47
48 KnownFile& findOrCreateKnown (const AudioFile&);
49 void removeFile (HashCode);
50 void clearFiles();
51
52 juce::Array<AudioFile> filesToCheck;
53
54 void handleAsyncUpdate();
55 bool checkFileTime (KnownFile&);
56 void callListeners (const AudioFile&);
57 void callListenersOnMessageThread (const AudioFile&);
58
59 friend class TracktionThumbnailCache;
60 friend class SmartThumbnail;
62 std::set<size_t> thumbnailTypeHashes;
64 juce::Array<SmartThumbnail*> activeThumbnails;
65 juce::CriticalSection activeThumbnailLock;
66
68};
69
70}} // namespace tracktion { inline namespace engine
The Engine is the central class for all tracktion sessions.
An ID representing one of the items in a Project.
SmartThumnail automatically tracks changes to an AudioFile and will update its cache if the file chan...
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)