|
LMMS
|
#include <juce_AudioPlayHead.h>
Private Types | |
| enum | { flagTimeSignature = 1 << 0 , flagLoopPoints = 1 << 1 , flagFrameRate = 1 << 2 , flagTimeSeconds = 1 << 3 , flagLastBarStartPpq = 1 << 4 , flagPpqPosition = 1 << 5 , flagOriginTime = 1 << 6 , flagTempo = 1 << 7 , flagTimeSamples = 1 << 8 , flagBarCount = 1 << 9 , flagHostTimeNs = 1 << 10 , flagIsPlaying = 1 << 11 , flagIsRecording = 1 << 12 , flagIsLooping = 1 << 13 } |
Private Member Functions | |
| bool | getFlag (int64_t flagToCheck) const |
| void | setFlag (int64_t flagToCheck, bool value) |
| template<typename Value> | |
| Optional< Value > | getOptional (int64_t flagToCheck, Value value) const |
| template<typename Value> | |
| void | setOptional (int64_t flagToCheck, Value &value, Optional< Value > opt) |
Private Attributes | |
| TimeSignature | timeSignature |
| LoopPoints | loopPoints |
| FrameRate | frame = FrameRateType::fps23976 |
| double | timeInSeconds = 0.0 |
| double | lastBarStartPpq = 0.0 |
| double | positionPpq = 0.0 |
| double | originTime = 0.0 |
| double | tempoBpm = 0.0 |
| int64_t | timeInSamples = 0 |
| int64_t | barCount = 0 |
| uint64_t | hostTimeNs = 0 |
| int64_t | flags = 0 |
Describes the time at the start of the current audio callback.
Not all hosts and plugin formats can provide all of the possible time information, so most of the getter functions in this class return an Optional that will only be engaged if the host provides the corresponding information. As a plugin developer, you should code defensively so that the plugin behaves sensibly even when the host fails to provide timing information.
A default-constructed instance of this class will return nullopt from all functions that return an Optional.
|
private |
|
inline |
The number of bars since the beginning of the timeline.
This value isn't available in all hosts or in all plugin formats.
|
inline |
Returns the bpm, if available.
|
inline |
For timecode, the position of the start of the timeline, in seconds from 00:00:00:00.
|
inlineprivate |
The video frame rate, if available.
|
inline |
Get the host's callback time in nanoseconds, if available.
|
inline |
True if the transport is currently looping.
|
inline |
True if the transport is currently playing.
|
inline |
True if the transport is currently recording.
(When isRecording is true, then isPlaying will also be true).
|
inline |
Returns host loop points, if available.
|
inlineprivate |
|
inline |
The current play position, in units of quarter-notes.
|
inline |
The position of the start of the last bar, in units of quarter-notes.
This is the time from the start of the timeline to the start of the current bar, in ppq units.
Note - this value may be unavailable on some hosts, e.g. Pro-Tools.
|
inline |
Returns the number of samples that have elapsed.
|
inline |
Returns the number of seconds that have elapsed.
|
inline |
Returns the time signature, if available.
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |