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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_AudioProxyGenerator.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
15{
16public:
19
20 void deleteProxy (const AudioFile& proxyFile);
21
22 bool isProxyBeingGenerated (const AudioFile& proxyFile) const noexcept;
23 float getProportionComplete (const AudioFile& proxyFile) const noexcept;
24
25 //==============================================================================
27 {
28 GeneratorJob (const AudioFile& proxy);
29 ~GeneratorJob() override;
30
31 virtual bool render() = 0;
32
33 float getCurrentTaskProgress() override { return progress; }
34
35 ThreadPoolJob::JobStatus runJob() override;
36
38
39 AudioFile proxy;
40 std::atomic<float> progress { 0.0f };
41
42 private:
44 };
45
46 void beginJob (GeneratorJob*);
47
48private:
50 juce::CriticalSection jobListLock;
51
52 GeneratorJob* findJob (const AudioFile&) const noexcept;
53 void removeFinishedJob (GeneratorJob*);
54
56};
57
58}} // namespace tracktion { inline namespace engine
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)