diff data/model/SparseOneDimensionalModel.h @ 391:5858cc462d0a

* Fix #1628781 changes to layer visibility and mute should use a command * Also use a command for changes to layer playback pan, gain, plugin settings * Refactor PlayParameterRepository to remove dependency on audioio from base * Fix failure to save play parameters for main model in session file
author Chris Cannam
date Thu, 13 Mar 2008 14:06:03 +0000
parents 7aa1de571880
children 50a956688baa
line wrap: on
line diff
--- a/data/model/SparseOneDimensionalModel.h	Thu Mar 13 12:41:20 2008 +0000
+++ b/data/model/SparseOneDimensionalModel.h	Thu Mar 13 14:06:03 2008 +0000
@@ -75,7 +75,24 @@
 			      bool notifyOnAdd = true) :
 	SparseModel<OneDimensionalPoint>(sampleRate, resolution, notifyOnAdd)
     {
-	PlayParameterRepository::getInstance()->addModel(this);
+	PlayParameterRepository::getInstance()->addPlayable(this);
+    }
+
+    virtual ~SparseOneDimensionalModel()
+    {
+        PlayParameterRepository::getInstance()->removePlayable(this);
+    }
+
+    virtual bool canPlay() const { return true; }
+
+    virtual QString getDefaultPlayPluginId() const
+    {
+        return "dssi:_builtin:sample_player";
+    }
+
+    virtual QString getDefaultPlayPluginConfiguration() const
+    {
+        return "<plugin program=\"tap\"/>";
     }
 
     int getIndexOf(const Point &point) {