deeper fixes for 80/100 subframes choice

git-svn-id: svn://localhost/ardour2/trunk@1146 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-11-20 21:40:11 +00:00
parent 1759b4b9bd
commit e098a23fcc
4 changed files with 7 additions and 5 deletions

View file

@ -20,6 +20,7 @@
#define SMPTE_IS_ZERO( sm ) (!(sm).frames && !(sm).seconds && !(sm).minutes && !(sm).hours && !(sm.subframes))
#include <control_protocol/smpte.h>
#include <ardour/configuration.h>
namespace SMPTE {
@ -38,7 +39,7 @@ increment( Time& smpte )
if (smpte.negative) {
if (SMPTE_IS_AROUND_ZERO(smpte) && smpte.subframes) {
// We have a zero transition involving only subframes
smpte.subframes = 80 - smpte.subframes;
smpte.subframes = ARDOUR::Config->get_subframes_per_frame() - smpte.subframes;
smpte.negative = false;
return SECONDS;
}
@ -121,7 +122,7 @@ decrement( Time& smpte )
return wrap;
} else if (SMPTE_IS_AROUND_ZERO(smpte) && smpte.subframes) {
// We have a zero transition involving only subframes
smpte.subframes = 80 - smpte.subframes;
smpte.subframes = ARDOUR::Config->get_subframes_per_frame() - smpte.subframes;
smpte.negative = true;
return SECONDS;
}
@ -212,7 +213,7 @@ increment_subframes( Time& smpte )
}
smpte.subframes++;
if (smpte.subframes >= 80) {
if (smpte.subframes >= ARDOUR::Config->get_subframes_per_frame()) {
smpte.subframes = 0;
increment( smpte );
return FRAMES;