diff audio/AudioGenerator.cpp @ 646:3168deb50199 single-point

Updates for single-point changes, including removal of FlexiNoteModel
author Chris Cannam
date Thu, 14 Mar 2019 15:33:40 +0000
parents 6240788893e7
children 284cb118368e
line wrap: on
line diff
--- a/audio/AudioGenerator.cpp	Fri Mar 08 13:37:51 2019 +0000
+++ b/audio/AudioGenerator.cpp	Thu Mar 14 15:33:40 2019 +0000
@@ -22,7 +22,6 @@
 #include "base/Exceptions.h"
 
 #include "data/model/NoteModel.h"
-#include "data/model/FlexiNoteModel.h"
 #include "data/model/DenseTimeValueModel.h"
 #include "data/model/SparseTimeValueModel.h"
 #include "data/model/SparseOneDimensionalModel.h"
@@ -185,8 +184,7 @@
 {
     bool clip = 
         (qobject_cast<const SparseOneDimensionalModel *>(model) ||
-         qobject_cast<const NoteModel *>(model) ||
-         qobject_cast<const FlexiNoteModel *>(model));
+         qobject_cast<const NoteModel *>(model));
     return clip;
 }
 
@@ -196,9 +194,7 @@
     // basically, anything that usually has sustain (like notes) or
     // often has multiple sounds at once (like notes) wants to use a
     // quieter level than simple click tracks
-    bool does = 
-        (qobject_cast<const NoteModel *>(model) ||
-         qobject_cast<const FlexiNoteModel *>(model));
+    bool does = (qobject_cast<const NoteModel *>(model));
     return does;
 }
 
@@ -559,6 +555,8 @@
 
     float **bufferIndexes = new float *[m_targetChannelCount];
 
+    //!!! + for first block, prime with notes already active
+    
     for (int i = 0; i < blocks; ++i) {
 
         sv_frame_t reqStart = startFrame + i * m_processingBlockSize;
@@ -566,8 +564,8 @@
         NoteList notes;
         NoteExportable *exportable = dynamic_cast<NoteExportable *>(model);
         if (exportable) {
-            notes = exportable->getNotesWithin(reqStart,
-                                               reqStart + m_processingBlockSize);
+            notes = exportable->getNotesStartingWithin(reqStart,
+                                                       m_processingBlockSize);
         }
 
         std::vector<ClipMixer::NoteStart> starts;