libtemporal: slightly improve output from conversion statistics

This commit is contained in:
Paul Davis 2021-02-01 18:56:16 -07:00
parent f61ba0ccdc
commit ce82efafcf
2 changed files with 9 additions and 5 deletions

View File

@ -38,6 +38,8 @@ namespace Temporal {
class timecnt_t;
void dump_stats (std::ostream&);
/* 62 bit positional time value. Theoretically signed, but the intent is for to
* always be positive. If the flag bit is set (i.e. ::flagged() is true), the
* numerical value counts musical ticks; otherwise it counts superclocks.

View File

@ -53,11 +53,11 @@ struct TemporalStatistics
void dump (std::ostream & str) {
str << "TemporalStatistics\n"
<< "Audio => Beats " << audio_to_beats
<< "Audio => Bars " << audio_to_bars
<< "Beats => Audio " << beats_to_audio
<< "Beats => Bars " << beats_to_bars
<< "Bars => Audio " << bars_to_audio
<< "Audio => Beats " << audio_to_beats << ' '
<< "Audio => Bars " << audio_to_bars << ' '
<< "Beats => Audio " << beats_to_audio << ' '
<< "Beats => Bars " << beats_to_bars << ' '
<< "Bars => Audio " << bars_to_audio << ' '
<< "Bars => Beats " << bars_to_beats
<< std::endl;
}
@ -65,6 +65,8 @@ struct TemporalStatistics
static TemporalStatistics stats;
void Temporal::dump_stats (std::ostream& o) { stats.dump (o); }
/* timecnt */
timecnt_t timecnt_t::_max_timecnt (timecnt_t::from_superclock (int62_t::max - 1));