diff --git a/ChangeLog b/ChangeLog index 5ef0207c9..87bcb1f87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,49 @@ +2008-08-29 Tobias Doerffel + + * plugins/sid/sid_instrument.cpp: + * plugins/ladspa_effect/ladspa_effect.cpp: + * plugins/patman/patman.cpp: + * plugins/lb302/lb302.cpp: + * plugins/organic/organic.cpp: + * plugins/stereo_matrix/stereo_matrix.cpp: + * plugins/bass_booster/bass_booster.cpp: + * plugins/bit_invader/bit_invader.cpp: + * plugins/vst_effect/vst_effect.cpp: + * plugins/vibed/vibed.cpp: + * plugins/triple_oscillator/triple_oscillator.cpp: + * plugins/live_tool/live_tool.cpp: + * plugins/peak_controller_effect/peak_controller_effect.cpp: + * plugins/audio_file_processor/audio_file_processor.cpp: + * plugins/audio_file_processor/audio_file_processor.h: + * plugins/stk/mallets/mallets.cpp: + * plugins/stereo_enhancer/stereo_enhancer.cpp: + * plugins/sf2_player/sf2_player.cpp: + * plugins/sf2_player/sf2_player.h: + * plugins/vestige/vestige.cpp: + * plugins/ladspa_browser/ladspa_browser.cpp: + * plugins/spectrum_analyzer/spectrum_analyzer.cpp: + * plugins/kicker/kicker.cpp: + * plugins/flp_import/flp_import.cpp: + * plugins/midi_import/midi_import.cpp: + * include/plugin.h: + * include/instrument_track.h: + * include/instrument.h: + * include/file_browser.h: + * include/preset_preview_play_handle.h: + * src/core/engine.cpp: + * src/core/preset_preview_play_handle.cpp: + * src/gui/file_browser.cpp: + - improved concept for file types supported by certain plugins + - various small improvements for an even better ZynAddSubFX integration + + * src/tracks/instrument_track.cpp: + pass all MIDI events to instrument + + * include/remote_plugin.h: + * src/core/remote_plugin.cpp: + added remotePlugin-framework allowing to easily write plugins which + actually run as external process + 2008-08-28 Tobias Doerffel * plugins/vst_base/lvsl_client.cpp: diff --git a/include/file_browser.h b/include/file_browser.h index 2eee2a747..99f74848a 100644 --- a/include/file_browser.h +++ b/include/file_browser.h @@ -174,6 +174,7 @@ public: { ProjectFile, PresetFile, + SpecialPresetFile, SampleFile, MidiFile, FlpFile, diff --git a/include/instrument.h b/include/instrument.h index a1be74c6f..9e5243c41 100644 --- a/include/instrument.h +++ b/include/instrument.h @@ -62,7 +62,9 @@ public: // to be implemented by actual plugin virtual void playNote( notePlayHandle * _note_to_play, bool _try_parallelizing, - sampleFrame * _working_buf ) = 0; + sampleFrame * _working_buf ) + { + } // needed for deleting plugin-specific-data of a note - plugin has to // cast void-ptr so that the plugin-data is deleted properly diff --git a/include/instrument_track.h b/include/instrument_track.h index 73f58cc2b..59cac7b2f 100644 --- a/include/instrument_track.h +++ b/include/instrument_track.h @@ -90,6 +90,11 @@ public: return( m_instrument ); } + inline instrument * getInstrument( void ) + { + return( m_instrument ); + } + void deleteNotePluginData( notePlayHandle * _n ); // name-stuff diff --git a/include/plugin.h b/include/plugin.h index c90b858c2..1eeaeff4e 100644 --- a/include/plugin.h +++ b/include/plugin.h @@ -72,6 +72,12 @@ public: int version; PluginTypes type; const pixmapLoader * logo; + const char * supportedFileTypes; + inline bool supportsFileType( const QString & _ext ) const + { + return( QString( supportedFileTypes ). + split( ',' ).contains( _ext ) ); + } class EXPORT subPluginFeatures { public: @@ -128,12 +134,6 @@ public: { } - virtual const QStringList & supportedExtensions( void ) - { - static QStringList no_extensions; - return( no_extensions ); - } - protected: const plugin::PluginTypes m_type; diff --git a/include/preset_preview_play_handle.h b/include/preset_preview_play_handle.h index c91a5177c..a75d5f2a7 100644 --- a/include/preset_preview_play_handle.h +++ b/include/preset_preview_play_handle.h @@ -37,7 +37,8 @@ class previewTrackContainer; class presetPreviewPlayHandle : public playHandle { public: - presetPreviewPlayHandle( const QString & _preset_file ); + presetPreviewPlayHandle( const QString & _preset_file, + bool _special_preset = false ); virtual ~presetPreviewPlayHandle(); virtual void play( bool _try_parallelizing, diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 3c914a08c..1217422c0 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -61,7 +61,8 @@ plugin::descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), - new audioFileProcessor::subPluginFeatures( plugin::Instrument ) + "wav,ogg,ds,spx,au,voc,aif,aiff,flac,raw", + NULL } ; } @@ -273,28 +274,6 @@ void audioFileProcessor::loopPointChanged( void ) - -audioFileProcessor::subPluginFeatures::subPluginFeatures( - plugin::PluginTypes _type ) : - plugin::descriptor::subPluginFeatures( _type ) -{ -} - - - - -const QStringList & audioFileProcessor::subPluginFeatures::supportedExtensions( - void ) -{ - static QStringList extensions = QStringList() - << "wav" << "ogg" << "ds" << "spx" << "au" - << "voc" << "aif" << "aiff" << "flac" << "raw"; - return( extensions ); -} - - - - class audioFileKnob : public knob { public: diff --git a/plugins/audio_file_processor/audio_file_processor.h b/plugins/audio_file_processor/audio_file_processor.h index 9a939cbc1..b93907462 100644 --- a/plugins/audio_file_processor/audio_file_processor.h +++ b/plugins/audio_file_processor/audio_file_processor.h @@ -41,16 +41,6 @@ class audioFileProcessor : public instrument { Q_OBJECT public: - class subPluginFeatures : public plugin::descriptor::subPluginFeatures - { - public: - subPluginFeatures( plugin::PluginTypes _type ); - - virtual const QStringList & supportedExtensions( void ); - - } ; - - audioFileProcessor( instrumentTrack * _instrument_track ); virtual ~audioFileProcessor(); diff --git a/plugins/bass_booster/bass_booster.cpp b/plugins/bass_booster/bass_booster.cpp index 5759d6eec..6e5b37305 100644 --- a/plugins/bass_booster/bass_booster.cpp +++ b/plugins/bass_booster/bass_booster.cpp @@ -43,6 +43,7 @@ plugin::descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor = 0x0100, plugin::Effect, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 335a61cf0..d79e44c58 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -61,6 +61,7 @@ plugin::descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/flp_import/flp_import.cpp b/plugins/flp_import/flp_import.cpp index 1da1ac1c1..ed02defa2 100644 --- a/plugins/flp_import/flp_import.cpp +++ b/plugins/flp_import/flp_import.cpp @@ -75,6 +75,7 @@ plugin::descriptor PLUGIN_EXPORT flpimport_plugin_descriptor = 0x0100, plugin::ImportFilter, NULL, + NULL, NULL } ; diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index 4ab1dfe1c..f0870b596 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -50,6 +50,7 @@ plugin::descriptor PLUGIN_EXPORT kicker_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/ladspa_browser/ladspa_browser.cpp b/plugins/ladspa_browser/ladspa_browser.cpp index 446f87734..00b5c803b 100644 --- a/plugins/ladspa_browser/ladspa_browser.cpp +++ b/plugins/ladspa_browser/ladspa_browser.cpp @@ -57,6 +57,7 @@ plugin::descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor = 0x0100, plugin::Tool, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/ladspa_effect/ladspa_effect.cpp b/plugins/ladspa_effect/ladspa_effect.cpp index 757769aa3..22e008b10 100644 --- a/plugins/ladspa_effect/ladspa_effect.cpp +++ b/plugins/ladspa_effect/ladspa_effect.cpp @@ -54,6 +54,7 @@ plugin::descriptor PLUGIN_EXPORT ladspaeffect_plugin_descriptor = 0x0100, plugin::Effect, new pluginPixmapLoader( "logo" ), + NULL, new ladspaSubPluginFeatures( plugin::Effect ) } ; diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 919efa5a0..9e5705143 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -87,6 +87,7 @@ plugin::descriptor PLUGIN_EXPORT lb302_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL }; diff --git a/plugins/live_tool/live_tool.cpp b/plugins/live_tool/live_tool.cpp index df94eb2d9..1f138b6af 100644 --- a/plugins/live_tool/live_tool.cpp +++ b/plugins/live_tool/live_tool.cpp @@ -56,6 +56,7 @@ plugin::descriptor PLUGIN_EXPORT livetool_plugin_descriptor = 0x0100, plugin::Tool, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/midi_import/midi_import.cpp b/plugins/midi_import/midi_import.cpp index 70a2e7420..d737454b0 100644 --- a/plugins/midi_import/midi_import.cpp +++ b/plugins/midi_import/midi_import.cpp @@ -58,6 +58,7 @@ plugin::descriptor PLUGIN_EXPORT midiimport_plugin_descriptor = 0x0100, plugin::ImportFilter, NULL, + NULL, NULL } ; diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index 7474445b9..7f08d2d33 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -56,6 +56,7 @@ plugin::descriptor PLUGIN_EXPORT organic_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index a853310b1..fbb51b468 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -58,6 +58,7 @@ plugin::descriptor PLUGIN_EXPORT patman_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, new patmanInstrument::subPluginFeatures( plugin::Instrument ) } ; diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index 84e30cc39..6b564487d 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -46,6 +46,7 @@ plugin::descriptor PLUGIN_EXPORT peakcontrollereffect_plugin_descriptor = 0x0100, plugin::Effect, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 97dd3dfac..e3d7d6e3f 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -58,7 +58,8 @@ plugin::descriptor sf2player_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), - new sf2Instrument::subPluginFeatures( plugin::Instrument ) + "sf2", + NULL } ; } @@ -634,22 +635,9 @@ pluginView * sf2Instrument::instantiateView( QWidget * _parent ) -sf2Instrument::subPluginFeatures::subPluginFeatures( - plugin::PluginTypes _type ) : - plugin::descriptor::subPluginFeatures( _type ) -{ -} - -const QStringList & sf2Instrument::subPluginFeatures::supportedExtensions( - void ) -{ - static QStringList extensions = QStringList() << "sf2"; - return( extensions ); -} - class sf2Knob : public knob { public: diff --git a/plugins/sf2_player/sf2_player.h b/plugins/sf2_player/sf2_player.h index 3bba2a331..829392a61 100644 --- a/plugins/sf2_player/sf2_player.h +++ b/plugins/sf2_player/sf2_player.h @@ -48,14 +48,6 @@ class sf2Instrument : public instrument { Q_OBJECT public: - class subPluginFeatures : public plugin::descriptor::subPluginFeatures - { - public: - subPluginFeatures( plugin::PluginTypes _type ); - - virtual const QStringList & supportedExtensions( void ); - } ; - sf2Instrument( instrumentTrack * _instrument_track ); virtual ~sf2Instrument(); @@ -85,11 +77,6 @@ public: return( FALSE ); } - virtual bool supportsParallelizing( void ) const - { - return( FALSE ); - } - virtual pluginView * instantiateView( QWidget * _parent ); QString getCurrentPatchName(); diff --git a/plugins/sid/sid_instrument.cpp b/plugins/sid/sid_instrument.cpp index 98209e51b..f00a1bf21 100644 --- a/plugins/sid/sid_instrument.cpp +++ b/plugins/sid/sid_instrument.cpp @@ -80,6 +80,7 @@ plugin::descriptor PLUGIN_EXPORT sid_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/spectrum_analyzer/spectrum_analyzer.cpp b/plugins/spectrum_analyzer/spectrum_analyzer.cpp index f283b09f4..8542e9780 100644 --- a/plugins/spectrum_analyzer/spectrum_analyzer.cpp +++ b/plugins/spectrum_analyzer/spectrum_analyzer.cpp @@ -44,6 +44,7 @@ plugin::descriptor PLUGIN_EXPORT spectrumanalyzer_plugin_descriptor = 0x0100, plugin::Effect, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/stereo_enhancer/stereo_enhancer.cpp b/plugins/stereo_enhancer/stereo_enhancer.cpp index 5c9a2c5f0..17d1055a5 100644 --- a/plugins/stereo_enhancer/stereo_enhancer.cpp +++ b/plugins/stereo_enhancer/stereo_enhancer.cpp @@ -43,6 +43,7 @@ plugin::descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor = 0x0100, plugin::Effect, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/stereo_matrix/stereo_matrix.cpp b/plugins/stereo_matrix/stereo_matrix.cpp index 3dbb6ecd6..f1f5a012c 100644 --- a/plugins/stereo_matrix/stereo_matrix.cpp +++ b/plugins/stereo_matrix/stereo_matrix.cpp @@ -43,6 +43,7 @@ plugin::descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor = 0x0100, plugin::Effect, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index a65ea9bc0..694c5cd27 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -52,6 +52,7 @@ plugin::descriptor malletsstk_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/triple_oscillator/triple_oscillator.cpp b/plugins/triple_oscillator/triple_oscillator.cpp index 326e135bd..58afdd688 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -58,6 +58,7 @@ plugin::descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor = 0x0110, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index af98d5769..bf381c744 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -59,6 +59,7 @@ plugin::descriptor vestige_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL } ; diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index e77f9a773..1a712dcb6 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -57,6 +57,7 @@ plugin::descriptor PLUGIN_EXPORT vibedstrings_plugin_descriptor = 0x0100, plugin::Instrument, new pluginPixmapLoader( "logo" ), + NULL, NULL }; diff --git a/plugins/vst_effect/vst_effect.cpp b/plugins/vst_effect/vst_effect.cpp index 48f65f377..26d1d99ef 100644 --- a/plugins/vst_effect/vst_effect.cpp +++ b/plugins/vst_effect/vst_effect.cpp @@ -50,6 +50,7 @@ plugin::descriptor vsteffect_plugin_descriptor = 0x0200, plugin::Effect, new pluginPixmapLoader( "logo" ), + NULL, new vstSubPluginFeatures( plugin::Effect ) } ; diff --git a/src/core/engine.cpp b/src/core/engine.cpp index 3a80a38a8..f7967ebae 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -173,19 +173,14 @@ void engine::loadExtensions( void ) pluginDescriptors.begin(); it != pluginDescriptors.end(); ++it ) { - if( it->sub_plugin_features ) + if( it->type == plugin::Instrument ) { - if( it->type == plugin::Instrument ) - { - const QStringList & ext = - it->sub_plugin_features - ->supportedExtensions(); - for( QStringList::const_iterator itExt = - ext.begin(); + const QStringList & ext = + QString( it->supportedFileTypes ).split( ',' ); + for( QStringList::const_iterator itExt = ext.begin(); itExt != ext.end(); ++itExt ) - { - s_sampleExtensions[*itExt] = it->name; - } + { + s_sampleExtensions[*itExt] = it->name; } } } diff --git a/src/core/preset_preview_play_handle.cpp b/src/core/preset_preview_play_handle.cpp index 5f2ef1f9e..e21020cff 100644 --- a/src/core/preset_preview_play_handle.cpp +++ b/src/core/preset_preview_play_handle.cpp @@ -26,7 +26,7 @@ */ -#include +#include #include #include "preset_preview_play_handle.h" @@ -104,8 +104,8 @@ previewTrackContainer * presetPreviewPlayHandle::s_previewTC; -presetPreviewPlayHandle::presetPreviewPlayHandle( - const QString & _preset_file ) : +presetPreviewPlayHandle::presetPreviewPlayHandle( const QString & _preset_file, + bool _special_preset ) : playHandle( PresetPreviewHandle ), m_previewNote( NULL ) { @@ -120,9 +120,30 @@ presetPreviewPlayHandle::presetPreviewPlayHandle( const bool j = engine::getProjectJournal()->isJournalling(); engine::getProjectJournal()->setJournalling( FALSE ); - multimediaProject mmp( _preset_file ); - s_previewTC->previewInstrumentTrack()->loadTrackSpecificSettings( + if( _special_preset ) + { + instrument * i = s_previewTC->previewInstrumentTrack()-> + getInstrument(); + const QString ext = QFileInfo( _preset_file ). + suffix().toLower(); + if( i == NULL || !i->getDescriptor()->supportsFileType( ext ) ) + { + i = s_previewTC->previewInstrumentTrack()-> + loadInstrument( + engine::sampleExtensions()[ext] ); + } + if( i != NULL ) + { + i->setParameter( "samplefile", _preset_file ); + } + } + else + { + multimediaProject mmp( _preset_file ); + s_previewTC->previewInstrumentTrack()-> + loadTrackSpecificSettings( mmp.content().firstChild().toElement() ); + } // make sure, our preset-preview-track does not appear in any MIDI- // devices list, so just disable receiving/sending MIDI-events at all diff --git a/src/gui/file_browser.cpp b/src/gui/file_browser.cpp index 9c5ecc8b3..d943d90fd 100644 --- a/src/gui/file_browser.cpp +++ b/src/gui/file_browser.cpp @@ -211,7 +211,8 @@ void listView::activateListItem( QTreeWidgetItem * _item, int _column ) return; } - if( f->type() == fileItem::SampleFile ) + if( f->type() == fileItem::SampleFile || + f->type() == fileItem::SpecialPresetFile ) { // samples are per default opened in bb-editor because they're // likely drum-samples etc. @@ -283,17 +284,19 @@ void listView::sendToActiveInstrumentTrack( void ) // ok, it's an instrument-track, so we can apply the // sample or the preset engine::getMixer()->lock(); - if( m_contextMenuItem->type() == fileItem::SampleFile ) + if( m_contextMenuItem->type() == fileItem::SampleFile || + m_contextMenuItem->type() == + fileItem::SpecialPresetFile ) { - instrument * afp = itw->model()->loadInstrument( - engine::sampleExtensions() - [m_contextMenuItem - ->extension()] ); - if( afp != NULL ) + QString e = m_contextMenuItem->extension(); + instrument * i = itw->model()->getInstrument(); + if( !i->getDescriptor()->supportsFileType( e ) ) { - afp->setParameter( "samplefile", - m_contextMenuItem->fullName() ); + i = itw->model()->loadInstrument( + engine::sampleExtensions()[e] ); } + i->setParameter( "samplefile", + m_contextMenuItem->fullName() ); } else if( m_contextMenuItem->type() == fileItem::PresetFile ) @@ -317,20 +320,21 @@ void listView::sendToActiveInstrumentTrack( void ) void listView::openInNewInstrumentTrack( trackContainer * _tc ) { engine::getMixer()->lock(); - if( m_contextMenuItem->type() == fileItem::SampleFile ) + if( m_contextMenuItem->type() == fileItem::SampleFile || + m_contextMenuItem->type() == fileItem::SpecialPresetFile ) { instrumentTrack * ct = dynamic_cast( track::create( track::InstrumentTrack, _tc ) ); #ifdef LMMS_DEBUG assert( ct != NULL ); #endif - instrument * afp = ct->loadInstrument( + instrument * i = ct->loadInstrument( engine::sampleExtensions() [m_contextMenuItem ->extension()] ); - if( afp != NULL ) + if( i != NULL ) { - afp->setParameter( "samplefile", + i->setParameter( "samplefile", m_contextMenuItem->fullName() ); } //ct->toggledInstrumentTrackButton( TRUE ); @@ -385,7 +389,8 @@ void listView::contextMenuEvent( QContextMenuEvent * _e ) { fileItem * f = dynamic_cast( itemAt( _e->pos() ) ); if( f != NULL && ( f->type() == fileItem::SampleFile || - f->type() == fileItem::PresetFile ) ) + f->type() == fileItem::SpecialPresetFile || + f->type() == fileItem::PresetFile ) ) { m_contextMenuItem = f; QMenu contextMenu( this ); @@ -459,10 +464,13 @@ void listView::mousePressEvent( QMouseEvent * _me ) m_previewPlayHandle = s; delete tf; } - else if( f->type() == fileItem::PresetFile ) + else if( f->type() == fileItem::PresetFile || + f->type() == fileItem::SpecialPresetFile ) { - m_previewPlayHandle = new presetPreviewPlayHandle( - f->fullName() ); + m_previewPlayHandle = + new presetPreviewPlayHandle( f->fullName(), + f->type() == + fileItem::SpecialPresetFile ); } if( m_previewPlayHandle != NULL ) { @@ -794,6 +802,7 @@ void fileItem::initPixmapStuff( void ) setIcon( 0, *s_projectFilePixmap ); break; case PresetFile: + case SpecialPresetFile: setIcon( 0, *s_presetFilePixmap ); break; case SampleFile: @@ -843,6 +852,10 @@ void fileItem::determineFileType( void ) { m_type = PresetFile; } + else if( ext == "xiz" ) + { + m_type = SpecialPresetFile; + } else if( engine::sampleExtensions().contains( ext ) ) { m_type = SampleFile;