mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
superclock_ticks_per_second: use an (inline) accessor, change value
We do not want a value as large as the previous one, which limits the time range that can be represented in 62 bits unnecessarily. The new value is 9 times smaller than the previous value, and loses only 384000 as a significant factor. This commit also switches to using an (inline) accessor for superclock_ticks_per_second, making it possible in debug/testing phases to spot early/illegal uses of the value.
This commit is contained in:
parent
641589c56a
commit
a803dd0df8
7 changed files with 40 additions and 30 deletions
|
|
@ -19,13 +19,22 @@
|
|||
#include "temporal/superclock.h"
|
||||
|
||||
#ifndef COMPILER_MSVC
|
||||
Temporal::superclock_t Temporal::superclock_ticks_per_second = 508032000; // 2^10 * 3^4 * 5^3 * 7^2
|
||||
Temporal::superclock_t Temporal::_superclock_ticks_per_second = 56448000; /* 2^10 * 3^2 * 5^3 * 7^2 */
|
||||
#endif
|
||||
|
||||
int Temporal::most_recent_engine_sample_rate = 48000; /* have to pick something as a default */
|
||||
|
||||
bool Temporal::scts_set = false;
|
||||
|
||||
void
|
||||
Temporal::set_sample_rate (int sr)
|
||||
{
|
||||
most_recent_engine_sample_rate = sr;
|
||||
}
|
||||
|
||||
void
|
||||
Temporal::set_superclock_ticks_per_second (Temporal::superclock_t sc)
|
||||
{
|
||||
_superclock_ticks_per_second = sc;
|
||||
scts_set = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue