Mercurial > hg > svapp
diff audioio/AudioGenerator.cpp @ 279:ce71d2d9bdb7
Somewhat simpler synthetic-model determination
author | Chris Cannam |
---|---|
date | Mon, 15 Apr 2013 18:01:44 +0100 |
parents | 6c6950bd7d53 |
children | cf32a7c584c2 068235cf5bf7 |
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp Mon Apr 15 17:23:14 2013 +0100 +++ b/audioio/AudioGenerator.cpp Mon Apr 15 18:01:44 2013 +0100 @@ -387,15 +387,11 @@ buffer, gain, pan, fadeIn, fadeOut); } - SparseOneDimensionalModel *sodm = dynamic_cast<SparseOneDimensionalModel *> - (model); - if (sodm) { - return mixSyntheticNoteModel(model, startFrame, frameCount, - buffer, gain, pan, fadeIn, fadeOut); - } + bool synthetic = + (qobject_cast<SparseOneDimensionalModel *>(model) || + qobject_cast<NoteModel *>(model)); - NoteModel *nm = dynamic_cast<NoteModel *>(model); - if (nm) { + if (synthetic) { return mixSyntheticNoteModel(model, startFrame, frameCount, buffer, gain, pan, fadeIn, fadeOut); }