made all sound-generator-plugins shared libraries which are loaded at runtime when needed; removed obsolete files and fixed bugs in tabWidget
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@13 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
39
ChangeLog
39
ChangeLog
@@ -1,3 +1,42 @@
|
||||
2005-09-29 Tobias Doerffel <tobydox@users.sourceforge.net>
|
||||
|
||||
* src/widgets/tab_widget.cpp:
|
||||
fixed bugs when adding widget with already existing index
|
||||
|
||||
* Makefile.am:
|
||||
* include/midi_out.h:
|
||||
* include/plucked_string_synth.h:
|
||||
* src/soundgenerators/midi_out.cpp:
|
||||
* src/soundgenerators/plucked_string_synth.cpp:
|
||||
classes midiOut and pluckedStringSynth do not have slots or signals,
|
||||
so Q_OBJECT-macros were removed and MOC-code isn't compiled anymore
|
||||
|
||||
* include/sgs:
|
||||
* src/core/plugin_management.cpp:
|
||||
removed because not needed anymore with new plugin-system
|
||||
|
||||
* configure.in:
|
||||
* Makefile.am:
|
||||
* include/audio_file_processor.h:
|
||||
* include/channel_track.h:
|
||||
* include/midi_out.h:
|
||||
* include/plucked_string_synth.h:
|
||||
* include/sound_generator.h:
|
||||
* include/triple_oscillator.h:
|
||||
* src/core/browser.cpp:
|
||||
* src/core/sound_generator.cpp:
|
||||
* src/core/song_editor.cpp:
|
||||
* src/midi/midi_file.cpp:
|
||||
* src/soundgenerators/*:
|
||||
* src/tracks/channel_track.cpp:
|
||||
made all sound-generator-plugins shared libraries loaded at runtime,
|
||||
which gives much more flexibility because you can load songs/presets
|
||||
from people having other plugins just by adding according lib*.so file
|
||||
to /usr/lib - no need to recompile!
|
||||
|
||||
* inlude/empty_sg_plugin.h:
|
||||
added empty sound-generator plugin
|
||||
|
||||
2005-09-28 Tobias Doerffel <tobydox@users.sourceforge.net>
|
||||
|
||||
* include/song_editor.h:
|
||||
|
||||
30
Makefile.am
30
Makefile.am
@@ -60,7 +60,6 @@ lmms_MOC = \
|
||||
./knob.moc \
|
||||
./lcd_spinbox.moc \
|
||||
./lmms_main_win.moc \
|
||||
./midi_out.moc \
|
||||
./mixer.moc \
|
||||
./name_label.moc \
|
||||
./nstate_button.moc \
|
||||
@@ -68,7 +67,6 @@ lmms_MOC = \
|
||||
./piano_roll.moc \
|
||||
./piano_widget.moc \
|
||||
./pixmap_button.moc \
|
||||
./plucked_string_synth.moc \
|
||||
./project_notes.moc \
|
||||
./rename_dialog.moc \
|
||||
./sample_buffer.moc \
|
||||
@@ -81,7 +79,7 @@ lmms_MOC = \
|
||||
./surround_area.moc \
|
||||
./tab_bar.moc \
|
||||
./tab_button.moc \
|
||||
./tab_widget.moc \
|
||||
./tab_widget.moc \
|
||||
./timeline.moc \
|
||||
./track_container.moc \
|
||||
./track.moc \
|
||||
@@ -91,8 +89,6 @@ lmms_MOC = \
|
||||
|
||||
BUILT_SOURCES = $(lmms_MOC)
|
||||
|
||||
#lmms_TRANSLATIONS = $(wildcard $(srcdir)/locale/*.qm $(srcdir)/locale/*.ts)
|
||||
|
||||
lmms_EMBEDDED_RESOURCES = $(wildcard $(srcdir)/resources/*png AUTHORS COPYING)
|
||||
|
||||
./embedded_resources.h: $(lmms_EMBEDDED_RESOURCES) bin2res
|
||||
@@ -127,7 +123,6 @@ lmms_SOURCES = \
|
||||
$(srcdir)/src/core/note_play_handle.cpp \
|
||||
$(srcdir)/src/core/piano_roll.cpp \
|
||||
$(srcdir)/src/core/piano_widget.cpp \
|
||||
$(srcdir)/src/core/plugin_management.cpp \
|
||||
$(srcdir)/src/core/preset_preview_play_handle.cpp \
|
||||
$(srcdir)/src/core/sample_play_handle.cpp \
|
||||
$(srcdir)/src/core/setup_dialog.cpp \
|
||||
@@ -148,10 +143,6 @@ lmms_SOURCES = \
|
||||
$(srcdir)/src/midi/midi_file.cpp \
|
||||
$(srcdir)/src/midi/midi_mapper.cpp \
|
||||
$(srcdir)/src/midi/midi_oss.cpp \
|
||||
$(srcdir)/src/soundgenerators/audio_file_processor.cpp \
|
||||
$(srcdir)/src/soundgenerators/midi_out.cpp \
|
||||
$(srcdir)/src/soundgenerators/plucked_string_synth.cpp \
|
||||
$(srcdir)/src/soundgenerators/triple_oscillator.cpp \
|
||||
$(srcdir)/src/tracks/bb_track.cpp \
|
||||
$(srcdir)/src/tracks/channel_track.cpp \
|
||||
$(srcdir)/src/tracks/pattern.cpp \
|
||||
@@ -261,12 +252,11 @@ lmms_SOURCES = \
|
||||
$(srcdir)/include/tooltip.h \
|
||||
$(srcdir)/include/led_checkbox.h \
|
||||
$(srcdir)/include/text_float.h \
|
||||
$(srcdir)/include/setup_dialog.h
|
||||
$(srcdir)/include/setup_dialog.h \
|
||||
$(srcdir)/include/empty_sg_plugin.h
|
||||
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(lmms_EMBEDDED_RESOURCES) \
|
||||
$(srcdir)/include/sgs
|
||||
EXTRA_DIST = $(lmms_EMBEDDED_RESOURCES)
|
||||
|
||||
|
||||
CLEANFILES = $(lmms_MOC) ./embedded_resources.h
|
||||
@@ -299,7 +289,17 @@ if HAVE_LIBSF
|
||||
LIB_SF_LDADD = -lsndfile
|
||||
endif
|
||||
|
||||
lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD)
|
||||
lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) -laudiofileprocessor -ldl
|
||||
lmms_LDFLAGS = -rdynamic -rpath $(pkglibdir)
|
||||
|
||||
SUBDIRS = artwork locale midi-maps presets projects samples
|
||||
|
||||
|
||||
|
||||
pkglib_LTLIBRARIES= libaudiofileprocessor.la libmidiout.la libpluckedstringsynth.la libtripleoscillator.la
|
||||
|
||||
|
||||
libaudiofileprocessor_la_SOURCES = src/soundgenerators/audio_file_processor.cpp
|
||||
libmidiout_la_SOURCES = src/soundgenerators/midi_out.cpp
|
||||
libpluckedstringsynth_la_SOURCES = src/soundgenerators/plucked_string_synth.cpp
|
||||
libtripleoscillator_la_SOURCES = src/soundgenerators/triple_oscillator.cpp
|
||||
|
||||
1
TODO
1
TODO
@@ -1,3 +1,4 @@
|
||||
- proper dlclos()ing of sg-plugins
|
||||
- use own scrollview for capturing wheel-events
|
||||
- add note-len- and note-alignment-selectbox to piano-roll
|
||||
- only redraw region given by paint-event in pattern, bbTCO, sampleTCO etc.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.1.1-cvs20050928, tobydox@users.sourceforge.net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20050928)
|
||||
AC_INIT(lmms, 0.1.1-cvs20050929, tobydox@users.sourceforge.net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20050929)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
@@ -11,6 +11,8 @@ AM_CONFIG_HEADER(config.h)
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
|
||||
AC_PATH_XTRA
|
||||
@@ -20,7 +22,7 @@ gw_CHECK_QT
|
||||
# checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS([fcntl.h memory.h string.h sys/ioctl.h unistd.h stdlib.h])
|
||||
AC_CHECK_HEADERS([fcntl.h memory.h string.h sys/ioctl.h unistd.h stdlib.h dlfcn.h])
|
||||
|
||||
# checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
@@ -33,7 +35,6 @@ AC_C_BIGENDIAN
|
||||
|
||||
# checks for library functions.
|
||||
AC_FUNC_ALLOCA
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MEMCMP
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
@@ -52,8 +52,8 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
void keyPressEvent( QKeyEvent * _ke );
|
||||
void resizeEvent( QResizeEvent * _re );
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void resizeEvent( QResizeEvent * _re );
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -44,6 +44,8 @@ typedef void ( oscillator:: * oscFuncPtr )
|
||||
( sampleFrame * _ab, Uint32 _frames, Uint8 _chnl );
|
||||
|
||||
|
||||
const sampleFrame ZERO_FRAME = { 0.0f, 0.0f } ;
|
||||
|
||||
|
||||
class oscillator
|
||||
{
|
||||
@@ -74,8 +76,16 @@ public:
|
||||
}
|
||||
inline void setUserWave( const sampleFrame * _data, Uint32 _frames )
|
||||
{
|
||||
m_userWaveData = _data;
|
||||
m_userWaveFrames = _frames;
|
||||
if( m_userWaveFrames > 0 )
|
||||
{
|
||||
m_userWaveData = _data;
|
||||
m_userWaveFrames = _frames;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_userWaveData = &ZERO_FRAME;
|
||||
m_userWaveFrames = 1;
|
||||
}
|
||||
}
|
||||
inline void update( sampleFrame * _ab, Uint32 _frames, Uint8 _chnl )
|
||||
{
|
||||
@@ -90,7 +100,7 @@ public:
|
||||
recalcOscCoeff( phase( v ) );
|
||||
}
|
||||
|
||||
static oscillator * FASTCALL createNewOsc( waveShapes _wave_shape,
|
||||
static oscillator * FASTCALL createOsc( waveShapes _wave_shape,
|
||||
modulationAlgos _modulation_algo, float _freq,
|
||||
Sint16 _phase_offset, float _volume_factor,
|
||||
oscillator * _m_subOsc = NULL );
|
||||
@@ -102,6 +112,7 @@ public:
|
||||
// check whether v2 is in next period
|
||||
return( floorf( v2 ) > floorf( v1 ) );
|
||||
}
|
||||
|
||||
static inline float phase( float _sample )
|
||||
{
|
||||
#ifndef modff
|
||||
@@ -112,6 +123,7 @@ public:
|
||||
return( modff( _sample, &t ) );
|
||||
//return( _sample - floorf( _sample ) );
|
||||
}
|
||||
|
||||
// now follow the wave-shape-routines...
|
||||
static inline sampleType sinSample( float _sample )
|
||||
{
|
||||
|
||||
@@ -97,6 +97,7 @@ make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/lmms
|
||||
%{_libdir}/lmms/
|
||||
|
||||
|
||||
%files data
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
@@ -88,8 +90,6 @@
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#include "triple_oscillator.h"
|
||||
|
||||
|
||||
extern QString file_to_load;
|
||||
extern QString file_to_render;
|
||||
@@ -1295,7 +1295,7 @@ void songEditor::addChannelTrack( void )
|
||||
#ifdef LMMS_DEBUG
|
||||
assert( t != NULL );
|
||||
#endif
|
||||
t->loadPluginSettings( tripleOscillator::defaultSettings() );
|
||||
t->loadPlugin( "tripleoscillator" );
|
||||
t->toggledChannelButton( TRUE );
|
||||
t->show();
|
||||
}
|
||||
@@ -1427,12 +1427,12 @@ void songEditor::createNewProject( void )
|
||||
|
||||
track * t;
|
||||
t = track::createTrack( track::CHANNEL_TRACK, this );
|
||||
dynamic_cast< channelTrack * >( t )->loadPluginSettings(
|
||||
tripleOscillator::defaultSettings() );
|
||||
dynamic_cast< channelTrack * >( t )->loadPlugin(
|
||||
"tripleoscillator" );
|
||||
track::createTrack( track::SAMPLE_TRACK, this );
|
||||
t = track::createTrack( track::CHANNEL_TRACK, bbEditor::inst() );
|
||||
dynamic_cast< channelTrack * >( t )->loadPluginSettings(
|
||||
tripleOscillator::defaultSettings() );
|
||||
dynamic_cast< channelTrack * >( t )->loadPlugin(
|
||||
"tripleoscillator" );
|
||||
track::createTrack( track::BB_TRACK, this );
|
||||
|
||||
setBPM( DEFAULT_BPM );
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include "oscillator.h"
|
||||
|
||||
|
||||
const sampleFrame zero_frame = { 0.0f, 0.0f };
|
||||
|
||||
|
||||
oscillator::oscillator( modulationAlgos _modulation_algo, float _freq,
|
||||
Sint16 _phase_offset, float _volume_factor,
|
||||
@@ -35,7 +33,7 @@ oscillator::oscillator( modulationAlgos _modulation_algo, float _freq,
|
||||
m_volumeFactor(_volume_factor),
|
||||
m_phaseOffset(_phase_offset),
|
||||
m_subOsc(_sub_osc),
|
||||
m_userWaveData( &zero_frame ),
|
||||
m_userWaveData( &ZERO_FRAME ),
|
||||
m_userWaveFrames( 1 )
|
||||
{
|
||||
|
||||
@@ -189,7 +187,7 @@ generateOscillatorCodeFor( userWaveOsc, userWaveSample );
|
||||
|
||||
|
||||
|
||||
oscillator * FASTCALL oscillator::createNewOsc( waveShapes _wave_shape,
|
||||
oscillator * oscillator::createOsc( waveShapes _wave_shape,
|
||||
modulationAlgos _modulation_algo,
|
||||
float _freq, Sint16 _phase_offset,
|
||||
float _volume_factor,
|
||||
|
||||
@@ -76,7 +76,7 @@ tabWidget::~tabWidget()
|
||||
void tabWidget::addTab( QWidget * _w, const QString & _name, int _idx )
|
||||
{
|
||||
widgetDesc d = { _w, _name, fontMetrics().width( _name ) + 10 } ;
|
||||
if( _idx < 0 || m_widgets.contains( _idx ) == TRUE )
|
||||
if( _idx < 0/* || m_widgets.contains( _idx ) == TRUE*/ )
|
||||
{
|
||||
while( m_widgets.contains( ++_idx ) == TRUE )
|
||||
{
|
||||
@@ -85,6 +85,7 @@ void tabWidget::addTab( QWidget * _w, const QString & _name, int _idx )
|
||||
m_widgets[_idx] = d;
|
||||
_w->setFixedSize( width() - 4, height() - 14 );
|
||||
_w->move( 2, 12 );
|
||||
_w->show();
|
||||
|
||||
if( m_widgets.contains( m_activeTab ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user