MPD
0.20.15
|
A variant of SongTime that is based on a signed integer. More...
#include <Chrono.hxx>
Public Member Functions | |
SignedSongTime ()=default | |
template<typename T > | |
constexpr | SignedSongTime (T t) |
constexpr | SignedSongTime (SongTime t) |
Allow implicit conversion from SongTime to SignedSongTime. More... | |
constexpr rep | ToS () const |
constexpr rep | RoundS () const |
constexpr rep | ToMS () const |
template<typename T = rep> | |
constexpr T | ToScale (unsigned scale) const |
constexpr double | ToDoubleS () const |
constexpr bool | IsZero () const |
constexpr bool | IsPositive () const |
constexpr bool | IsNegative () const |
constexpr SignedSongTime | operator+ (const SignedSongTime &other) const |
constexpr SignedSongTime | operator- (const SignedSongTime &other) const |
Static Public Member Functions | |
static constexpr SignedSongTime | zero () |
static constexpr SignedSongTime | Negative () |
Generate a negative value. More... | |
static constexpr SignedSongTime | FromS (int s) |
static constexpr SignedSongTime | FromS (unsigned s) |
static constexpr SignedSongTime | FromS (float s) |
static constexpr SignedSongTime | FromS (double s) |
static constexpr SignedSongTime | FromMS (rep ms) |
template<typename T = rep> | |
static constexpr SignedSongTime | FromScale (T value, unsigned scale) |
Convert a scalar value with the given scale to a SignedSongTime instance. More... | |
A variant of SongTime that is based on a signed integer.
It can be used for relative values.
Definition at line 115 of file Chrono.hxx.
|
default |
|
inlineexplicit |
Definition at line 123 of file Chrono.hxx.
|
inline |
Allow implicit conversion from SongTime to SignedSongTime.
Definition at line 128 of file Chrono.hxx.
|
inlinestatic |
Definition at line 157 of file Chrono.hxx.
|
inlinestatic |
Definition at line 141 of file Chrono.hxx.
|
inlinestatic |
Definition at line 145 of file Chrono.hxx.
|
inlinestatic |
Definition at line 149 of file Chrono.hxx.
|
inlinestatic |
Definition at line 153 of file Chrono.hxx.
|
inlinestatic |
Convert a scalar value with the given scale to a SignedSongTime instance.
value | the input value |
scale | the value's scale in Hz |
Definition at line 186 of file Chrono.hxx.
|
inline |
Definition at line 202 of file Chrono.hxx.
|
inline |
Definition at line 198 of file Chrono.hxx.
|
inline |
Definition at line 194 of file Chrono.hxx.
|
inlinestatic |
Generate a negative value.
Definition at line 137 of file Chrono.hxx.
|
inline |
Definition at line 206 of file Chrono.hxx.
|
inline |
Definition at line 210 of file Chrono.hxx.
|
inline |
Definition at line 165 of file Chrono.hxx.
|
inline |
Definition at line 190 of file Chrono.hxx.
|
inline |
Definition at line 169 of file Chrono.hxx.
|
inline |
Definition at line 161 of file Chrono.hxx.
|
inline |
Definition at line 174 of file Chrono.hxx.
|
inlinestatic |
Definition at line 130 of file Chrono.hxx.