|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Represents a duration in real-life time. More...
#include "tracktion_Time.h"
Public Member Functions | |
| constexpr | TimeDuration ()=default |
| Creates a position at a time of 0. | |
| constexpr | TimeDuration (const TimeDuration &)=default |
| Creates a copy of another TimeDuration. | |
| template<typename Type > | |
| constexpr | TimeDuration (std::chrono::duration< Type >) |
| Creates a position from a std::chrono. | |
| template<typename T1 , typename T2 > | |
| constexpr | TimeDuration (std::chrono::duration< T1, T2 >) |
| Creates a position from a std::chrono. | |
| constexpr TimeDuration & | operator= (const TimeDuration &)=default |
| Creates a copy of another TimeDuration. | |
| constexpr double | inSeconds () const |
| Returns the TimeDuration as a number of seconds. | |
Static Public Member Functions | |
| template<typename T > | |
| static constexpr TimeDuration | fromSeconds (T positionInSeconds) |
| Create a TimeDuration from a number of seconds. | |
| template<typename IntType > | |
| static constexpr TimeDuration | fromSamples (IntType numSamples, double sampleRate) |
| Create a TimeDuration from a number of samples and a sample rate. | |
Represents a duration in real-life time.
E.g. The time between two points on a timeline.
Definition at line 98 of file tracktion_Time.h.
|
constexpr |
Creates a position from a std::chrono.
This can be a std::chrono::literal.
Definition at line 504 of file tracktion_Time.h.
|
constexpr |
Creates a position from a std::chrono.
This can be a std::chrono::literal.
Definition at line 510 of file tracktion_Time.h.
|
staticconstexpr |
Create a TimeDuration from a number of samples and a sample rate.
Definition at line 524 of file tracktion_Time.h.
|
staticconstexpr |
Create a TimeDuration from a number of seconds.
Definition at line 516 of file tracktion_Time.h.
|
constexpr |
Returns the TimeDuration as a number of seconds.
Definition at line 529 of file tracktion_Time.h.