These functions support generating timestamps without long term rounding errors due to sample rate conversions.
More...
|
struct | date_t |
| Timestamps without long-term rounding errors. More...
|
|
These functions support generating timestamps without long term rounding errors due to sample rate conversions.
◆ date_Change()
void date_Change |
( |
date_t *restrict |
date, |
|
|
uint32_t |
num, |
|
|
uint32_t |
den |
|
) |
| |
Changes the rate of a date_t.
- Parameters
-
date | date to change |
num | divider (sample rate) numerator |
den | divider (sample rate) denominator |
◆ date_Decrement()
Decrements a date.
Moves the date_t timestamp backward by a given number of samples.
- Parameters
-
date | date to move backward |
count | number of samples |
- Returns
- date value
◆ date_Get()
Gets the current timestamp from a date_t.
- Parameters
-
date | date to fetch the timestamp from |
- Returns
- date value
◆ date_Increment()
Increments a date.
Moves the date_t timestamp forward by a given number of samples.
- Parameters
-
date | date to move forward |
count | number of samples |
- Returns
- timestamp value after incrementing
◆ date_Init()
void date_Init |
( |
date_t *restrict |
date, |
|
|
uint32_t |
num, |
|
|
uint32_t |
den |
|
) |
| |
Initializes a date_t.
- Parameters
-
date | date to initialize [OUT] |
num | divider (sample rate) numerator |
den | divider (sample rate) denominator |
◆ date_Set()
Sets the exact timestamp of a date_t.
- Parameters
-
date | date to set the timestamp into |
value | date value |