comparison 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
comparison
equal deleted inserted replaced
390:21e79997e80f 391:5858cc462d0a
73 public: 73 public:
74 SparseOneDimensionalModel(size_t sampleRate, size_t resolution, 74 SparseOneDimensionalModel(size_t sampleRate, size_t resolution,
75 bool notifyOnAdd = true) : 75 bool notifyOnAdd = true) :
76 SparseModel<OneDimensionalPoint>(sampleRate, resolution, notifyOnAdd) 76 SparseModel<OneDimensionalPoint>(sampleRate, resolution, notifyOnAdd)
77 { 77 {
78 PlayParameterRepository::getInstance()->addModel(this); 78 PlayParameterRepository::getInstance()->addPlayable(this);
79 }
80
81 virtual ~SparseOneDimensionalModel()
82 {
83 PlayParameterRepository::getInstance()->removePlayable(this);
84 }
85
86 virtual bool canPlay() const { return true; }
87
88 virtual QString getDefaultPlayPluginId() const
89 {
90 return "dssi:_builtin:sample_player";
91 }
92
93 virtual QString getDefaultPlayPluginConfiguration() const
94 {
95 return "<plugin program=\"tap\"/>";
79 } 96 }
80 97
81 int getIndexOf(const Point &point) { 98 int getIndexOf(const Point &point) {
82 // slow 99 // slow
83 int i = 0; 100 int i = 0;