view pointpair.cpp @ 553:ea341e68649f

Produce embryonic example of integration with runner ("sonic annotator") There's much that is hardwired (though a bit less than in the example sent by e-mail to Casey, Cannam and Raimond). More needs to be done, including thinking about how a typical user will actually be using the combination of tools; this code is proof-of-concept more than anything else.
author mas01cr
date Fri, 13 Feb 2009 11:23:10 +0000
parents cc2b97d020b1
children 9119f2fa3efe
line wrap: on
line source
extern "C" {
#include "audioDB_API.h"
}
#include "audioDB-internals.h"

PointPair::PointPair(Uns32T a, Uns32T b, Uns32T c) :
  trackID(a), qpos(b), spos(c) {
};

bool operator<(const PointPair& a, const PointPair& b) {
  return ((a.trackID < b.trackID) ||
          ((a.trackID == b.trackID) &&
           ((a.spos < b.spos) || ((a.spos == b.spos) && (a.qpos < b.qpos)))));
}

bool operator>(const PointPair& a, const PointPair& b) {
  return ((a.trackID > b.trackID) ||
          ((a.trackID == b.trackID) &&
           ((a.spos > b.spos) || ((a.spos == b.spos) && (a.qpos > b.qpos)))));
}

bool operator==(const PointPair& a, const PointPair& b) {
  return ((a.trackID == b.trackID) &&
          (a.qpos == b.qpos) &&
          (a.spos == b.spos));
}