MCPcopy Create free account
hub / github.com/LMMS/lmms / play

Function play

include/InstrumentPlayHandle.h:43–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 3

doProcessingMethod · 0.85
togglePlayStopMethod · 0.85
EditorMethod · 0.85

Calls 5

instrumentTrackMethod · 0.80
stateMethod · 0.45
isFinishedMethod · 0.45
processMethod · 0.45
playMethod · 0.45

Tested by

no test coverage detected