comparison layer/LayerFactory.cpp @ 245:447cb52adc6b

* Fix #1706927 NaNs from plugin outputs should not be used
author Chris Cannam
date Fri, 27 Apr 2007 15:39:48 +0000
parents 57c2350a8c40
children 46faec7aae12
comparison
equal deleted inserted replaced
244:5105be027d8e 245:447cb52adc6b
287 LayerFactory::createEmptyModel(LayerType layerType, Model *baseModel) 287 LayerFactory::createEmptyModel(LayerType layerType, Model *baseModel)
288 { 288 {
289 if (layerType == TimeInstants) { 289 if (layerType == TimeInstants) {
290 return new SparseOneDimensionalModel(baseModel->getSampleRate(), 1); 290 return new SparseOneDimensionalModel(baseModel->getSampleRate(), 1);
291 } else if (layerType == TimeValues) { 291 } else if (layerType == TimeValues) {
292 return new SparseTimeValueModel(baseModel->getSampleRate(), 1, 292 return new SparseTimeValueModel(baseModel->getSampleRate(), 1, true);
293 0.0, 0.0, true);
294 } else if (layerType == Notes) { 293 } else if (layerType == Notes) {
295 return new NoteModel(baseModel->getSampleRate(), 1, 294 return new NoteModel(baseModel->getSampleRate(), 1, true);
296 0.0, 0.0, true);
297 } else if (layerType == Text) { 295 } else if (layerType == Text) {
298 return new TextModel(baseModel->getSampleRate(), 1, true); 296 return new TextModel(baseModel->getSampleRate(), 1, true);
299 } else { 297 } else {
300 return 0; 298 return 0;
301 } 299 }