# HG changeset patch # User Chris Cannam # Date 1389186462 0 # Node ID fe4772d113863a1654531f025e58dcf68e44922b # Parent 42551e9c5b25203708a1878674bd28be7849254b Sparse time-value models are now theoretically playable (sometimes) diff -r 42551e9c5b25 -r fe4772d11386 data/model/SparseTimeValueModel.h --- a/data/model/SparseTimeValueModel.h Wed Jan 08 09:59:08 2014 +0000 +++ b/data/model/SparseTimeValueModel.h Wed Jan 08 13:07:42 2014 +0000 @@ -86,7 +86,9 @@ SparseValueModel(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. */