mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Thread: Introduce a new Thread backend
This is a breaking change - see BREAKING-CHANGES.txt
This commit is contained in:
parent
621e14d092
commit
d3cff375be
39 changed files with 849 additions and 603 deletions
|
|
@ -325,7 +325,7 @@ public:
|
|||
// audio setup
|
||||
formatManager.registerBasicFormats();
|
||||
|
||||
thread.startThread (3);
|
||||
thread.startThread (Thread::Priority::normal);
|
||||
|
||||
#ifndef JUCE_DEMO_RUNNER
|
||||
RuntimePermissions::request (RuntimePermissions::recordAudio,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
{
|
||||
setOpaque (true);
|
||||
imageList.setDirectory (File::getSpecialLocation (File::userPicturesDirectory), true, true);
|
||||
directoryThread.startThread (1);
|
||||
directoryThread.startThread (Thread::Priority::background);
|
||||
|
||||
fileTree.setTitle ("Files");
|
||||
fileTree.addListener (this);
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ public:
|
|||
setOpaque (true);
|
||||
|
||||
movieList.setDirectory (File::getSpecialLocation (File::userMoviesDirectory), true, true);
|
||||
directoryThread.startThread (1);
|
||||
directoryThread.startThread (Thread::Priority::background);
|
||||
|
||||
fileTree.setTitle ("Files");
|
||||
fileTree.addListener (this);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
SharedTimeSliceThread()
|
||||
: TimeSliceThread (String (JucePlugin_Name) + " ARA Sample Reading Thread")
|
||||
{
|
||||
startThread (7); // Above default priority so playback is fluent, but below realtime
|
||||
startThread (Priority::high); // Above default priority so playback is fluent, but below realtime
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -148,9 +148,7 @@ public:
|
|||
: BouncingBall (containerComp),
|
||||
Thread ("JUCE Demo Thread")
|
||||
{
|
||||
// give the threads a random priority, so some will move more
|
||||
// smoothly than others..
|
||||
startThread (Random::getSystemRandom().nextInt (3) + 3);
|
||||
startThread();
|
||||
}
|
||||
|
||||
~DemoThread() override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue