diff --git a/app/cmScore.c b/app/cmScore.c index 0920af5..085d1b4 100644 --- a/app/cmScore.c +++ b/app/cmScore.c @@ -1330,6 +1330,12 @@ void cmScorePrintLoc( cmScH_t h ) } } +unsigned cmScoreSetCount( cmScH_t h ) +{ + cmSc_t* p = _cmScHandleToPtr(h); + return p->setCnt; +} + cmScRC_t cmScoreSeqNotify( cmScH_t h ) { cmScRC_t rc = kOkScRC; diff --git a/app/cmScore.h b/app/cmScore.h index 5d7254f..2223e9c 100644 --- a/app/cmScore.h +++ b/app/cmScore.h @@ -61,12 +61,12 @@ extern "C" { // The score can be divided into arbitrary non-overlapping sections. typedef struct { - const cmChar_t* label; // section label - unsigned index; // index of this record in the internal section array - struct cmScoreLoc_str* locPtr; // location where this section starts - unsigned begEvtIndex; // score element index where this section starts - unsigned setCnt; // Count of elements in setArray[] - struct cmScoreSet_str** setArray; // Ptrs to sets which are applied to this section. + const cmChar_t* label; // section label + unsigned index; // index of this record in the internal section array + struct cmScoreLoc_str* locPtr; // location where this section starts + unsigned begEvtIndex; // score element index where this section starts + unsigned setCnt; // Count of elements in setArray[] + struct cmScoreSet_str** setArray; // Ptrs to sets which are applied to this section. double vars[ kScVarCnt ]; // Set to DBL_MAX by default. } cmScoreSection_t; @@ -154,6 +154,9 @@ extern "C" { cmScoreLoc_t* cmScoreLoc( cmScH_t h, unsigned idx ); void cmScorePrintLoc( cmScH_t h ); + // Return the count of sets. + unsigned cmScoreSetCount( cmScH_t h ); + // Make callbacks for all events in the score. The callbacks // contain cmScMsg_t records serialized as a byte stream. // Use cmScoreDecode() to convert the byte string to a