Skip to content

Commit

Permalink
Enable sf3 extension (LMMS#3895)
Browse files Browse the repository at this point in the history
Add sf3 file extension, move `sf2` to `soundfonts`.
  • Loading branch information
tresf authored Nov 15, 2017
1 parent b21fa96 commit 9e87d7f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/ConfigManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const QString TEMPLATE_PATH = "templates/";
const QString PRESETS_PATH = "presets/";
const QString SAMPLES_PATH = "samples/";
const QString GIG_PATH = "samples/gig/";
const QString SF2_PATH = "samples/sf2/";
const QString SF2_PATH = "samples/soundfonts/";
const QString LADSPA_PATH ="plugins/ladspa/";
const QString DEFAULT_THEME_PATH = "themes/default/";
const QString TRACK_ICON_PATH = "track_icons/";
Expand Down
4 changes: 2 additions & 2 deletions plugins/sf2_player/sf2_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Plugin::Descriptor PLUGIN_EXPORT sf2player_plugin_descriptor =
0x0100,
Plugin::Instrument,
new PluginPixmapLoader( "logo" ),
"sf2",
"sf2,sf3",
NULL
} ;

Expand Down Expand Up @@ -1078,7 +1078,7 @@ void sf2InstrumentView::showFileDialog()
ofd.setFileMode( FileDialog::ExistingFiles );

QStringList types;
types << tr( "SoundFont2 Files (*.sf2)" );
types << tr( "SoundFont Files (*.sf2 *.sf3)" );
ofd.setNameFilters( types );

if( k->m_filename != "" )
Expand Down
2 changes: 1 addition & 1 deletion src/core/DataFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ bool DataFile::validate( QString extension )
if (! ( extension == "mmp" || extension == "mpt" || extension == "mmpz" ||
extension == "xpf" || extension == "xml" ||
( extension == "xiz" && ! pluginFactory->pluginSupportingExtension(extension).isNull()) ||
extension == "sf2" || extension == "pat" || extension == "mid" ||
extension == "sf2" || extension == "sf3" || extension == "pat" || extension == "mid" ||
extension == "dll"
) )
{
Expand Down
4 changes: 2 additions & 2 deletions src/gui/FileBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ void FileBrowserTreeWidget::mousePressEvent(QMouseEvent * me )
m_previewPlayHandle = s;
delete tf;
}
else if( ( f->extension ()== "xiz" || f->extension() == "sf2" || f->extension() == "gig" ) &&
else if( ( f->extension ()== "xiz" || f->extension() == "sf2" || f->extension() == "sf3" || f->extension() == "gig" ) &&
! pluginFactory->pluginSupportingExtension(f->extension()).isNull() )
{
m_previewPlayHandle = new PresetPreviewPlayHandle( f->fullName(), f->handling() == FileItem::LoadByPlugin );
Expand Down Expand Up @@ -983,7 +983,7 @@ void FileItem::determineFileType( void )
m_type = PresetFile;
m_handling = LoadByPlugin;
}
else if( ext == "sf2" )
else if( ext == "sf2" || ext == "sf3" )
{
m_type = SoundFontFile;
}
Expand Down

0 comments on commit 9e87d7f

Please sign in to comment.