AudioJack::AudioJack( bool & _success_ful, Mixer* _mixer ) : AudioDevice( tLimit<int>( ConfigManager::inst()->value( "audiojack", "channels" ).toInt(), DEFAULT_CHANNELS, SURROUND_CHANNELS ), _mixer ), m_client( NULL ), m_active( false ), m_tempOutBufs( new jack_default_audio_sample_t *[channels()] ), m_outBuf( new surroundSampleFrame[mixer()->framesPerPeriod()] ), m_framesDoneInCurBuf( 0 ), m_framesToDoInCurBuf( 0 ) { _success_ful = initJackClient(); if( _success_ful ) { connect( this, SIGNAL( zombified() ), this, SLOT( restartAfterZombified() ), Qt::QueuedConnection ); } }
void AudioJack::restartAfterZombified() { if( initJackClient() ) { m_active = false; startProcessing(); QMessageBox::information( engine::mainWindow(), tr( "JACK client restarted" ), tr( "LMMS was kicked by JACK for some reason. " "Therefore the JACK backend of LMMS has been " "restarted. You will have to make manual " "connections again." ) ); } else { QMessageBox::information( engine::mainWindow(), tr( "JACK server down" ), tr( "The JACK server seems to have been shutdown " "and starting a new instance failed. " "Therefore LMMS is unable to proceed. " "You should save your project and restart " "JACK and LMMS." ) ); } }