| 41 | |
| 42 | |
| 43 | virtual void play( sampleFrame * _working_buffer ) |
| 44 | { |
| 45 | // ensure that all our nph's have been processed first |
| 46 | ConstNotePlayHandleList nphv = NotePlayHandle::nphsOfInstrumentTrack( m_instrument->instrumentTrack(), true ); |
| 47 | |
| 48 | bool nphsLeft; |
| 49 | do |
| 50 | { |
| 51 | nphsLeft = false; |
| 52 | for( const NotePlayHandle * constNotePlayHandle : nphv ) |
| 53 | { |
| 54 | NotePlayHandle * notePlayHandle = const_cast<NotePlayHandle *>( constNotePlayHandle ); |
| 55 | if( notePlayHandle->state() != ThreadableJob::Done && ! notePlayHandle->isFinished() ) |
| 56 | { |
| 57 | nphsLeft = true; |
| 58 | notePlayHandle->process(); |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | while( nphsLeft ); |
| 63 | |
| 64 | m_instrument->play( _working_buffer ); |
| 65 | } |
| 66 | |
| 67 | virtual bool isFinished() const |
| 68 | { |
no test coverage detected