remove some 1920 tick constants and leave notes for some others.

This commit is contained in:
Robin Gareus 2014-06-07 18:35:37 +02:00 committed by Paul Davis
parent aebd5863f0
commit bdbc4a4f6e
4 changed files with 8 additions and 4 deletions

View file

@ -54,6 +54,7 @@ public:
static bool test(const std::string& path);
int open(const std::string& path, int track=1) THROW_FILE_ERROR;
// XXX 19200 = 10 * Timecode::BBT_Time::ticks_per_beat
int create(const std::string& path, int track=1, uint16_t ppqn=19200) THROW_FILE_ERROR;
void close() THROW_FILE_ERROR;

View file

@ -42,7 +42,8 @@ const MusicalTime MaxMusicalTime = DBL_MAX;
const MusicalTime MinMusicalTime = DBL_MIN;
static inline bool musical_time_equal (MusicalTime a, MusicalTime b) {
/* acceptable tolerance is 1 tick. Nice if there was no magic number here */
/* acceptable tolerance is 1 tick. Nice if there was no magic number here
* -> Timecode::BBT_Time::ticks_per_beat */
return fabs (a - b) <= (1.0/1920.0);
}