JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AudioPlayHead::FrameRate Class Reference

More descriptive frame rate type. More...

#include <juce_AudioPlayHead.h>

Collaboration diagram for juce::AudioPlayHead::FrameRate:

Public Member Functions

 FrameRate ()=default
 Creates a frame rate with a base rate of 0. More...
 
 FrameRate (FrameRateType type)
 Creates a FrameRate instance from a FrameRateType. More...
 
int getBaseRate () const
 Returns the plain rate, without taking pulldown into account. More...
 
double getEffectiveRate () const
 Returns the actual rate described by this object, taking pulldown into account. More...
 
FrameRateType getType () const
 Gets the FrameRateType that matches the state of this FrameRate. More...
 
bool isDrop () const
 Returns true if drop-frame timecode is in use. More...
 
bool isPullDown () const
 Returns true if the effective framerate is actually equal to the base rate divided by 1.001. More...
 
bool operator!= (const FrameRate &other) const
 Returns true if this instance is not equal to other. More...
 
bool operator== (const FrameRate &other) const
 Returns true if this instance is equal to other. More...
 
JUCE_NODISCARD FrameRate withBaseRate (int x) const
 Returns a copy of this object with the specified base rate. More...
 
JUCE_NODISCARD FrameRate withDrop (bool x=true) const
 Returns a copy of this object with drop frames enabled or disabled, as specified. More...
 
JUCE_NODISCARD FrameRate withPullDown (bool x=true) const
 Returns a copy of this object with pulldown enabled or disabled, as specified. More...
 

Private Member Functions

template<typename Member , typename Value >
FrameRate with (Member &&member, Value &&value) const
 

Static Private Member Functions

static FrameRate fromType (FrameRateType type)
 

Private Attributes

int base = 0
 
bool drop = false
 
bool pulldown = false
 

Detailed Description

More descriptive frame rate type.

Constructor & Destructor Documentation

◆ FrameRate() [1/2]

juce::AudioPlayHead::FrameRate::FrameRate ( )
default

Creates a frame rate with a base rate of 0.

◆ FrameRate() [2/2]

juce::AudioPlayHead::FrameRate::FrameRate ( FrameRateType  type)
inline

Creates a FrameRate instance from a FrameRateType.

Member Function Documentation

◆ fromType()

static FrameRate juce::AudioPlayHead::FrameRate::fromType ( FrameRateType  type)
inlinestaticprivate

◆ getBaseRate()

int juce::AudioPlayHead::FrameRate::getBaseRate ( ) const
inline

Returns the plain rate, without taking pulldown into account.

◆ getEffectiveRate()

double juce::AudioPlayHead::FrameRate::getEffectiveRate ( ) const
inline

Returns the actual rate described by this object, taking pulldown into account.

◆ getType()

FrameRateType juce::AudioPlayHead::FrameRate::getType ( ) const
inline

Gets the FrameRateType that matches the state of this FrameRate.

Returns fpsUnknown if this FrameRate cannot be represented by any of the other enum fields.

◆ isDrop()

bool juce::AudioPlayHead::FrameRate::isDrop ( ) const
inline

Returns true if drop-frame timecode is in use.

◆ isPullDown()

bool juce::AudioPlayHead::FrameRate::isPullDown ( ) const
inline

Returns true if the effective framerate is actually equal to the base rate divided by 1.001.

◆ operator!=()

bool juce::AudioPlayHead::FrameRate::operator!= ( const FrameRate other) const
inline

Returns true if this instance is not equal to other.

◆ operator==()

bool juce::AudioPlayHead::FrameRate::operator== ( const FrameRate other) const
inline

Returns true if this instance is equal to other.

References juce::gl::x.

◆ with()

template<typename Member , typename Value >
FrameRate juce::AudioPlayHead::FrameRate::with ( Member &&  member,
Value &&  value 
) const
inlineprivate

◆ withBaseRate()

JUCE_NODISCARD FrameRate juce::AudioPlayHead::FrameRate::withBaseRate ( int  x) const
inline

Returns a copy of this object with the specified base rate.

References juce::gl::x.

Referenced by fromType().

◆ withDrop()

JUCE_NODISCARD FrameRate juce::AudioPlayHead::FrameRate::withDrop ( bool  x = true) const
inline

Returns a copy of this object with drop frames enabled or disabled, as specified.

References juce::gl::x.

Referenced by fromType().

◆ withPullDown()

JUCE_NODISCARD FrameRate juce::AudioPlayHead::FrameRate::withPullDown ( bool  x = true) const
inline

Returns a copy of this object with pulldown enabled or disabled, as specified.

References juce::gl::x.

Referenced by fromType().

Member Data Documentation

◆ base

int juce::AudioPlayHead::FrameRate::base = 0
private

◆ drop

bool juce::AudioPlayHead::FrameRate::drop = false
private

◆ pulldown

bool juce::AudioPlayHead::FrameRate::pulldown = false
private

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