JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::Thread::RealtimeOptions Struct Reference

A selection of options available when creating realtime threads. More...

#include "juce_Thread.h"

Public Member Functions

RealtimeOptions withPriority (int newPriority) const
 A value with a range of 0-10, where 10 is the highest priority.
 
RealtimeOptions withProcessingTimeMs (double newProcessingTimeMs) const
 Specify the expected amount of processing time required each time the thread wakes up.
 
RealtimeOptions withMaximumProcessingTimeMs (double newMaximumProcessingTimeMs) const
 Specify the maximum amount of processing time required each time the thread wakes up.
 
RealtimeOptions withApproximateAudioProcessingTime (int samplesPerFrame, double sampleRate) const
 Specify the maximum amount of processing time required each time the thread wakes up.
 
RealtimeOptions withPeriodMs (double newPeriodMs) const
 Specify the approximate amount of time between each thread wake up.
 
RealtimeOptions withPeriodHz (double newPeriodHz) const
 Specify the approximate frequency at which the thread will be woken up.
 
int getPriority () const
 Returns a value with a range of 0-10, where 10 is the highest priority.
 
std::optional< doublegetProcessingTimeMs () const
 Returns the expected amount of processing time required each time the thread wakes up.
 
std::optional< doublegetMaximumProcessingTimeMs () const
 Returns the maximum amount of processing time required each time the thread wakes up.
 
std::optional< doublegetPeriodMs () const
 Returns the approximate amount of time between each thread wake up, or nullopt if there is no inherent periodicity.
 

Detailed Description

A selection of options available when creating realtime threads.

See also
startRealtimeThread

Definition at line 76 of file juce_Thread.h.

Member Function Documentation

◆ getMaximumProcessingTimeMs()

std::optional< double > juce::Thread::RealtimeOptions::getMaximumProcessingTimeMs ( ) const

Returns the maximum amount of processing time required each time the thread wakes up.

See also
withMaximumProcessingTimeMs, getProcessingTimeMs, getPeriodMs

Definition at line 185 of file juce_Thread.h.

◆ getPeriodMs()

std::optional< double > juce::Thread::RealtimeOptions::getPeriodMs ( ) const

Returns the approximate amount of time between each thread wake up, or nullopt if there is no inherent periodicity.

See also
withPeriodMs, withPeriodHz, getProcessingTimeMs, getMaximumProcessingTimeMs

Definition at line 195 of file juce_Thread.h.

◆ getPriority()

int juce::Thread::RealtimeOptions::getPriority ( ) const

Returns a value with a range of 0-10, where 10 is the highest priority.

See also
withPriority

Definition at line 165 of file juce_Thread.h.

◆ getProcessingTimeMs()

std::optional< double > juce::Thread::RealtimeOptions::getProcessingTimeMs ( ) const

Returns the expected amount of processing time required each time the thread wakes up.

See also
withProcessingTimeMs, getMaximumProcessingTimeMs, getPeriodMs

Definition at line 175 of file juce_Thread.h.

◆ withApproximateAudioProcessingTime()

RealtimeOptions juce::Thread::RealtimeOptions::withApproximateAudioProcessingTime ( int  samplesPerFrame,
double  sampleRate 
) const

Specify the maximum amount of processing time required each time the thread wakes up.

This is identical to 'withMaximumProcessingTimeMs' except it calculates the processing time from a sample rate and block size. This is useful if you want to run this thread in parallel to an audio device thread.

Only used by macOS/iOS.

See also
withMaximumProcessingTimeMs, AudioWorkgroup, ScopedWorkgroupToken

Definition at line 124 of file juce_Thread.h.

◆ withMaximumProcessingTimeMs()

RealtimeOptions juce::Thread::RealtimeOptions::withMaximumProcessingTimeMs ( double  newMaximumProcessingTimeMs) const

Specify the maximum amount of processing time required each time the thread wakes up.

Only used by macOS/iOS.

See also
getMaximumProcessingTimeMs, withProcessingTimeMs, withPeriodMs, withPeriodHz

Definition at line 108 of file juce_Thread.h.

◆ withPeriodHz()

RealtimeOptions juce::Thread::RealtimeOptions::withPeriodHz ( double  newPeriodHz) const

Specify the approximate frequency at which the thread will be woken up.

Alternatively call withPeriodMs().

Only used by macOS/iOS.

See also
getPeriodHz, withPeriodMs, withProcessingTimeMs, withMaximumProcessingTimeMs,

Definition at line 155 of file juce_Thread.h.

◆ withPeriodMs()

RealtimeOptions juce::Thread::RealtimeOptions::withPeriodMs ( double  newPeriodMs) const

Specify the approximate amount of time between each thread wake up.

Alternatively call withPeriodHz().

Only used by macOS/iOS.

See also
getPeriodMs, withPeriodHz, withProcessingTimeMs, withMaximumProcessingTimeMs,

Definition at line 141 of file juce_Thread.h.

◆ withPriority()

RealtimeOptions juce::Thread::RealtimeOptions::withPriority ( int  newPriority) const

A value with a range of 0-10, where 10 is the highest priority.

Currently only used by Posix platforms.

See also
getPriority

Definition at line 84 of file juce_Thread.h.

◆ withProcessingTimeMs()

RealtimeOptions juce::Thread::RealtimeOptions::withProcessingTimeMs ( double  newProcessingTimeMs) const

Specify the expected amount of processing time required each time the thread wakes up.

Only used by macOS/iOS.

See also
getProcessingTimeMs, withMaximumProcessingTimeMs, withPeriodMs, withPeriodHz

Definition at line 96 of file juce_Thread.h.


The documentation for this struct was generated from the following file: