OpenShot Audio Library | OpenShotAudio: juce::AudioPlayHead::PositionInfo Class Reference

OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::AudioPlayHead::PositionInfo Class Reference

`#include <juce_AudioPlayHead.h>`

## Public Member Functions
Optional< int64_t > | getTimeInSamples () const
void | setTimeInSamples (Optional< int64_t > timeInSamplesIn)
Optional< double > | getTimeInSeconds () const
void | setTimeInSeconds (Optional< double > timeInSecondsIn)
Optional< double > | getBpm () const
void | setBpm (Optional< double > bpmIn)
Optional< TimeSignature > | getTimeSignature () const
void | setTimeSignature (Optional< TimeSignature > timeSignatureIn)
Optional< LoopPoints > | getLoopPoints () const
void | setLoopPoints (Optional< LoopPoints > loopPointsIn)
Optional< int64_t > | getBarCount () const
void | setBarCount (Optional< int64_t > barCountIn)
Optional< double > | getPpqPositionOfLastBarStart () const
void | setPpqPositionOfLastBarStart (Optional< double > positionIn)
Optional< FrameRate > | getFrameRate () const
void | setFrameRate (Optional< FrameRate > frameRateIn)
Optional< double > | getPpqPosition () const
void | setPpqPosition (Optional< double > ppqPositionIn)
Optional< double > | getEditOriginTime () const
void | setEditOriginTime (Optional< double > editOriginTimeIn)
Optional< uint64_t > | getHostTimeNs () const
void | setHostTimeNs (Optional< uint64_t > hostTimeNsIn)
bool | getIsPlaying () const
void | setIsPlaying (bool isPlayingIn)
bool | getIsRecording () const
void | setIsRecording (bool isRecordingIn)
bool | getIsLooping () const
void | setIsLooping (bool isLoopingIn)
bool | operator== (const PositionInfo &other) const noexcept
bool | operator!= (const PositionInfo &other) const noexcept

## Detailed Description

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.

Definition at line 317 of file juce_AudioPlayHead.h.

## Member Function Documentation

## ◆ getBarCount()

Optional< int64_t > juce::AudioPlayHead::PositionInfo::getBarCount | ( |  | ) | const
| inline

The number of bars since the beginning of the timeline.

This value isn't available in all hosts or in all plugin formats.

Definition at line 354 of file juce_AudioPlayHead.h.

## ◆ getBpm()

Optional< double > juce::AudioPlayHead::PositionInfo::getBpm | ( |  | ) | const
| inline

Returns the bpm, if available.

Definition at line 333 of file juce_AudioPlayHead.h.

## ◆ getEditOriginTime()

Optional< double > juce::AudioPlayHead::PositionInfo::getEditOriginTime | ( |  | ) | const
| inline

For timecode, the position of the start of the timeline, in seconds from 00:00:00:00.

Definition at line 384 of file juce_AudioPlayHead.h.

## ◆ getFrameRate()

Optional< FrameRate > juce::AudioPlayHead::PositionInfo::getFrameRate | ( |  | ) | const
| inline

The video frame rate, if available.

Definition at line 372 of file juce_AudioPlayHead.h.

## ◆ getHostTimeNs()

Optional< uint64_t > juce::AudioPlayHead::PositionInfo::getHostTimeNs | ( |  | ) | const
| inline

Get the host's callback time in nanoseconds, if available.

Definition at line 390 of file juce_AudioPlayHead.h.

## ◆ getIsLooping()

bool juce::AudioPlayHead::PositionInfo::getIsLooping | ( |  | ) | const
| inline

True if the transport is currently looping.

Definition at line 411 of file juce_AudioPlayHead.h.

## ◆ getIsPlaying()

bool juce::AudioPlayHead::PositionInfo::getIsPlaying | ( |  | ) | const
| inline

True if the transport is currently playing.

Definition at line 396 of file juce_AudioPlayHead.h.

## ◆ getIsRecording()

bool juce::AudioPlayHead::PositionInfo::getIsRecording | ( |  | ) | const
| inline

True if the transport is currently recording.

(When isRecording is true, then isPlaying will also be true).

Definition at line 405 of file juce_AudioPlayHead.h.

## ◆ getLoopPoints()

Optional< LoopPoints > juce::AudioPlayHead::PositionInfo::getLoopPoints | ( |  | ) | const
| inline

Returns host loop points, if available.

Definition at line 345 of file juce_AudioPlayHead.h.

## ◆ getPpqPosition()

Optional< double > juce::AudioPlayHead::PositionInfo::getPpqPosition | ( |  | ) | const
| inline

The current play position, in units of quarter-notes.

Definition at line 378 of file juce_AudioPlayHead.h.

## ◆ getPpqPositionOfLastBarStart()

Optional< double > juce::AudioPlayHead::PositionInfo::getPpqPositionOfLastBarStart | ( |  | ) | const
| 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.

Definition at line 366 of file juce_AudioPlayHead.h.

## ◆ getTimeInSamples()

Optional< int64_t > juce::AudioPlayHead::PositionInfo::getTimeInSamples | ( |  | ) | const
| inline

Returns the number of samples that have elapsed.

Definition at line 321 of file juce_AudioPlayHead.h.

Referenced by juce::ARAPlaybackRegionReader::readSamples().

## ◆ getTimeInSeconds()

Optional< double > juce::AudioPlayHead::PositionInfo::getTimeInSeconds | ( |  | ) | const
| inline

Returns the number of seconds that have elapsed.

Definition at line 327 of file juce_AudioPlayHead.h.

## ◆ getTimeSignature()

Optional< TimeSignature > juce::AudioPlayHead::PositionInfo::getTimeSignature | ( |  | ) | const
| inline

Returns the time signature, if available.

Definition at line 339 of file juce_AudioPlayHead.h.

## ◆ operator!=()

bool juce::AudioPlayHead::PositionInfo::operator!= | ( | const PositionInfo & | other | ) | const
| inlinenoexcept

Definition at line 439 of file juce_AudioPlayHead.h.

## ◆ operator==()

bool juce::AudioPlayHead::PositionInfo::operator== | ( | const PositionInfo & | other | ) | const
| inlinenoexcept

Definition at line 416 of file juce_AudioPlayHead.h.

## ◆ setBarCount()

void juce::AudioPlayHead::PositionInfo::setBarCount | ( | Optional< int64_t > | barCountIn | ) |
| inline

See also
  getBarCount()

Definition at line 357 of file juce_AudioPlayHead.h.

## ◆ setBpm()

void juce::AudioPlayHead::PositionInfo::setBpm | ( | Optional< double > | bpmIn | ) |
| inline

See also
  getBpm()

Definition at line 336 of file juce_AudioPlayHead.h.

## ◆ setEditOriginTime()

void juce::AudioPlayHead::PositionInfo::setEditOriginTime | ( | Optional< double > | editOriginTimeIn | ) |
| inline

See also
  getEditOriginTime()

Definition at line 387 of file juce_AudioPlayHead.h.

## ◆ setFrameRate()

void juce::AudioPlayHead::PositionInfo::setFrameRate | ( | Optional< FrameRate > | frameRateIn | ) |
| inline

See also
  getFrameRate()

Definition at line 375 of file juce_AudioPlayHead.h.

## ◆ setHostTimeNs()

void juce::AudioPlayHead::PositionInfo::setHostTimeNs | ( | Optional< uint64_t > | hostTimeNsIn | ) |
| inline

See also
  getHostTimeNs()

Definition at line 393 of file juce_AudioPlayHead.h.

## ◆ setIsLooping()

void juce::AudioPlayHead::PositionInfo::setIsLooping | ( | bool | isLoopingIn | ) |
| inline

See also
  getIsLooping()

Definition at line 414 of file juce_AudioPlayHead.h.

## ◆ setIsPlaying()

void juce::AudioPlayHead::PositionInfo::setIsPlaying | ( | bool | isPlayingIn | ) |
| inline

See also
  getIsPlaying()

Definition at line 399 of file juce_AudioPlayHead.h.

Referenced by juce::ARAPlaybackRegionReader::ARAPlaybackRegionReader().

## ◆ setIsRecording()

void juce::AudioPlayHead::PositionInfo::setIsRecording | ( | bool | isRecordingIn | ) |
| inline

See also
  getIsRecording()

Definition at line 408 of file juce_AudioPlayHead.h.

## ◆ setLoopPoints()

void juce::AudioPlayHead::PositionInfo::setLoopPoints | ( | Optional< LoopPoints > | loopPointsIn | ) |
| inline

See also
  getLoopPoints()

Definition at line 348 of file juce_AudioPlayHead.h.

## ◆ setPpqPosition()

void juce::AudioPlayHead::PositionInfo::setPpqPosition | ( | Optional< double > | ppqPositionIn | ) |
| inline

See also
  getPpqPosition()

Definition at line 381 of file juce_AudioPlayHead.h.

## ◆ setPpqPositionOfLastBarStart()

void juce::AudioPlayHead::PositionInfo::setPpqPositionOfLastBarStart | ( | Optional< double > | positionIn | ) |
| inline

See also
  getPpqPositionOfLastBarStart()

Definition at line 369 of file juce_AudioPlayHead.h.

## ◆ setTimeInSamples()

void juce::AudioPlayHead::PositionInfo::setTimeInSamples | ( | Optional< int64_t > | timeInSamplesIn | ) |
| inline

See also
  getTimeInSamples()

Definition at line 324 of file juce_AudioPlayHead.h.

Referenced by juce::ARAPlaybackRegionReader::readSamples().

## ◆ setTimeInSeconds()

void juce::AudioPlayHead::PositionInfo::setTimeInSeconds | ( | Optional< double > | timeInSecondsIn | ) |
| inline

See also
  getTimeInSamples()

Definition at line 330 of file juce_AudioPlayHead.h.

Referenced by juce::ARAPlaybackRegionReader::readSamples().

## ◆ setTimeSignature()

void juce::AudioPlayHead::PositionInfo::setTimeSignature | ( | Optional< TimeSignature > | timeSignatureIn | ) |
| inline

See also
  getTimeSignature()

Definition at line 342 of file juce_AudioPlayHead.h.

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

- juce_AudioPlayHead.h