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

Method playNote

plugins/nes/Nes.cpp:556–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554
555
556void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer )
557{
558 const fpp_t frames = n->framesLeftForCurrentPeriod();
559 const f_cnt_t offset = n->noteOffset();
560
561 if ( n->totalFramesPlayed() == 0 || n->m_pluginData == NULL )
562 {
563 NesObject * nes = new NesObject( this, Engine::mixer()->processingSampleRate(), n );
564 n->m_pluginData = nes;
565 }
566
567 NesObject * nes = static_cast<NesObject *>( n->m_pluginData );
568
569 nes->renderOutput( workingBuffer + offset, frames );
570
571 applyRelease( workingBuffer, n );
572
573 instrumentTrack()->processAudioBuffer( workingBuffer, frames + offset, n );
574}
575
576
577void NesInstrument::deleteNotePluginData( NotePlayHandle * n )

Callers

nothing calls this directly

Calls 6

mixerFunction · 0.85
processingSampleRateMethod · 0.80
instrumentTrackFunction · 0.50
renderOutputMethod · 0.45
processAudioBufferMethod · 0.45

Tested by

no test coverage detected