mutex, detuning helpers, GUI updates, play handles, many many changes... (2)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@480 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "types.h"
|
||||
|
||||
|
||||
class QLabel;
|
||||
class QPixmap;
|
||||
|
||||
class automatableButtonGroup;
|
||||
@@ -66,6 +67,15 @@ class arpAndChordsTabWidget : public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum arpDirections
|
||||
{
|
||||
OFF,
|
||||
UP,
|
||||
DOWN,
|
||||
UP_AND_DOWN,
|
||||
RANDOM
|
||||
} ;
|
||||
|
||||
arpAndChordsTabWidget( instrumentTrack * _channel_track );
|
||||
virtual ~arpAndChordsTabWidget();
|
||||
|
||||
@@ -97,16 +107,6 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
enum arpDirections
|
||||
{
|
||||
OFF,
|
||||
UP,
|
||||
DOWN,
|
||||
UP_AND_DOWN,
|
||||
RANDOM
|
||||
} ;
|
||||
|
||||
enum arpModes
|
||||
{
|
||||
FREE,
|
||||
|
||||
@@ -126,6 +126,14 @@ public:
|
||||
|
||||
virtual void saveSettings( void ) = 0;
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void show( void )
|
||||
{
|
||||
parentWidget()->show();
|
||||
QWidget::show();
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,14 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void show( void )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
QWidget::show();
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -41,14 +41,12 @@
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmutex.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qvaluelist.h>
|
||||
#include <qmap.h>
|
||||
@@ -57,7 +55,6 @@
|
||||
|
||||
|
||||
#include "audio_device.h"
|
||||
#include "tab_widget.h"
|
||||
|
||||
|
||||
class QLineEdit;
|
||||
@@ -110,7 +107,6 @@ private:
|
||||
bool m_active;
|
||||
bool m_stopped;
|
||||
|
||||
// QMutex m_processCallbackMutex;
|
||||
QSemaphore m_stop_semaphore;
|
||||
|
||||
vvector<jack_port_t *> m_outputPorts;
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
|
||||
#include "audio_device.h"
|
||||
#include "tab_widget.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "mixer.h"
|
||||
#include "effect_board.h"
|
||||
#include "effect_chain.h"
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
|
||||
#include "audio_device.h"
|
||||
#include "tab_widget.h"
|
||||
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
@@ -100,7 +100,12 @@ public:
|
||||
return( m_curLevel );
|
||||
}
|
||||
|
||||
inline T fittedValue( T _value );
|
||||
inline T fittedValue( T _value ) const;
|
||||
|
||||
T value( int _level ) const
|
||||
{
|
||||
return( fittedValue( _level * m_step ) );
|
||||
}
|
||||
|
||||
virtual void setInitValue( const T _value );
|
||||
|
||||
@@ -132,16 +137,6 @@ public:
|
||||
return( "automatableobject" );
|
||||
}
|
||||
|
||||
inline const QVariant & data( void ) const
|
||||
{
|
||||
return( m_data );
|
||||
}
|
||||
|
||||
void setData( const QVariant & _data )
|
||||
{
|
||||
m_data = _data;
|
||||
}
|
||||
|
||||
inline automationPattern * getAutomationPattern( void );
|
||||
|
||||
inline bool nullTrack( void )
|
||||
@@ -180,8 +175,6 @@ private:
|
||||
T m_oldValue;
|
||||
bool m_journalEntryReady;
|
||||
|
||||
QVariant m_data;
|
||||
|
||||
typedef vvector<autoObj *> autoObjVector;
|
||||
autoObjVector m_linkedObjects;
|
||||
|
||||
@@ -200,9 +193,9 @@ private:
|
||||
return( (int)roundf( _value / (float)m_step ) );
|
||||
}
|
||||
|
||||
QString levelToLabel( int _level )
|
||||
QString levelToLabel( int _level ) const
|
||||
{
|
||||
return( QString::number( _level * m_step ) );
|
||||
return( QString::number( value( _level ) ) );
|
||||
}
|
||||
|
||||
int labelToLevel( QString _label )
|
||||
|
||||
@@ -67,10 +67,7 @@ automatableObject<T, EDIT_STEP_TYPE>::automatableObject( track * _track,
|
||||
template<typename T, typename EDIT_STEP_TYPE>
|
||||
automatableObject<T, EDIT_STEP_TYPE>::~automatableObject()
|
||||
{
|
||||
if( m_automation_pattern )
|
||||
{
|
||||
delete m_automation_pattern;
|
||||
}
|
||||
delete m_automation_pattern;
|
||||
while( m_linkedObjects.empty() == FALSE )
|
||||
{
|
||||
m_linkedObjects.last()->unlinkObject( this );
|
||||
@@ -82,7 +79,7 @@ automatableObject<T, EDIT_STEP_TYPE>::~automatableObject()
|
||||
|
||||
|
||||
template<typename T, typename EDIT_STEP_TYPE>
|
||||
T automatableObject<T, EDIT_STEP_TYPE>::fittedValue( T _value )
|
||||
T automatableObject<T, EDIT_STEP_TYPE>::fittedValue( T _value ) const
|
||||
{
|
||||
_value = tLimit<T>( _value, minValue(), maxValue() );
|
||||
|
||||
@@ -230,10 +227,7 @@ void automatableObject<T, EDIT_STEP_TYPE>::linkObjects( autoObj * _object1,
|
||||
|
||||
if( _object1->m_automation_pattern != _object2->m_automation_pattern )
|
||||
{
|
||||
if( _object2->m_automation_pattern )
|
||||
{
|
||||
delete _object2->m_automation_pattern;
|
||||
}
|
||||
delete _object2->m_automation_pattern;
|
||||
_object2->m_automation_pattern = _object1->m_automation_pattern;
|
||||
}
|
||||
}
|
||||
@@ -264,7 +258,8 @@ void automatableObject<T, EDIT_STEP_TYPE>::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this,
|
||||
const QString & _name )
|
||||
{
|
||||
if( m_automation_pattern )
|
||||
if( m_automation_pattern && m_automation_pattern->getTimeMap().size()
|
||||
> 1 )
|
||||
{
|
||||
QDomElement pattern_element;
|
||||
QDomNode node = _this.namedItem(
|
||||
@@ -304,8 +299,7 @@ void automatableObject<T, EDIT_STEP_TYPE>::loadSettings(
|
||||
if( node.isElement() )
|
||||
{
|
||||
m_automation_pattern->loadSettings( node.toElement() );
|
||||
setLevel( m_automation_pattern->valueAt(
|
||||
midiTime( 0 ) ) );
|
||||
setLevel( m_automation_pattern->valueAt( 0 ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -399,8 +393,7 @@ void automatableObject<T, EDIT_STEP_TYPE>::setFirstValue( void )
|
||||
{
|
||||
if( m_automation_pattern && m_automation_pattern->updateFirst() )
|
||||
{
|
||||
m_automation_pattern->putValue( midiTime( 0 ), m_curLevel,
|
||||
FALSE );
|
||||
m_automation_pattern->putValue( 0, m_curLevel, FALSE );
|
||||
if( engine::getAutomationEditor() &&
|
||||
engine::getAutomationEditor()->currentPattern()
|
||||
== m_automation_pattern )
|
||||
|
||||
@@ -31,14 +31,16 @@
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QSlider>
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qslider.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "knob.h"
|
||||
class knob;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -33,19 +33,17 @@
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "note.h"
|
||||
#include "journalling_object.h"
|
||||
#include "midi_time.h"
|
||||
#include "automation_pattern.h"
|
||||
|
||||
|
||||
@@ -196,8 +194,6 @@ private:
|
||||
comboBox * m_zoomingYComboBox;
|
||||
comboBox * m_quantizeComboBox;
|
||||
|
||||
QPixmap m_paintPixmap;
|
||||
|
||||
|
||||
automationPattern * m_pattern;
|
||||
int m_min_level;
|
||||
@@ -206,7 +202,7 @@ private:
|
||||
int m_bottom_level;
|
||||
int m_top_level;
|
||||
|
||||
void updatePaintPixmap( void );
|
||||
void updatePaintPixmap( QPixmap & _p );
|
||||
void updateTopBottomLevels( void );
|
||||
|
||||
QScrollBar * m_leftRightScroll;
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
#ifndef _AUTOMATION_PATTERN_H
|
||||
#define _AUTOMATION_PATTERN_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#include "qt3support.h"
|
||||
#include "track.h"
|
||||
#include "level_object.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
#ifdef QT3
|
||||
|
||||
@@ -38,6 +39,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
class levelObject;
|
||||
class midiTime;
|
||||
class track;
|
||||
|
||||
|
||||
|
||||
|
||||
class automationPattern : public QObject, public journallingObject
|
||||
@@ -89,12 +95,12 @@ public:
|
||||
return( classNodeName() );
|
||||
}
|
||||
|
||||
inline track * getTrack( void )
|
||||
inline const track * getTrack( void )
|
||||
{
|
||||
return( m_track );
|
||||
}
|
||||
|
||||
inline levelObject * object( void )
|
||||
inline const levelObject * object( void )
|
||||
{
|
||||
return( m_object );
|
||||
}
|
||||
@@ -127,8 +133,7 @@ private:
|
||||
levelObject * m_object;
|
||||
timeMap m_time_map;
|
||||
bool m_update_first;
|
||||
|
||||
void init( void );
|
||||
bool m_dynamic;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* config_mgr.h - class configManager, a class for managing LMMS-configuration
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -257,9 +257,6 @@ private:
|
||||
QHBoxLayout * m_mainLayout;
|
||||
QVBoxLayout * m_contentLayout;
|
||||
|
||||
|
||||
friend class engine;
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
52
include/custom_events.h
Normal file
52
include/custom_events.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* custom_events.h - custom event types list
|
||||
*
|
||||
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _CUSTOM_EVENTS_H
|
||||
#define _CUSTOM_EVENTS_H
|
||||
|
||||
|
||||
#ifdef QT3
|
||||
|
||||
#include <qevent.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
namespace customEvents
|
||||
{
|
||||
|
||||
enum Type
|
||||
{
|
||||
GUI_UPDATE = QEvent::User
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
51
include/detuning_helper.h
Normal file
51
include/detuning_helper.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* detuning_helper.h - detuning automation helper
|
||||
*
|
||||
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DETUNING_HELPER_H
|
||||
#define _DETUNING_HELPER_H
|
||||
|
||||
|
||||
#include "shared_object.h"
|
||||
|
||||
|
||||
class detuningHelper : public automatableObject<float>, public sharedObject
|
||||
{
|
||||
public:
|
||||
detuningHelper( void ) :
|
||||
autoObj( NULL )
|
||||
{
|
||||
}
|
||||
|
||||
virtual QString displayName( void ) const
|
||||
{
|
||||
return( automationEditor::tr( "Note detuning" ) );
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -31,21 +31,17 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmutex.h>
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "plugin.h"
|
||||
#include "mixer.h"
|
||||
|
||||
@@ -157,21 +153,6 @@ public:
|
||||
m_bufferCount++;
|
||||
}
|
||||
|
||||
inline bool tryLock( void )
|
||||
{
|
||||
return( m_processLock.tryLock() );
|
||||
}
|
||||
|
||||
inline void lock( void )
|
||||
{
|
||||
m_processLock.lock();
|
||||
}
|
||||
|
||||
inline void unlock( void )
|
||||
{
|
||||
m_processLock.unlock();
|
||||
}
|
||||
|
||||
inline bool dontRun( void )
|
||||
{
|
||||
return( m_noRun );
|
||||
@@ -208,7 +189,6 @@ private:
|
||||
|
||||
float m_wetDry;
|
||||
float m_gate;
|
||||
QMutex m_processLock;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -25,16 +25,6 @@
|
||||
#ifndef _EFFECT_CHAIN_H
|
||||
#define _EFFECT_CHAIN_H
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmutex.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "effect.h"
|
||||
@@ -48,7 +38,7 @@ public:
|
||||
virtual ~effectChain();
|
||||
|
||||
void FASTCALL appendEffect( effect * _effect );
|
||||
void FASTCALL deleteEffect( effect * _effect );
|
||||
void FASTCALL removeEffect( effect * _effect );
|
||||
void FASTCALL moveDown( effect * _effect );
|
||||
void FASTCALL moveUp( effect * _effect );
|
||||
bool FASTCALL processAudioBuffer( surroundSampleFrame * _buf,
|
||||
@@ -70,7 +60,6 @@ private:
|
||||
effect_list_t m_effects;
|
||||
|
||||
bool m_bypassed;
|
||||
QMutex m_processLock;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* effect_control_dialog.h - base-class for effect-dialogs for displaying and
|
||||
* editing control port values
|
||||
*
|
||||
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef _EFFECT_CONTROL_DIALOG_H
|
||||
#define _EFFECT_CONTROL_DIALOG_H
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
@@ -36,12 +36,10 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "effect.h"
|
||||
|
||||
|
||||
class effect;
|
||||
class track;
|
||||
|
||||
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "tab_widget.h"
|
||||
#include "effect_tab_widget.h"
|
||||
|
||||
|
||||
class effectTabWidget;
|
||||
class sampleTrack;
|
||||
class tabWidget;
|
||||
|
||||
|
||||
class effectLabel: public QWidget, public journallingObject
|
||||
@@ -58,10 +58,7 @@ public:
|
||||
sampleTrack * _track );
|
||||
virtual ~effectLabel();
|
||||
|
||||
inline const QString & text( void )
|
||||
{
|
||||
return( m_text );
|
||||
}
|
||||
QString text( void ) const;
|
||||
void FASTCALL setText( const QString & _text );
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc,
|
||||
@@ -89,7 +86,6 @@ protected:
|
||||
|
||||
private:
|
||||
sampleTrack * m_track;
|
||||
QString m_text;
|
||||
bool m_show;
|
||||
|
||||
QLabel * m_label;
|
||||
|
||||
@@ -50,15 +50,14 @@
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "rack_plugin.h"
|
||||
#include "rack_view.h"
|
||||
#include "audio_port.h"
|
||||
#include "track.h"
|
||||
|
||||
|
||||
class instrumentTrack;
|
||||
class sampleTrack;
|
||||
class audioPort;
|
||||
class groupBox;
|
||||
class instrumentTrack;
|
||||
class rackView;
|
||||
class sampleTrack;
|
||||
class track;
|
||||
|
||||
|
||||
class effectTabWidget : public QWidget, public journallingObject
|
||||
@@ -99,8 +98,6 @@ private:
|
||||
QPushButton * m_addButton;
|
||||
|
||||
rackView * m_rack;
|
||||
|
||||
friend class instrumentTrack;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QMap>
|
||||
|
||||
|
||||
@@ -103,15 +103,6 @@ public:
|
||||
return( "el" );
|
||||
}
|
||||
|
||||
void lock( void )
|
||||
{
|
||||
m_busyMutex.lock();
|
||||
}
|
||||
void unlock( void )
|
||||
{
|
||||
m_busyMutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
void updateSampleVars( void );
|
||||
@@ -191,8 +182,6 @@ private:
|
||||
USER
|
||||
} m_lfoShape;
|
||||
|
||||
QMutex m_busyMutex;
|
||||
|
||||
sample_t lfoShapeSample( fpab_t _frame_offset );
|
||||
void updateLFOShapeData( void );
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* provides UI- and DSP-code for using envelopes, LFOs
|
||||
* and a filter
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -41,22 +41,20 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "basic_filters.h"
|
||||
#include "envelope_and_lfo_widget.h"
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
class QLabel;
|
||||
|
||||
class instrumentTrack;
|
||||
class comboBox;
|
||||
class envelopeAndLFOWidget;
|
||||
class groupBox;
|
||||
class knob;
|
||||
class notePlayHandle;
|
||||
class pixmapButton;
|
||||
class tabWidget;
|
||||
|
||||
class flpImport;
|
||||
|
||||
|
||||
class envelopeTabWidget : public QWidget, public journallingObject
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* fade_button.h - declaration of class fadeButton
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -58,18 +58,21 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
#ifndef QT3
|
||||
virtual void customEvent( QEvent * );
|
||||
#else
|
||||
virtual void customEvent( QCustomEvent * );
|
||||
#endif
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
|
||||
|
||||
private slots:
|
||||
void nextState( void );
|
||||
|
||||
|
||||
private:
|
||||
float m_state;
|
||||
QColor m_normalColor;
|
||||
QColor m_activatedColor;
|
||||
|
||||
void signalUpdate( void );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define _FIFO_BUFFER_H
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QSemaphore>
|
||||
|
||||
|
||||
@@ -48,15 +48,15 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "plugin.h"
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
// forward-declarations
|
||||
class instrumentTrack;
|
||||
class notePlayHandle;
|
||||
class midiEvent;
|
||||
class midiTime;
|
||||
class track;
|
||||
|
||||
|
||||
class instrument : public QWidget, public plugin
|
||||
@@ -104,13 +104,6 @@ public:
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// instrument-play-handles use this for checking whether they can mark
|
||||
// themselves as done, so that mixer trashes them
|
||||
inline virtual bool valid( void ) const
|
||||
{
|
||||
return( m_valid );
|
||||
}
|
||||
|
||||
inline virtual bool notePlayHandleBased( void ) const
|
||||
{
|
||||
return( TRUE );
|
||||
@@ -129,25 +122,18 @@ public:
|
||||
static instrument * FASTCALL instantiate( const QString & _plugin_name,
|
||||
instrumentTrack * _channel_track );
|
||||
|
||||
virtual bool isFromTrack( const track * _track ) const;
|
||||
|
||||
|
||||
protected:
|
||||
inline instrumentTrack * getInstrumentTrack( void ) const
|
||||
{
|
||||
return( m_instrumentTrack );
|
||||
}
|
||||
|
||||
// instruments can use this for invalidating themselves, which is for
|
||||
// example neccessary when being destroyed and having instrument-play-
|
||||
// handles running
|
||||
inline void invalidate( void )
|
||||
{
|
||||
m_valid = FALSE;
|
||||
engine::getMixer()->checkValidityOfPlayHandles();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
instrumentTrack * m_instrumentTrack;
|
||||
bool m_valid;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* instrument_play_handle.h - play-handle for playing an instrument
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -46,40 +46,27 @@ public:
|
||||
|
||||
inline virtual void play( bool _try_parallelizing )
|
||||
{
|
||||
if( m_instrument != NULL )
|
||||
{
|
||||
m_instrument->play( _try_parallelizing );
|
||||
}
|
||||
m_instrument->play( _try_parallelizing );
|
||||
}
|
||||
|
||||
inline virtual bool done( void ) const
|
||||
{
|
||||
return( m_instrument == NULL );
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
inline virtual void checkValidity( void )
|
||||
virtual bool isFromTrack( const track * _track ) const
|
||||
{
|
||||
if( m_instrument != NULL && !m_instrument->valid() )
|
||||
{
|
||||
m_instrument = NULL;
|
||||
}
|
||||
return( m_instrument->isFromTrack( _track ) );
|
||||
}
|
||||
|
||||
inline virtual bool supportsParallelizing( void ) const
|
||||
{
|
||||
if( m_instrument != NULL )
|
||||
{
|
||||
return( m_instrument->supportsParallelizing() );
|
||||
}
|
||||
return( FALSE );
|
||||
return( m_instrument->supportsParallelizing() );
|
||||
}
|
||||
|
||||
inline virtual void waitForWorkerThread( void )
|
||||
{
|
||||
if( m_instrument != NULL )
|
||||
{
|
||||
m_instrument->waitForWorkerThread();
|
||||
}
|
||||
m_instrument->waitForWorkerThread();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,31 +34,28 @@
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#else
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qpainter.h>
|
||||
#include <qmutex.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "track.h"
|
||||
#include "mixer.h"
|
||||
#include "midi_event_processor.h"
|
||||
#include "gui_templates.h"
|
||||
#include "mixer.h"
|
||||
#include "tab_widget.h"
|
||||
#include "volume_knob.h"
|
||||
#include "instrument.h"
|
||||
#include "track.h"
|
||||
|
||||
class QLineEdit;
|
||||
class arpAndChordsTabWidget;
|
||||
class audioPort;
|
||||
class instrumentTrackButton;
|
||||
class effectTabWidget;
|
||||
class envelopeTabWidget;
|
||||
class fadeButton;
|
||||
class instrument;
|
||||
class instrumentTrackButton;
|
||||
class lcdSpinBox;
|
||||
class midiPort;
|
||||
class midiTabWidget;
|
||||
@@ -66,8 +63,7 @@ class notePlayHandle;
|
||||
class pianoWidget;
|
||||
class presetPreviewPlayHandle;
|
||||
class surroundArea;
|
||||
class flpImport;
|
||||
class effectTabWidget;
|
||||
class volumeKnob;
|
||||
|
||||
|
||||
class instrumentTrack : public QWidget, public track, public midiEventProcessor
|
||||
@@ -94,10 +90,6 @@ public:
|
||||
const midiTime & _time );
|
||||
|
||||
|
||||
// returns the frequency of a given tone & octave.
|
||||
// This function also includes base_tone & base_octave in
|
||||
// its calculations
|
||||
float FASTCALL frequency( notePlayHandle * _n ) const;
|
||||
f_cnt_t FASTCALL beatLen( notePlayHandle * _n ) const;
|
||||
|
||||
|
||||
@@ -187,7 +179,6 @@ public slots:
|
||||
|
||||
|
||||
signals:
|
||||
void baseNoteChanged( void );
|
||||
void noteDone( const note & _n );
|
||||
|
||||
|
||||
@@ -225,8 +216,6 @@ private:
|
||||
|
||||
notePlayHandle * m_notes[NOTES_PER_OCTAVE * OCTAVES];
|
||||
|
||||
QMutex m_notesMutex;
|
||||
|
||||
|
||||
tones m_baseTone;
|
||||
octaves m_baseOctave;
|
||||
|
||||
@@ -96,7 +96,7 @@ public slots:
|
||||
|
||||
signals:
|
||||
void valueChanged( float value );
|
||||
void valueChanged( const QVariant & _data );
|
||||
void valueChanged( void );
|
||||
void sliderPressed( void );
|
||||
void sliderReleased( void );
|
||||
void sliderMoved( float value );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* level_object.h - declaration of class levelObject
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,8 +26,6 @@
|
||||
#ifndef _LEVEL_OBJECT_H
|
||||
#define _LEVEL_OBJECT_H
|
||||
|
||||
#include "midi_time.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,9 +48,14 @@ public:
|
||||
|
||||
virtual void setLevel( int _level ) = 0;
|
||||
|
||||
virtual QString levelToLabel( int _level ) = 0;
|
||||
virtual QString levelToLabel( int _level ) const = 0;
|
||||
virtual int labelToLevel( QString _label ) = 0;
|
||||
|
||||
virtual QString displayName( void ) const
|
||||
{
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
int m_minLevel;
|
||||
|
||||
@@ -48,9 +48,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
||||
class QDomElement;
|
||||
class QGridLayout;
|
||||
class QSplashScreen;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* meter_dialog.h - diloag for entering meter settings
|
||||
* meter_dialog.h - dialog for entering meter settings
|
||||
*
|
||||
* Copyright (c) 2006 Danny McRae <khjklujn/at/yahoo.com>
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/yahoo.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef _METER_DIALOG_H
|
||||
#define _METER_DIALOG_H
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
@@ -36,11 +36,10 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "track.h"
|
||||
#include "lcd_spinbox.h"
|
||||
|
||||
|
||||
class meterDialog: public QWidget
|
||||
class meterDialog : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -130,6 +130,14 @@ public:
|
||||
|
||||
virtual void saveSettings( void ) = 0;
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void show( void )
|
||||
{
|
||||
parentWidget()->show();
|
||||
QWidget::show();
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
|
||||
|
||||
#include "midi_client.h"
|
||||
#include "midi_port.h"
|
||||
#include "tab_widget.h"
|
||||
|
||||
|
||||
class midiDummy : public midiClientRaw
|
||||
@@ -65,6 +63,14 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void show( void )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
QWidget::show();
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_event_processor.h - base-class for midi-processing classes
|
||||
*
|
||||
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -31,10 +31,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "midi_time.h"
|
||||
|
||||
|
||||
class midiEvent;
|
||||
class midiTime;
|
||||
|
||||
|
||||
// all classes being able to process MIDI-events should inherit from this
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* midi_port.h - abstraction of MIDI-ports which are part of LMMS's MIDI-
|
||||
* sequencing system
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -46,11 +46,11 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "midi.h"
|
||||
#include "midi_time.h"
|
||||
|
||||
|
||||
class midiClient;
|
||||
class midiEventProcessor;
|
||||
class midiTime;
|
||||
|
||||
|
||||
// class for abstraction of MIDI-port
|
||||
|
||||
@@ -49,11 +49,8 @@
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "volume.h"
|
||||
#include "panning.h"
|
||||
#include "note.h"
|
||||
#include "play_handle.h"
|
||||
#include "effect_board.h"
|
||||
#include "fifo_buffer.h"
|
||||
|
||||
|
||||
@@ -113,7 +110,7 @@ class mixer : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
void initDevices( void );
|
||||
void FASTCALL clear( const bool _everything = FALSE );
|
||||
void FASTCALL clear( void );
|
||||
|
||||
|
||||
// audio-device-stuff
|
||||
@@ -133,9 +130,9 @@ public:
|
||||
// audio-port-stuff
|
||||
inline void addAudioPort( audioPort * _port )
|
||||
{
|
||||
pause();
|
||||
lock();
|
||||
m_audioPorts.push_back( _port );
|
||||
play();
|
||||
unlock();
|
||||
}
|
||||
|
||||
inline void removeAudioPort( audioPort * _port )
|
||||
@@ -179,21 +176,16 @@ public:
|
||||
m_playHandlesToRemove.push_back( _ph );
|
||||
}
|
||||
|
||||
inline const playHandleVector & playHandles( void ) const
|
||||
{
|
||||
return( m_playHandles );
|
||||
}
|
||||
|
||||
inline playHandleVector & playHandles( void )
|
||||
{
|
||||
return( m_playHandles );
|
||||
}
|
||||
|
||||
void checkValidityOfPlayHandles( void );
|
||||
void removePlayHandles( track * _track );
|
||||
|
||||
inline bool haveNoRunningNotes( void ) const
|
||||
inline bool hasPlayHandles( void ) const
|
||||
{
|
||||
return( m_playHandles.size() == 0 );
|
||||
return( !m_playHandles.empty() );
|
||||
}
|
||||
|
||||
|
||||
@@ -251,23 +243,15 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// methods for controlling mixer-state
|
||||
void pause( void )
|
||||
// methods needed by other threads to alter knob values, waveforms, etc
|
||||
void lock( void )
|
||||
{
|
||||
if( m_mixMutexLockLevel == 0 )
|
||||
{
|
||||
m_mixMutex.lock();
|
||||
}
|
||||
++m_mixMutexLockLevel;
|
||||
m_mixMutex.lock();
|
||||
}
|
||||
|
||||
void play( void )
|
||||
void unlock( void )
|
||||
{
|
||||
if( m_mixMutexLockLevel == 1 )
|
||||
{
|
||||
m_mixMutex.unlock();
|
||||
}
|
||||
--m_mixMutexLockLevel;
|
||||
m_mixMutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -331,13 +315,6 @@ private:
|
||||
void stopProcessing( void );
|
||||
|
||||
|
||||
// we don't allow to create mixer by using copy-ctor
|
||||
mixer( const mixer & )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
audioDevice * tryAudioDevices( void );
|
||||
midiClient * tryMIDIClients( void );
|
||||
|
||||
@@ -389,7 +366,6 @@ private:
|
||||
|
||||
|
||||
QMutex m_mixMutex;
|
||||
Uint8 m_mixMutexLockLevel;
|
||||
|
||||
|
||||
fifo * m_fifo;
|
||||
@@ -397,7 +373,6 @@ private:
|
||||
|
||||
|
||||
friend class engine;
|
||||
friend class fifoWriter;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* mmp.h - class for reading and writing multimedia-project-files
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -62,7 +62,8 @@ public:
|
||||
|
||||
|
||||
multimediaProject( const QString & _in_file_name,
|
||||
bool _is_filename = TRUE );
|
||||
bool _is_filename = TRUE,
|
||||
bool _upgrade = TRUE );
|
||||
multimediaProject( projectTypes _project_type );
|
||||
~multimediaProject();
|
||||
|
||||
@@ -92,6 +93,8 @@ private:
|
||||
|
||||
void cleanMetaNodes( QDomElement _de );
|
||||
|
||||
void upgrade( void );
|
||||
|
||||
|
||||
struct typeDescStruct
|
||||
{
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
#include "midi_time.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
class detuningHelper;
|
||||
|
||||
|
||||
enum tones
|
||||
{
|
||||
C = 0,
|
||||
@@ -88,8 +91,6 @@ const int NOTES_PER_OCTAVE = WHITE_KEYS_PER_OCTAVE + BLACK_KEYS_PER_OCTAVE;
|
||||
const int OCTAVES = MAX_OCTAVE+1;
|
||||
const int NOTES = OCTAVES*NOTES_PER_OCTAVE;
|
||||
|
||||
class knob;
|
||||
|
||||
|
||||
|
||||
class note : public journallingObject
|
||||
@@ -101,7 +102,7 @@ public:
|
||||
octaves _octave = DEFAULT_OCTAVE,
|
||||
volume _volume = DEFAULT_VOLUME,
|
||||
panning _panning = DEFAULT_PANNING,
|
||||
knob * _detuning = NULL ) FASTCALL;
|
||||
detuningHelper * _detuning = NULL ) FASTCALL;
|
||||
note( const note & _note );
|
||||
virtual ~note();
|
||||
|
||||
@@ -168,7 +169,7 @@ public:
|
||||
static midiTime FASTCALL quantized( const midiTime & _m,
|
||||
const int _q_grid );
|
||||
|
||||
knob * detuning( void ) const
|
||||
detuningHelper * detuning( void ) const
|
||||
{
|
||||
return( m_detuning );
|
||||
}
|
||||
@@ -204,10 +205,9 @@ private:
|
||||
panning m_panning;
|
||||
midiTime m_length;
|
||||
midiTime m_pos;
|
||||
knob * m_detuning;
|
||||
detuningHelper * m_detuning;
|
||||
|
||||
void createDetuning( void );
|
||||
void FASTCALL setDetuning( knob * _detuning );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -27,12 +27,11 @@
|
||||
#ifndef _NOTE_PLAY_HANDLE_H
|
||||
#define _NOTE_PLAY_HANDLE_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#include "play_handle.h"
|
||||
#include "basic_filters.h"
|
||||
#include "bb_track.h"
|
||||
#include "note.h"
|
||||
#include "instrument.h"
|
||||
#include "instrument_track.h"
|
||||
|
||||
|
||||
@@ -42,32 +41,36 @@ typedef vvector<notePlayHandle *> notePlayHandleVector;
|
||||
typedef vvector<const notePlayHandle *> constNotePlayHandleVector;
|
||||
|
||||
|
||||
class notePlayHandle : public QObject, public playHandle, public note
|
||||
class notePlayHandle : public playHandle, public note
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
void * m_pluginData;
|
||||
basicFilters<> * m_filter;
|
||||
|
||||
float m_frequency;
|
||||
|
||||
notePlayHandle( instrumentTrack * _chnl_trk,
|
||||
const f_cnt_t _frames_ahead,
|
||||
const f_cnt_t _frames, const note & _n,
|
||||
notePlayHandle * _parent = NULL,
|
||||
const bool _arp_note = FALSE );
|
||||
virtual ~notePlayHandle();
|
||||
|
||||
|
||||
const float & frequency( void )
|
||||
{
|
||||
return( m_frequency );
|
||||
}
|
||||
|
||||
void updateFrequency( void );
|
||||
|
||||
virtual void play( bool _try_parallelizing );
|
||||
|
||||
virtual inline bool done( void ) const
|
||||
{
|
||||
return( ( m_released && m_framesBeforeRelease == 0 &&
|
||||
m_releaseFramesDone >= m_releaseFramesToDo ) ||
|
||||
m_instrumentTrack == NULL );
|
||||
m_releaseFramesDone >= m_releaseFramesToDo ) );
|
||||
}
|
||||
|
||||
virtual void checkValidity( void );
|
||||
virtual bool isFromTrack( const track * _track ) const;
|
||||
|
||||
|
||||
void FASTCALL noteOff( const f_cnt_t _s = 0 );
|
||||
@@ -114,17 +117,6 @@ public:
|
||||
// returns volume-level at frame _frame (envelope/LFO)
|
||||
float FASTCALL volumeLevel( const f_cnt_t _frame );
|
||||
|
||||
// adds note-play-handle _n as subnote
|
||||
inline void addSubNote( notePlayHandle * _n )
|
||||
{
|
||||
m_subNotes.push_back( _n );
|
||||
_n->m_baseNote = FALSE;
|
||||
// if there was an arp-note added and this note is a base-note
|
||||
// we set arp-note-flag for indicating that this note is an
|
||||
// arpeggio-base-note
|
||||
m_arpNote = _n->arpNote() && baseNote();
|
||||
}
|
||||
|
||||
// returns instrument-track this note-play-handle plays
|
||||
inline instrumentTrack * getInstrumentTrack( void )
|
||||
{
|
||||
@@ -182,15 +174,11 @@ public:
|
||||
{
|
||||
m_bbTrack = _bb_track;
|
||||
}
|
||||
void setBBTrackFrom( notePlayHandle * _handle )
|
||||
{
|
||||
m_bbTrack = _handle->m_bbTrack;
|
||||
}
|
||||
|
||||
|
||||
virtual bool supportsParallelizing( void ) const
|
||||
{
|
||||
return( m_instrumentTrack->m_instrument->
|
||||
return( m_instrumentTrack->getInstrument()->
|
||||
supportsParallelizing()
|
||||
&&
|
||||
// we must not parallelize note-play-handles, which
|
||||
@@ -198,7 +186,7 @@ public:
|
||||
// handle-driven, because then waitForWorkerThread()
|
||||
// would be additionally called for each
|
||||
// note-play-handle which results in hangups
|
||||
m_instrumentTrack->m_instrument->
|
||||
m_instrumentTrack->getInstrument()->
|
||||
notePlayHandleBased() );
|
||||
}
|
||||
|
||||
@@ -224,6 +212,32 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
class baseDetuning
|
||||
{
|
||||
public:
|
||||
baseDetuning( detuningHelper * _detuning );
|
||||
|
||||
int level( void )
|
||||
{
|
||||
return( m_level );
|
||||
}
|
||||
|
||||
void setLevel( int _level );
|
||||
|
||||
float value( void )
|
||||
{
|
||||
return( m_value );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
int m_level;
|
||||
float m_value;
|
||||
detuningHelper * m_detuning;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
instrumentTrack * m_instrumentTrack; // needed for calling
|
||||
// instrumentTrack::playNote
|
||||
f_cnt_t m_frames; // total frames to play
|
||||
@@ -255,9 +269,9 @@ private:
|
||||
bpm_t m_orig_bpm; // original bpm
|
||||
f_cnt_t m_orig_frames; // original m_frames
|
||||
|
||||
float m_frequency;
|
||||
|
||||
private slots:
|
||||
void updateFrequency( void );
|
||||
baseDetuning * m_base_detuning;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -60,19 +60,19 @@ public:
|
||||
PHASE_MODULATION, AMP_MODULATION, MIX, SYNC, FREQ_MODULATION
|
||||
} ;
|
||||
|
||||
oscillator( const waveShapes * _wave_shape,
|
||||
const modulationAlgos * _modulation_algo,
|
||||
const float * _freq,
|
||||
const float * _detuning,
|
||||
const float * _phase_offset,
|
||||
const float * _volume,
|
||||
oscillator( const waveShapes & _wave_shape,
|
||||
const modulationAlgos & _modulation_algo,
|
||||
const float & _freq,
|
||||
const float & _detuning,
|
||||
const float & _phase_offset,
|
||||
const float & _volume,
|
||||
oscillator * _m_subOsc = NULL ) FASTCALL;
|
||||
virtual ~oscillator()
|
||||
{
|
||||
delete m_subOsc;
|
||||
}
|
||||
|
||||
inline void setUserWave( sampleBuffer * _wave )
|
||||
inline void setUserWave( const sampleBuffer * _wave )
|
||||
{
|
||||
m_userWave = _wave;
|
||||
}
|
||||
@@ -154,16 +154,16 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
const waveShapes * m_waveShape;
|
||||
const modulationAlgos * m_modulationAlgo;
|
||||
const float * m_freq;
|
||||
const float * m_detuning;
|
||||
const float * m_volume;
|
||||
const float * m_ext_phaseOffset;
|
||||
const waveShapes & m_waveShape;
|
||||
const modulationAlgos & m_modulationAlgo;
|
||||
const float & m_freq;
|
||||
const float & m_detuning;
|
||||
const float & m_volume;
|
||||
const float & m_ext_phaseOffset;
|
||||
oscillator * m_subOsc;
|
||||
float m_phaseOffset;
|
||||
float m_phase;
|
||||
sampleBuffer * m_userWave;
|
||||
const sampleBuffer * m_userWave;
|
||||
|
||||
|
||||
void updateNoSub( sampleFrame * _ab, const fpab_t _frames,
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtGui/QPixmap>
|
||||
@@ -42,7 +41,6 @@
|
||||
|
||||
#include <qvaluevector.h>
|
||||
#include <qwidget.h>
|
||||
#include <qmutex.h>
|
||||
#include <qdialog.h>
|
||||
#include <qthread.h>
|
||||
#include <qpixmap.h>
|
||||
@@ -52,7 +50,6 @@
|
||||
|
||||
#include "note.h"
|
||||
#include "track.h"
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
class QAction;
|
||||
@@ -97,15 +94,11 @@ public:
|
||||
|
||||
void clearNotes( void );
|
||||
|
||||
inline noteVector & notes( void )
|
||||
inline const noteVector & notes( void )
|
||||
{
|
||||
return( m_notes );
|
||||
}
|
||||
|
||||
note * FASTCALL noteAt( int _note_num );
|
||||
|
||||
void FASTCALL setNoteAt( int _note_num, note _new_note );
|
||||
|
||||
// pattern-type stuff
|
||||
inline patternTypes type( void ) const
|
||||
{
|
||||
@@ -219,7 +212,6 @@ private:
|
||||
int m_steps;
|
||||
|
||||
// pattern freezing
|
||||
QMutex m_frozenPatternMutex;
|
||||
sampleBuffer * m_frozenPattern;
|
||||
bool m_freezing;
|
||||
volatile bool m_freezeAborted;
|
||||
|
||||
@@ -33,13 +33,11 @@
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -178,7 +176,7 @@ private:
|
||||
|
||||
midiTime newNoteLen( void ) const;
|
||||
|
||||
void updatePaintPixmap( void );
|
||||
void updatePaintPixmap( QPixmap & _p );
|
||||
|
||||
|
||||
static QPixmap * s_whiteKeyBigPm;
|
||||
@@ -212,8 +210,6 @@ private:
|
||||
comboBox * m_quantizeComboBox;
|
||||
comboBox * m_noteLenComboBox;
|
||||
|
||||
QPixmap m_paintPixmap;
|
||||
|
||||
|
||||
pattern * m_pattern;
|
||||
QScrollBar * m_leftRightScroll;
|
||||
@@ -256,7 +252,7 @@ private:
|
||||
void drawDetuningInfo( QPainter & _p, note * _n, Uint16 _x, Uint16 _y );
|
||||
bool mouseOverNote( void );
|
||||
note * noteUnderMouse( void );
|
||||
noteVector::iterator noteIteratorUnderMouse( void );
|
||||
noteVector::const_iterator noteIteratorUnderMouse( void );
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* piano_widget.h - declaration of class pianoWidget, a widget which provides
|
||||
* an interactive piano/keyboard-widget
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -44,12 +44,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "knob.h"
|
||||
#include "note.h"
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
class instrumentTrack;
|
||||
class knob;
|
||||
class notePlayHandle;
|
||||
|
||||
|
||||
@@ -67,12 +66,7 @@ public:
|
||||
pianoWidget( instrumentTrack * _channel_track );
|
||||
virtual ~pianoWidget();
|
||||
|
||||
inline void setKeyState( int _key, bool _on = FALSE )
|
||||
{
|
||||
m_pressedKeys[tLimit( _key, 0, NOTES_PER_OCTAVE *
|
||||
OCTAVES -1 )] = _on;
|
||||
update();
|
||||
}
|
||||
void setKeyState( int _key, bool _on = FALSE );
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this,
|
||||
const QString & _name );
|
||||
@@ -87,6 +81,11 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
#ifndef QT3
|
||||
virtual void customEvent( QEvent * );
|
||||
#else
|
||||
virtual void customEvent( QCustomEvent * );
|
||||
#endif
|
||||
virtual void paintEvent( QPaintEvent * );
|
||||
virtual void mousePressEvent( QMouseEvent * me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * me );
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* play_handle.h - base-class playHandle which is needed by
|
||||
* LMMS-Player-Engine
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -44,6 +44,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
class track;
|
||||
|
||||
|
||||
class playHandle
|
||||
{
|
||||
public:
|
||||
@@ -72,14 +75,7 @@ public:
|
||||
virtual void play( bool _try_parallelizing = FALSE ) = 0;
|
||||
virtual bool done( void ) const = 0;
|
||||
|
||||
// play-handles can invalidate themselves if an object they depend on
|
||||
// is going to be deleted or things like that - every of those objects
|
||||
// has to call mixer::inst()->checkValidityOfPlayHandles() in it's dtor
|
||||
// and set flag before, so LMMS doesn't crash because these play-handles
|
||||
// would continue using pointers to deleted objects...
|
||||
virtual void checkValidity( void )
|
||||
{
|
||||
}
|
||||
virtual bool isFromTrack( const track * _track ) const = 0;
|
||||
|
||||
virtual bool supportsParallelizing( void ) const
|
||||
{
|
||||
|
||||
@@ -46,9 +46,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "journalling_object.h"
|
||||
#include "embed.h"
|
||||
#include "base64.h"
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
|
||||
class instrumentTrack;
|
||||
class notePlayHandle;
|
||||
class previewTrackContainer;
|
||||
|
||||
|
||||
@@ -47,6 +46,8 @@ public:
|
||||
virtual void play( bool _try_parallelizing );
|
||||
virtual bool done( void ) const;
|
||||
|
||||
virtual bool isFromTrack( const track * _track ) const;
|
||||
|
||||
static void cleanUp( void );
|
||||
static constNotePlayHandleVector nphsOfInstrumentTrack(
|
||||
const instrumentTrack * _ct );
|
||||
|
||||
67
include/project_version.h
Normal file
67
include/project_version.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* project_version.h - version compared in import upgrades
|
||||
*
|
||||
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PROJECT_VERSION_H
|
||||
#define _PROJECT_VERSION_H
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
class projectVersion : public QString
|
||||
{
|
||||
public:
|
||||
projectVersion( const QString & _s ) :
|
||||
QString( _s )
|
||||
{
|
||||
}
|
||||
|
||||
static int compare( const projectVersion & _v1,
|
||||
const projectVersion & _v2 );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
inline bool operator<( const projectVersion & _v1, const char * _str )
|
||||
{
|
||||
return( projectVersion::compare( _v1, projectVersion( _str ) ) < 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* qt3support.h - layer for supporting Qt3
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,9 +26,6 @@
|
||||
#ifndef _QT3SUPPORT_H
|
||||
#define _QT3SUPPORT_H
|
||||
|
||||
// don't know why following line is neccessary, it's a bug in qt-headers -
|
||||
// otherwise LMMS sometimes fails to compile
|
||||
//#include <qmap.h>
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <qpair.h>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* rack_plugin.h - tab-widget in channel-track-window for setting up
|
||||
* effects
|
||||
*
|
||||
* Copyright (c) 2006 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef _RACK_PLUGIN_H
|
||||
#define _RACK_PLUGIN_H
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QGroupBox>
|
||||
@@ -43,14 +43,15 @@
|
||||
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "track.h"
|
||||
#include "audio_port.h"
|
||||
|
||||
|
||||
class knob;
|
||||
class tempoSyncKnob;
|
||||
class audioPort;
|
||||
class effect;
|
||||
class effectControlDialog;
|
||||
class knob;
|
||||
class ledCheckBox;
|
||||
class tempoSyncKnob;
|
||||
class track;
|
||||
|
||||
|
||||
class rackPlugin: public QWidget, public journallingObject
|
||||
@@ -108,7 +109,6 @@ private:
|
||||
effectControlDialog * m_controlView;
|
||||
track * m_track;
|
||||
audioPort * m_port;
|
||||
QMenu * m_contextMenu;
|
||||
bool m_show;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -46,9 +46,12 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "journalling_object.h"
|
||||
#include "rack_plugin.h"
|
||||
#include "track.h"
|
||||
#include "audio_port.h"
|
||||
|
||||
|
||||
class audioPort;
|
||||
class effect;
|
||||
class rackPlugin;
|
||||
class track;
|
||||
|
||||
|
||||
class rackView: public QWidget, public journallingObject
|
||||
|
||||
@@ -31,12 +31,10 @@
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#else
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qmutex.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -195,7 +193,7 @@ public:
|
||||
void normalize_sample_rate( const sample_rate_t _src_sr,
|
||||
bool _keep_settings = FALSE );
|
||||
|
||||
inline sample_t userWaveSample( const float _sample )
|
||||
inline sample_t userWaveSample( const float _sample ) const
|
||||
{
|
||||
// Precise implementation
|
||||
// const float frame = fraction( _sample ) * m_frames;
|
||||
@@ -216,15 +214,6 @@ public:
|
||||
return( m_data[f1][0] );
|
||||
}
|
||||
|
||||
void lock( void )
|
||||
{
|
||||
m_dataMutex.lock();
|
||||
}
|
||||
void unlock( void )
|
||||
{
|
||||
m_dataMutex.unlock();
|
||||
}
|
||||
|
||||
static QString tryToMakeRelative( const QString & _file );
|
||||
static QString tryToMakeAbsolute( const QString & _file );
|
||||
|
||||
@@ -274,7 +263,6 @@ private:
|
||||
bool m_reversed;
|
||||
float m_frequency;
|
||||
sample_rate_t m_sample_rate;
|
||||
QMutex m_dataMutex;
|
||||
|
||||
#ifdef HAVE_SAMPLERATE_H
|
||||
void initResampling( void );
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "play_handle.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "types.h"
|
||||
|
||||
class bbTrack;
|
||||
class pattern;
|
||||
@@ -53,6 +52,8 @@ public:
|
||||
void play( const fpab_t _frame_base, bool _try_parallelizing );
|
||||
virtual bool done( void ) const;
|
||||
|
||||
virtual bool isFromTrack( const track * _track ) const;
|
||||
|
||||
f_cnt_t totalFrames( void ) const;
|
||||
inline f_cnt_t framesDone( void ) const
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* sample_track.h - class sampleTrack, a track which provides arrangement of
|
||||
* samples
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -41,12 +41,12 @@
|
||||
|
||||
|
||||
#include "track.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "volume_knob.h"
|
||||
|
||||
class effectLabel;
|
||||
class audioPort;
|
||||
class QLabel;
|
||||
class audioPort;
|
||||
class effectLabel;
|
||||
class sampleBuffer;
|
||||
class volumeKnob;
|
||||
|
||||
//class sampleTCOSettingsDialog;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* shared_object.h - class sharedObject for use among threads
|
||||
* shared_object.h - class sharedObject for use among other objects
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,16 +26,6 @@
|
||||
#ifndef _SHARED_OBJECT_H
|
||||
#define _SHARED_OBJECT_H
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmutex.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,18 +41,14 @@ public:
|
||||
static T * ref( T * _object )
|
||||
{
|
||||
// TODO: Use QShared
|
||||
_object->m_reference_mutex.lock();
|
||||
++_object->m_reference_count;
|
||||
_object->m_reference_mutex.unlock();
|
||||
return( _object );
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static void unref( T * _object )
|
||||
{
|
||||
_object->m_reference_mutex.lock();
|
||||
bool delete_object = --_object->m_reference_count == 0;
|
||||
_object->m_reference_mutex.unlock();
|
||||
if ( delete_object )
|
||||
{
|
||||
delete _object;
|
||||
@@ -72,7 +58,6 @@ public:
|
||||
|
||||
private:
|
||||
unsigned m_reference_count;
|
||||
QMutex m_reference_mutex;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* side_bar.h - code for side-bar in LMMS
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -40,7 +40,6 @@
|
||||
|
||||
|
||||
#include "kmultitabbar.h"
|
||||
#include "side_bar_widget.h"
|
||||
|
||||
|
||||
class sideBar : public KMultiTabBar
|
||||
|
||||
@@ -293,8 +293,6 @@ private:
|
||||
|
||||
track * m_automation_track;
|
||||
|
||||
bool m_destroyed;
|
||||
|
||||
|
||||
|
||||
enum ACTIONS
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "knob.h"
|
||||
#include "types.h"
|
||||
#include "mixer.h"
|
||||
#include "templates.h"
|
||||
|
||||
|
||||
class QPixmap;
|
||||
class knob;
|
||||
class track;
|
||||
|
||||
|
||||
const int SURROUND_AREA_SIZE = 1024;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef _TEMPO_SYNC_KNOB_H
|
||||
#define _TEMPO_SYNC_KNOB_H
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
@@ -37,11 +37,10 @@
|
||||
#endif
|
||||
|
||||
#include "knob.h"
|
||||
#include "types.h"
|
||||
#include "meter_dialog.h"
|
||||
|
||||
|
||||
class QAction;
|
||||
class meterDialog;
|
||||
|
||||
|
||||
class tempoSyncKnob : public knob
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tool.h - declaration of class tool, standard interface for all tool plugins
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -27,7 +27,7 @@
|
||||
#define _TOOL_H
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
|
||||
@@ -268,7 +268,6 @@ private slots:
|
||||
void disableAutomation( void );
|
||||
void enableAutomation( void );
|
||||
void removeTrack( void );
|
||||
void removeTrackTimer( void );
|
||||
void muteBtnRightClicked( void );
|
||||
void updateMenu( void );
|
||||
|
||||
@@ -403,7 +402,6 @@ public:
|
||||
SAMPLE_TRACK,
|
||||
EVENT_TRACK,
|
||||
VIDEO_TRACK,
|
||||
NULL_TRACK,
|
||||
AUTOMATION_TRACK,
|
||||
TOTAL_TRACK_TYPES
|
||||
} ;
|
||||
@@ -412,9 +410,9 @@ public:
|
||||
virtual ~track();
|
||||
|
||||
static track * FASTCALL create( trackTypes _tt, trackContainer * _tc );
|
||||
static track * FASTCALL create( const QDomElement & _this,
|
||||
static void FASTCALL create( const QDomElement & _this,
|
||||
trackContainer * _tc );
|
||||
static track * FASTCALL clone( track * _track );
|
||||
void FASTCALL clone( void );
|
||||
|
||||
tact length( void ) const;
|
||||
|
||||
@@ -467,7 +465,7 @@ public:
|
||||
return( m_trackWidget );
|
||||
}
|
||||
|
||||
inline trackContainer * getTrackContainer( void )
|
||||
inline trackContainer * getTrackContainer( void ) const
|
||||
{
|
||||
return( m_trackContainer );
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
|
||||
#include "track.h"
|
||||
#include "journalling_object.h"
|
||||
#include "rubberband.h"
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +95,6 @@ public:
|
||||
|
||||
virtual void updateAfterTrackAdd( void );
|
||||
void FASTCALL setPixelsPerTact( Uint16 _ppt );
|
||||
void FASTCALL cloneTrack( track * _track );
|
||||
void FASTCALL addTrack( track * _track );
|
||||
void FASTCALL removeTrack( track * _track );
|
||||
void FASTCALL moveTrackUp( track * _track );
|
||||
@@ -190,9 +188,6 @@ private:
|
||||
QPoint m_origin;
|
||||
|
||||
|
||||
friend class scrollArea;
|
||||
|
||||
|
||||
signals:
|
||||
void positionChanged( const midiTime & _pos );
|
||||
|
||||
|
||||
56
include/update_event.h
Normal file
56
include/update_event.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* update_event.h - signal GUI updates
|
||||
*
|
||||
* Copyright (c) 2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _UPDATE_EVENT_H
|
||||
#define _UPDATE_EVENT_H
|
||||
|
||||
|
||||
#include "custom_events.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
class updateEvent : public QEvent
|
||||
#else
|
||||
class updateEvent : public QCustomEvent
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
updateEvent( void ) :
|
||||
#ifndef QT3
|
||||
QEvent( (QEvent::Type)customEvents::GUI_UPDATE )
|
||||
#else
|
||||
QCustomEvent( customEvents::GUI_UPDATE )
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -26,21 +26,11 @@
|
||||
#ifndef _VOLUME_KNOB_H
|
||||
#define _VOLUME_KNOB_H
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "knob.h"
|
||||
|
||||
|
||||
class volumeKnob: public knob
|
||||
class volumeKnob : public knob
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -57,6 +47,7 @@ protected:
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user