}
bool
-AudioClock::bbt_validate_edit (const string& str)
+AudioClock::bbt_validate_edit (string & str)
{
AnyTime any;
}
if (!is_duration && any.bbt.beats == 0) {
- return false;
+ /* user could not have mean zero beats because for a
+ * non-duration clock that's impossible. Assume that they
+ * mis-entered things and meant Bar|1|ticks
+ */
+
+ char buf[128];
+ snprintf (buf, sizeof (buf), "%" PRIu32 "|%" PRIu32 "|%" PRIu32, any.bbt.bars, 1, any.bbt.ticks);
+ str = buf;
}
return true;
samplepos_t get_sample_step (Field, samplepos_t pos = 0, int dir = 1);
bool timecode_validate_edit (const std::string&);
- bool bbt_validate_edit (const std::string&);
+ bool bbt_validate_edit (std::string&);
bool minsec_validate_edit (const std::string&);
samplepos_t samples_from_timecode_string (const std::string&) const;