Mercurial > hg > svapp
comparison 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 |
comparison
equal
deleted
inserted
replaced
275:6c6950bd7d53 | 279:ce71d2d9bdb7 |
---|---|
385 if (dtvm) { | 385 if (dtvm) { |
386 return mixDenseTimeValueModel(dtvm, startFrame, frameCount, | 386 return mixDenseTimeValueModel(dtvm, startFrame, frameCount, |
387 buffer, gain, pan, fadeIn, fadeOut); | 387 buffer, gain, pan, fadeIn, fadeOut); |
388 } | 388 } |
389 | 389 |
390 SparseOneDimensionalModel *sodm = dynamic_cast<SparseOneDimensionalModel *> | 390 bool synthetic = |
391 (model); | 391 (qobject_cast<SparseOneDimensionalModel *>(model) || |
392 if (sodm) { | 392 qobject_cast<NoteModel *>(model)); |
393 return mixSyntheticNoteModel(model, startFrame, frameCount, | 393 |
394 buffer, gain, pan, fadeIn, fadeOut); | 394 if (synthetic) { |
395 } | |
396 | |
397 NoteModel *nm = dynamic_cast<NoteModel *>(model); | |
398 if (nm) { | |
399 return mixSyntheticNoteModel(model, startFrame, frameCount, | 395 return mixSyntheticNoteModel(model, startFrame, frameCount, |
400 buffer, gain, pan, fadeIn, fadeOut); | 396 buffer, gain, pan, fadeIn, fadeOut); |
401 } | 397 } |
402 | 398 |
403 return frameCount; | 399 return frameCount; |