hiho,
if track outputs are activated there is a bug if you add an new instrument.
bug howto :-)
1. activate track outs
2. add an new instrument
3. add an new sample into new instrument
4. click directly on the new instrument into the patterneditor.
then h2 will crashes with this message.
ydrogen: libs/hydrogen/src/sampler/sampler.cpp:415: int
H2Core::Sampler::__render_note_no_resample(H2Core::Sample*, H2Core::Note*, int,
int,
float, float, float, float, float, float, H2Core::Song*): Zusicherung
»__track_out_L[ nInstrument ]« nicht erfüllt.
imo, the problem is we have to reconnect the track outs because the new
instrument have no track_outputconection.
after adding this line into instrumenteditor.cpp line 529.
engine->renameJackPorts();
the problem is done.
the function only rename track outs if track outputs are active.
i will commit this small fix later.
also we can call this function if me move instruments with drag and drop.
because the track output chronological order has change.
if anybody think this is ok i also will fix this problem.
see how the function work.
====================8< renameJackPorts() >8==========================
#ifdef JACK_SUPPORT
void Hydrogen::renameJackPorts()
{
if( Preferences::getInstance()->m_bJackTrackOuts == true ){
audioEngine_renameJackPorts();
}
}
#endif
====================8< audioEngine_renameJackPorts() >8==============
void audioEngine_renameJackPorts()
{
#ifdef JACK_SUPPORT
// renames jack ports
if ( m_pSong == NULL ) {
return;
}
if ( m_pAudioDriver->get_class_name() == "JackOutput" ) {
static_cast< JackOutput* >( m_pAudioDriver )->makeTrackOutputs(
m_pSong );
}
AudioEngine::get_instance()->get_sampler()->makeTrackOutputQueues();
#endif
}
======================================================================
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel