"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/NotePlayHandle.cpp" between
lmms_1.2.0.tar.xz and lmms_1.2.1.tar.xz

About: LMMS (Linux MultiMedia Studio) is a sound generation system (creation of melodies and beats, synthesis and mixing of sounds, arranging of samples; full MIDI support).

NotePlayHandle.cpp  (lmms_1.2.0.tar.xz):NotePlayHandle.cpp  (lmms_1.2.1.tar.xz)
skipping to change at line 183 skipping to change at line 183
// if the note offset falls over to next period, then don't start playbac k yet // if the note offset falls over to next period, then don't start playbac k yet
if( offset() >= Engine::mixer()->framesPerPeriod() ) if( offset() >= Engine::mixer()->framesPerPeriod() )
{ {
setOffset( offset() - Engine::mixer()->framesPerPeriod() ); setOffset( offset() - Engine::mixer()->framesPerPeriod() );
return; return;
} }
lock(); lock();
if( m_totalFramesPlayed == 0 && !m_hasMidiNote /* It is possible for NotePlayHandle::noteOff to be called before NotePla
yHandle::play,
* which results in a note-on message being sent without a subsequent not
e-off message.
* Therefore, we check here whether the note has already been released be
fore sending
* the note-on message. */
if( !m_released
&& m_totalFramesPlayed == 0 && !m_hasMidiNote
&& ( hasParent() || ! m_instrumentTrack->isArpeggioEnabled() ) ) && ( hasParent() || ! m_instrumentTrack->isArpeggioEnabled() ) )
{ {
m_hasMidiNote = true; m_hasMidiNote = true;
const int baseVelocity = m_instrumentTrack->midiPort()->baseVeloc ity(); const int baseVelocity = m_instrumentTrack->midiPort()->baseVeloc ity();
// send MidiNoteOn event // send MidiNoteOn event
m_instrumentTrack->processOutEvent( m_instrumentTrack->processOutEvent(
MidiEvent( MidiNoteOn, midiChannel(), midiKey(), midiVelo city( baseVelocity ) ), MidiEvent( MidiNoteOn, midiChannel(), midiKey(), midiVelo city( baseVelocity ) ),
MidiTime::fromFrames( offset(), Engine::framesPerTick() ) , MidiTime::fromFrames( offset(), Engine::framesPerTick() ) ,
 End of changes. 1 change blocks. 
1 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)