Mercurial > hg > svapp
changeset 279:ce71d2d9bdb7
Somewhat simpler synthetic-model determination
author | Chris Cannam |
---|---|
date | Mon, 15 Apr 2013 18:01:44 +0100 |
parents | 6c6950bd7d53 |
children | cf32a7c584c2 32d8084f8543 |
files | audioio/AudioGenerator.cpp |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
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); }