add ::duration_is_explicit() to SMF

This commit is contained in:
Paul Davis
2025-02-28 16:49:48 -07:00
parent efcb26d7c1
commit 3ce789dc4c
2 changed files with 11 additions and 0 deletions

View File

@@ -551,6 +551,16 @@ SMF::file_duration () const
return Temporal::Beats::ticks_at_rate (smf_get_length_pulses (_smf), ppqn());
}
bool
SMF::duration_is_explicit () const
{
if (!_smf) {
return false;
}
return smf_length_is_explicit (_smf);
}
double
SMF::round_to_file_precision (double val) const
{

View File

@@ -100,6 +100,7 @@ public:
int smf_format () const;
Temporal::Beats file_duration() const;
bool duration_is_explicit() const;
int num_channels () const { return _num_channels; }
typedef std::bitset<16> UsedChannels;