changeset 613:88f9266e0417

Minor tidy
author Chris Cannam
date Mon, 13 Aug 2018 11:43:21 +0100
parents 1822563a5da1
children 0aee6ff48018
files audio/AudioGenerator.cpp audio/AudioGenerator.h
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/audio/AudioGenerator.cpp	Wed Aug 08 15:25:35 2018 +0100
+++ b/audio/AudioGenerator.cpp	Mon Aug 13 11:43:21 2018 +0100
@@ -356,8 +356,10 @@
 }
 
 sv_frame_t
-AudioGenerator::mixModel(Model *model, sv_frame_t startFrame, sv_frame_t frameCount,
-                         float **buffer, sv_frame_t fadeIn, sv_frame_t fadeOut)
+AudioGenerator::mixModel(Model *model,
+                         sv_frame_t startFrame, sv_frame_t frameCount,
+                         float **buffer,
+                         sv_frame_t fadeIn, sv_frame_t fadeOut)
 {
     if (m_sourceSampleRate == 0) {
         cerr << "WARNING: AudioGenerator::mixModel: No base source sample rate available" << endl;
--- a/audio/AudioGenerator.h	Wed Aug 08 15:25:35 2018 +0100
+++ b/audio/AudioGenerator.h	Mon Aug 13 11:43:21 2018 +0100
@@ -81,8 +81,12 @@
     /**
      * Mix a single model into an output buffer.
      */
-    virtual sv_frame_t mixModel(Model *model, sv_frame_t startFrame, sv_frame_t frameCount,
-                            float **buffer, sv_frame_t fadeIn = 0, sv_frame_t fadeOut = 0);
+    virtual sv_frame_t mixModel(Model *model,
+                                sv_frame_t startFrame,
+                                sv_frame_t frameCount,
+                                float **buffer,
+                                sv_frame_t fadeIn = 0,
+                                sv_frame_t fadeOut = 0);
 
     /**
      * Specify that only the given set of models should be played.
@@ -108,7 +112,8 @@
 
     struct NoteOff {
 
-        NoteOff(float _freq, sv_frame_t _frame) : frequency(_freq), frame(_frame) { }
+        NoteOff(float _freq, sv_frame_t _frame, sv_frame_t _startFrame) :
+            frequency(_freq), frame(_frame), startFrame(_startFrame) { }
 
         float frequency;
         sv_frame_t frame;