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.
This commit is contained in:
Tobias Doerffel
2011-01-23 23:19:31 +01:00
parent 4cad9517aa
commit 510f87bfcc

View File

@@ -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();