Mercurial > hg > svcore
diff data/model/SparseTimeValueModel.h @ 874:862fe7b20df7 tony_integration
Merge from tonioni branch
author | Chris Cannam |
---|---|
date | Tue, 28 Jan 2014 15:01:54 +0000 |
parents | fe4772d11386 |
children | 59e7fe1b1003 |
line wrap: on
line diff
--- a/data/model/SparseTimeValueModel.h Wed Dec 11 21:40:27 2013 +0000 +++ b/data/model/SparseTimeValueModel.h Tue Jan 28 15:01:54 2014 +0000 @@ -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. */