diff data/model/SparseTimeValueModel.h @ 911:73c2fd9a7dbe

Merge from branch tony_integration
author Chris Cannam
date Wed, 14 May 2014 09:54:20 +0100
parents fe4772d11386
children 59e7fe1b1003
line wrap: on
line diff
--- a/data/model/SparseTimeValueModel.h	Wed May 07 15:17:58 2014 +0100
+++ b/data/model/SparseTimeValueModel.h	Wed May 14 09:54:20 2014 +0100
@@ -86,7 +86,9 @@
 	SparseValueModel<TimeValuePoint>(sampleRate, resolution,
 					 notifyOnAdd)
     {
-        // not yet playable
+        // Model is playable, but may not sound (if units not Hz or
+        // range unsuitable)
+	PlayParameterRepository::getInstance()->addPlayable(this);
     }
 
     SparseTimeValueModel(size_t sampleRate, size_t resolution,
@@ -96,11 +98,20 @@
 					 valueMinimum, valueMaximum,
 					 notifyOnAdd)
     {
-        // not yet playable
+        // Model is playable, but may not sound (if units not Hz or
+        // range unsuitable)
+	PlayParameterRepository::getInstance()->addPlayable(this);
+    }
+
+    virtual ~SparseTimeValueModel()
+    {
+	PlayParameterRepository::getInstance()->removePlayable(this);
     }
 
     QString getTypeName() const { return tr("Sparse Time-Value"); }
 
+    virtual bool canPlay() const { return true; }
+
     /**
      * TabularModel methods.  
      */