- Timestamp:
- 02/21/09 01:29:28 (4 years ago)
- Location:
- branches/new_fx_rack_and_sample_fun
- Files:
-
- 2 modified
-
. (modified) (1 prop)
-
libs/hydrogen/src/sampler/sampler.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/new_fx_rack_and_sample_fun
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/new_fx_rack_and_sample_fun/libs/hydrogen/src/sampler/sampler.cpp
r781 r834 372 372 373 373 int nNoteLength = -1; 374 if ( pNote->get_leng ht() != -1 ) {375 nNoteLength = ( int )( pNote->get_leng ht() * __audio_output->m_transport.m_nTickSize );374 if ( pNote->get_length() != -1 ) { 375 nNoteLength = ( int )( pNote->get_length() * __audio_output->m_transport.m_nTickSize ); 376 376 } 377 377 … … 522 522 { 523 523 int nNoteLength = -1; 524 if ( pNote->get_leng ht() != -1 ) {525 nNoteLength = ( int )( pNote->get_leng ht() * __audio_output->m_transport.m_nTickSize );524 if ( pNote->get_length() != -1 ) { 525 nNoteLength = ( int )( pNote->get_length() * __audio_output->m_transport.m_nTickSize ); 526 526 } 527 527 float fNotePitch = pNote->get_pitch() + fLayerPitch; … … 786 786 787 787 788 void Sampler::setPlayingNoteleng ht( Instrument* instrument, unsigned long ticks, unsigned long noteOnTick )788 void Sampler::setPlayingNotelength( Instrument* instrument, unsigned long ticks, unsigned long noteOnTick ) 789 789 { 790 790 if ( instrument ) { // stop all notes using this instrument … … 815 815 816 816 if ( currentPattern ) { 817 int patternsize = currentPattern->get_leng ht();817 int patternsize = currentPattern->get_length(); 818 818 819 819 for ( unsigned nNote = 0 ; 820 nNote < currentPattern->get_leng ht() ;820 nNote < currentPattern->get_length() ; 821 821 nNote++ ) { 822 822 std::multimap <int, Note*>::iterator pos; … … 829 829 if ( pNote->get_instrument() == instrument 830 830 && pNote->get_position() == noteOnTick ) { 831 AudioEngine::get_instance()->lock("Sample::setnoteleng ht_event");831 AudioEngine::get_instance()->lock("Sample::setnotelength_event"); 832 832 833 833 if ( ticks > patternsize ) 834 834 ticks = patternsize - noteOnTick; 835 pNote->set_leng ht( ticks );835 pNote->set_length( ticks ); 836 836 Hydrogen::get_instance()->getSong()->__is_modified = true; 837 837 AudioEngine::get_instance()->unlock(); // unlock the audio engine … … 841 841 if ( pNote->get_instrument() == pEngine->getSong()->get_instrument_list()->get( pEngine->getSelectedInstrumentNumber()) 842 842 && pNote->get_position() == noteOnTick ) { 843 AudioEngine::get_instance()->lock("Sample::setnoteleng ht_event");843 AudioEngine::get_instance()->lock("Sample::setnotelength_event"); 844 844 if ( ticks > patternsize ) 845 845 ticks = patternsize - noteOnTick; 846 pNote->set_leng ht( ticks );846 pNote->set_length( ticks ); 847 847 Hydrogen::get_instance()->getSong()->__is_modified = true; 848 848 AudioEngine::get_instance()->unlock(); // unlock the audio engine