do not inline code for fetching value from controller and thus reduce header dependencies

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1802 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-10-25 15:16:09 +00:00
parent f070492fd6
commit 6fc2eba70b
19 changed files with 58 additions and 10 deletions

View File

@@ -1,5 +1,26 @@
2008-10-25 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/automatable_model.h:
* src/core/automatable_model.cpp:
* src/core/audio/audio_alsa.cpp:
* src/core/audio/audio_oss.cpp:
* src/core/audio/audio_jack.cpp:
* src/core/envelope_and_lfo_parameters.cpp:
* src/core/piano.cpp:
* src/core/controller.cpp:
* src/gui/fx_mixer_view.cpp:
* src/gui/widgets/combobox.cpp:
* src/gui/widgets/envelope_and_lfo_view.cpp:
* src/gui/widgets/knob.cpp:
* src/gui/widgets/instrument_midi_io_view.cpp:
* src/gui/widgets/automatable_slider.cpp:
* src/gui/widgets/lcd_spinbox.cpp:
* src/gui/widgets/fader.cpp:
* src/gui/widgets/automatable_button.cpp:
* src/tracks/automation_track.cpp:
do not inline code for fetching value from controller and thus reduce
header dependencies
* plugins/vst_effect/CMakeLists.txt:
* plugins/vestige/CMakeLists.txt:
* plugins/vst_base/CMakeLists.txt:

View File

@@ -30,7 +30,6 @@
#include "journalling_object.h"
#include "mv_base.h"
#include "controller_connection.h"
// simple way to map a property of a view to a model
@@ -60,6 +59,9 @@
class controllerConnection;
class EXPORT automatableModel : public model, public journallingObject
{
Q_OBJECT
@@ -119,20 +121,14 @@ public:
{
if( unlikely( m_controllerConnection != NULL ) )
{
const T v = minValue<T>() +
castValue<T>( m_range *
m_controllerConnection->currentValue(
_frameOffset ) );
if( typeInfo<float>::isEqual( m_step, 1 ) )
{
return castValue<T>( roundf( (float) v ) );
}
return v;
return castValue<T>( controllerValue( _frameOffset ) );
}
return castValue<T>( m_value );
}
float controllerValue( int _frameOffset ) const;
template<class T>
inline T initValue( void ) const

View File

@@ -35,6 +35,7 @@
#include "endian_handling.h"
#include "config_mgr.h"
#include "engine.h"
#include "lcd_spinbox.h"
#include "gui_templates.h"
#include "templates.h"

View File

@@ -39,6 +39,7 @@
#include "debug.h"
#include "engine.h"
#include "templates.h"
#include "gui_templates.h"
#include "config_mgr.h"

View File

@@ -36,6 +36,7 @@
#include "endian_handling.h"
#include "lcd_spinbox.h"
#include "engine.h"
#include "gui_templates.h"
#include "templates.h"

View File

@@ -417,6 +417,20 @@ void automatableModel::setControllerConnection( controllerConnection * _c )
float automatableModel::controllerValue( int _frameOffset ) const
{
const float v = m_minValue +
( m_range * m_controllerConnection->currentValue(
_frameOffset ) );
if( typeInfo<float>::isEqual( m_step, 1 ) )
{
return qRound( v );
}
return v;
}
void automatableModel::unlinkControllerConnection( void )
{

View File

@@ -34,6 +34,7 @@
#include "engine.h"
#include "mixer.h"
#include "controller.h"
#include "controller_connection.h"
#include "controller_dialog.h"
#include "lfo_controller.h"
#include "midi_controller.h"

View File

@@ -32,6 +32,7 @@
#include "debug.h"
#include "engine.h"
#include "mixer.h"
#include "mmp.h"
#include "oscillator.h"

View File

@@ -50,6 +50,7 @@
#include "automation_pattern.h"
#include "caption_menu.h"
#include "embed.h"
#include "engine.h"
#include "gui_templates.h"
#include "instrument_track.h"
#include "knob.h"

View File

@@ -36,6 +36,7 @@
#include "fx_mixer_view.h"
#include "fader.h"
#include "effect_rack_view.h"
#include "engine.h"
#include "embed.h"
#include "main_window.h"
#include "lcd_spinbox.h"

View File

@@ -32,6 +32,7 @@
#include <QtGui/QMouseEvent>
#include "caption_menu.h"
#include "engine.h"
#include "embed.h"
#include "main_window.h"

View File

@@ -33,6 +33,7 @@
#include "caption_menu.h"
#include "embed.h"
#include "engine.h"
#include "main_window.h"

View File

@@ -37,6 +37,7 @@
#include "automation_pattern.h"
#include "caption_menu.h"
#include "engine.h"
#include "embed.h"
#include "gui_templates.h"
#include "main_window.h"

View File

@@ -39,6 +39,7 @@
#include "gui_templates.h"
#include "knob.h"
#include "led_checkbox.h"
#include "mixer.h"
#include "mmp.h"
#include "oscillator.h"
#include "pixmap_button.h"

View File

@@ -51,6 +51,7 @@
#include "fader.h"
#include "embed.h"
#include "engine.h"
#include "caption_menu.h"
#include "main_window.h"

View File

@@ -29,11 +29,13 @@
#include "instrument_midi_io_view.h"
#include "midi_port_menu.h"
#include "engine.h"
#include "embed.h"
#include "group_box.h"
#include "gui_templates.h"
#include "lcd_spinbox.h"
#include "midi_client.h"
#include "mixer.h"
#include "tooltip.h"

View File

@@ -43,6 +43,7 @@
#include "caption_menu.h"
#include "config_mgr.h"
#include "controller_connection.h"
#include "embed.h"
#include "engine.h"
#include "gui_templates.h"

View File

@@ -36,6 +36,7 @@
#include "lcd_spinbox.h"
#include "caption_menu.h"
#include "engine.h"
#include "embed.h"
#include "gui_templates.h"
#include "templates.h"

View File

@@ -29,6 +29,7 @@
#include "automation_track.h"
#include "automation_pattern.h"
#include "engine.h"
#include "embed.h"
#include "project_journal.h"
#include "string_pair_drag.h"