mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
AudioProcessor: Add isRealtime()
This commit is contained in:
parent
8c62b4f003
commit
db17713aad
1 changed files with 21 additions and 0 deletions
|
|
@ -71,6 +71,12 @@ public:
|
|||
doublePrecision
|
||||
};
|
||||
|
||||
enum class Realtime
|
||||
{
|
||||
no,
|
||||
yes
|
||||
};
|
||||
|
||||
using ChangeDetails = AudioProcessorListener::ChangeDetails;
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -916,6 +922,21 @@ public:
|
|||
*/
|
||||
bool isNonRealtime() const noexcept { return nonRealtime; }
|
||||
|
||||
/** Returns no if the processor is being run in an offline mode for rendering.
|
||||
|
||||
If the processor is being run live on realtime signals, this returns yes.
|
||||
If the mode is unknown, this will assume it's realtime and return yes.
|
||||
|
||||
This value may be unreliable until the prepareToPlay() method has been called,
|
||||
and could change each time prepareToPlay() is called.
|
||||
|
||||
@see setNonRealtime()
|
||||
*/
|
||||
Realtime isRealtime() const noexcept
|
||||
{
|
||||
return isNonRealtime() ? Realtime::no : Realtime::yes;
|
||||
}
|
||||
|
||||
/** Called by the host to tell this processor whether it's being used in a non-realtime
|
||||
capacity for offline rendering or bouncing.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue