From 510f87bfccf231adc3367ba8c96fd457372ede7c Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 23 Jan 2011 23:19:31 +0100 Subject: [PATCH] Sf2Player: load default soundfont upon instantiation When creating a new Sf2Player plugin instance, load the default soundfont. Might decrease performance a little bit when loading projects which make use of many other soundfonts but for the sake of improved usability we should accept this. Partially closes #3149779. --- plugins/sf2_player/sf2_player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index e099506df..93ddb324e 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -128,7 +128,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) : InstrumentPlayHandle * iph = new InstrumentPlayHandle( this ); engine::getMixer()->addPlayHandle( iph ); - //loadFile( configManager::inst()->defaultSoundfont() ); + loadFile( configManager::inst()->defaultSoundfont() ); updateSampleRate(); updateReverbOn(); @@ -255,7 +255,7 @@ void sf2Instrument::loadSettings( const QDomElement & _this ) void sf2Instrument::loadFile( const QString & _file ) { - if( !_file.isEmpty() ) + if( !_file.isEmpty() && QFileInfo( _file ).exists() ) { openFile( _file ); updatePatch();