Sfoglia il codice sorgente

cmScore.h/c: Added cmScoreSetCount().

master
kevin 11 anni fa
parent
commit
ec73cb280b
2 ha cambiato i file con 15 aggiunte e 6 eliminazioni
  1. 6
    0
      app/cmScore.c
  2. 9
    6
      app/cmScore.h

+ 6
- 0
app/cmScore.c Vedi File

1330
   }
1330
   }
1331
 }
1331
 }
1332
 
1332
 
1333
+unsigned cmScoreSetCount( cmScH_t h )
1334
+{
1335
+  cmSc_t* p = _cmScHandleToPtr(h);
1336
+  return p->setCnt;
1337
+}
1338
+
1333
 cmScRC_t      cmScoreSeqNotify( cmScH_t h )
1339
 cmScRC_t      cmScoreSeqNotify( cmScH_t h )
1334
 {
1340
 {
1335
   cmScRC_t  rc = kOkScRC;
1341
   cmScRC_t  rc = kOkScRC;

+ 9
- 6
app/cmScore.h Vedi File

61
   // The score can be divided into arbitrary non-overlapping sections.
61
   // The score can be divided into arbitrary non-overlapping sections.
62
   typedef struct
62
   typedef struct
63
   {
63
   {
64
-    const cmChar_t*         label;      // section label
65
-    unsigned                index;      // index of this record in the internal section array
66
-    struct cmScoreLoc_str*  locPtr;     // location where this section starts
67
-    unsigned                begEvtIndex;   // score element index where this section starts    
68
-    unsigned                setCnt;     // Count of elements in setArray[]
69
-    struct cmScoreSet_str** setArray;   // Ptrs to sets which are applied to this section.
64
+    const cmChar_t*         label;             // section label
65
+    unsigned                index;             // index of this record in the internal section array
66
+    struct cmScoreLoc_str*  locPtr;            // location where this section starts
67
+    unsigned                begEvtIndex;       // score element index where this section starts    
68
+    unsigned                setCnt;            // Count of elements in setArray[]
69
+    struct cmScoreSet_str** setArray;          // Ptrs to sets which are applied to this section.
70
     double                  vars[ kScVarCnt ]; // Set to DBL_MAX by default.
70
     double                  vars[ kScVarCnt ]; // Set to DBL_MAX by default.
71
   } cmScoreSection_t;
71
   } cmScoreSection_t;
72
 
72
 
154
   cmScoreLoc_t* cmScoreLoc( cmScH_t h, unsigned idx );
154
   cmScoreLoc_t* cmScoreLoc( cmScH_t h, unsigned idx );
155
   void          cmScorePrintLoc( cmScH_t h );
155
   void          cmScorePrintLoc( cmScH_t h );
156
 
156
 
157
+  // Return the count of sets.
158
+  unsigned      cmScoreSetCount( cmScH_t h );
159
+
157
   // Make callbacks for all events in the score. The callbacks
160
   // Make callbacks for all events in the score. The callbacks
158
   // contain cmScMsg_t records serialized as a byte stream.
161
   // contain cmScMsg_t records serialized as a byte stream.
159
   // Use cmScoreDecode() to convert the byte string to a
162
   // Use cmScoreDecode() to convert the byte string to a

Loading…
Annulla
Salva