move or delete effects
partial save and load for effects git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@296 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include<qmutex.h>
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "engine.h"
|
||||
@@ -136,7 +138,8 @@ private:
|
||||
ch_cnt_t m_processors;
|
||||
Uint16 m_effectChannels;
|
||||
Uint16 m_portCount;
|
||||
|
||||
fpab_t m_bufferSize;
|
||||
|
||||
const LADSPA_Descriptor * m_descriptor;
|
||||
vvector<LADSPA_Handle> m_handles;
|
||||
|
||||
@@ -155,6 +158,7 @@ private:
|
||||
|
||||
float m_wetDry;
|
||||
float m_gate;
|
||||
QMutex m_processLock;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "ladspa_manager.h"
|
||||
#ifdef LADSPA_SUPPORT
|
||||
|
||||
#include <qmutex.h>
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "engine.h"
|
||||
@@ -42,8 +44,10 @@ public:
|
||||
~effectChain();
|
||||
|
||||
void FASTCALL appendEffect( effect * _effect );
|
||||
void FASTCALL deleteEffect( effect * _effect );
|
||||
void FASTCALL moveDown( effect * _effect );
|
||||
void FASTCALL moveUp( effect * _effect );
|
||||
bool FASTCALL processAudioBuffer( surroundSampleFrame * _buf, const fpab_t _frames );
|
||||
void FASTCALL swapEffects( effect * _eff1, effect * _eff2 );
|
||||
void setRunning( void );
|
||||
bool isRunning( void );
|
||||
|
||||
@@ -61,7 +65,7 @@ private:
|
||||
effect_list_t m_effects;
|
||||
|
||||
bool m_bypassed;
|
||||
|
||||
QMutex m_processLock;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -69,8 +69,7 @@ public:
|
||||
virtual ~effectTabWidget();
|
||||
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void FASTCALL loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
|
||||
@@ -64,6 +64,7 @@ public:
|
||||
public slots:
|
||||
void showPorts( const ladspa_key_t & _key );
|
||||
void testLADSPA( const ladspa_key_t & _key );
|
||||
void displayHelp( void );
|
||||
|
||||
private:
|
||||
tabBar * m_tabBar;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#include "engine.h"
|
||||
#include "journalling_object.h"
|
||||
#include "instrument_track.h"
|
||||
#include "knob.h"
|
||||
#include "led_checkbox.h"
|
||||
@@ -38,7 +38,7 @@
|
||||
typedef struct portDescription port_desc_t;
|
||||
|
||||
|
||||
class ladspaControl : public QWidget, public engineObject
|
||||
class ladspaControl : public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -46,11 +46,21 @@ public:
|
||||
~ladspaControl();
|
||||
|
||||
LADSPA_Data getValue( void );
|
||||
void FASTCALL setValue( LADSPA_Data _value );
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void FASTCALL loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "port" );
|
||||
}
|
||||
|
||||
private:
|
||||
port_desc_t * m_port;
|
||||
ledCheckBox * m_toggle;
|
||||
knob * m_knob;
|
||||
|
||||
QMutex m_processLock;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,17 +51,41 @@ public:
|
||||
rackPlugin( QWidget * _parent, ladspa_key_t _key, instrumentTrack * _track, engine * _engine );
|
||||
~rackPlugin();
|
||||
|
||||
QString nodeName( void ) const
|
||||
inline effect * getEffect()
|
||||
{
|
||||
return( "plugin" );
|
||||
return( m_effect );
|
||||
}
|
||||
|
||||
inline const ladspa_key_t & getKey( void )
|
||||
{
|
||||
return( m_key );
|
||||
}
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void FASTCALL loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "effect" );
|
||||
}
|
||||
|
||||
public slots:
|
||||
void editControls( void );
|
||||
void bypassed( bool _state );
|
||||
void setWetDry( float _value );
|
||||
void setAutoQuit( float _value );
|
||||
void setGate( float _value );
|
||||
void moveUp( void );
|
||||
void moveDown( void );
|
||||
void deletePlugin( void );
|
||||
void displayHelp( void );
|
||||
|
||||
signals:
|
||||
void moveUp( rackPlugin * _plugin );
|
||||
void moveDown( rackPlugin * _plugin );
|
||||
void deletePlugin( rackPlugin * _plugin );
|
||||
|
||||
protected:
|
||||
void contextMenuEvent( QContextMenuEvent * _me );
|
||||
|
||||
private:
|
||||
ledCheckBox * m_bypass;
|
||||
@@ -74,6 +98,10 @@ private:
|
||||
QPushButton * m_editButton;
|
||||
effect * m_effect;
|
||||
ladspaControlDialog * m_controlView;
|
||||
instrumentTrack * m_track;
|
||||
QMenu * m_contextMenu;
|
||||
ladspa_key_t m_key;
|
||||
QString m_name;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,12 +34,13 @@
|
||||
#include <qptrlist.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "engine.h"
|
||||
#include "journalling_object.h"
|
||||
#include "rack_plugin.h"
|
||||
#include "instrument_track.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
|
||||
|
||||
class rackView: public QWidget, public engineObject
|
||||
class rackView: public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -48,16 +49,31 @@ public:
|
||||
~rackView();
|
||||
|
||||
void addPlugin( ladspa_key_t _key );
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void FASTCALL loadSettings( const QDomElement & _this );
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "rack" );
|
||||
}
|
||||
|
||||
public slots:
|
||||
void moveUp( rackPlugin * _plugin );
|
||||
void moveDown( rackPlugin * _plugin );
|
||||
void deletePlugin( rackPlugin * _plugin );
|
||||
|
||||
private:
|
||||
QPtrList<rackPlugin> m_rackInserts;
|
||||
int m_insertIndex;
|
||||
void redraw();
|
||||
|
||||
vvector<rackPlugin *> m_rackInserts;
|
||||
|
||||
QVBoxLayout * m_mainLayout;
|
||||
QScrollView * m_scrollView;
|
||||
QVBox * m_rack;
|
||||
|
||||
instrumentTrack * m_instrumentTrack;
|
||||
Uint32 m_lastY;
|
||||
|
||||
ladspa2LMMS * m_ladspa;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user