static engine, chunked audio buffer, pat fix, MIME type

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@472 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Javier Serrano Polo
2007-04-19 06:52:29 +00:00
parent e121fe84cd
commit 16a61bf8fe
198 changed files with 2709 additions and 2137 deletions

254
ChangeLog
View File

@@ -1,3 +1,257 @@
2007-04-19 Javier Serrano Polo <jasp00/at/terra/dot/es>
* include/audio_port.h:
* include/automatable_button.h:
* include/automatable_object.h:
* include/automatable_slider.h:
* include/automation_editor.h:
* include/automation_pattern.h:
* include/bb_editor.h:
* include/bb_track.h:
* include/combobox.h:
* include/cpuload_widget.h:
* include/dummy_plugin.h:
* include/effect.h:
* include/effect_chain.h:
* include/effect_label.h:
* include/effect_select_dialog.h:
* include/engine.h:
* include/envelope_and_lfo_widget.h:
* include/export_project_dialog.h:
* include/file_browser.h:
* include/group_box.h:
* include/import_filter.h:
* include/instrument.h:
* include/journalling_object.h:
* include/knob.h:
* include/lcd_spinbox.h:
* include/led_checkbox.h:
* include/main_window.h:
* include/midi_alsa_raw.h:
* include/midi_alsa_seq.h:
* include/midi_client.h:
* include/midi_dummy.h:
* include/midi_oss.h:
* include/mixer.h:
* include/name_label.h:
* include/note.h:
* include/pattern.h:
* include/piano_roll.h:
* include/pixmap_button.h:
* include/plugin.h:
* include/plugin_browser.h:
* include/preset_preview_play_handle.h:
* include/project_journal.h:
* include/project_notes.h:
* include/rack_view.h:
* include/sample_buffer.h:
* include/sample_play_handle.h:
* include/setup_dialog.h:
* include/song_editor.h:
* include/string_pair_drag.h:
* include/surround_area.h:
* include/tempo_sync_knob.h:
* include/timeline.h:
* include/track_container.h:
* include/visualization_widget.h:
* include/volume_knob.h:
* plugins/audio_file_processor/audio_file_processor.cpp:
* plugins/bass_booster/bass_booster.cpp:
* plugins/bass_booster/bass_booster.h:
* plugins/bass_booster/bassbooster_control_dialog.cpp
* plugins/bit_invader/bit_invader.cpp:
* plugins/bit_invader/graph.cpp:
* plugins/bit_invader/graph.h:
* plugins/flp_import/flp_import.cpp:
* plugins/kicker/kicker.cpp:
* plugins/ladspa_base/ladspa_2_lmms.cpp:
* plugins/ladspa_base/ladspa_2_lmms.h:
* plugins/ladspa_base/ladspa_base.h:
* plugins/ladspa_base/ladspa_control.cpp:
* plugins/ladspa_base/ladspa_control.h:
* plugins/ladspa_base/ladspa_manager.cpp:
* plugins/ladspa_base/ladspa_manager.h:
* plugins/ladspa_base/ladspa_port_dialog.cpp:
* plugins/ladspa_base/ladspa_port_dialog.h:
* plugins/ladspa_effect/ladspa_control_dialog.cpp:
* plugins/ladspa_effect/ladspa_effect.cpp:
* plugins/ladspa_effect/ladspa_effect.h:
* plugins/ladspa_effect/ladspa_subplugin_features.cpp:
* plugins/ladspa_effect/ladspa_subplugin_features.h:
* plugins/lb302/lb302.cpp:
* plugins/live_tool/live_tool.cpp:
* plugins/midi_import/midi_import.cpp:
* plugins/organic/organic.cpp:
* plugins/patman/patman.cpp:
* plugins/plucked_string_synth/plucked_string_synth.cpp:
* plugins/polyb302/polyb302.cpp:
* plugins/polyb302/polyb302.h:
* plugins/singerbot/singerbot.cpp:
* plugins/stk/mallets/mallets.cpp:
* plugins/triple_oscillator/triple_oscillator.cpp:
* plugins/vestige/vestige.cpp:
* plugins/vibed/graph.cpp:
* plugins/vibed/graph.h:
* plugins/vibed/impulse_editor.cpp:
* plugins/vibed/impulse_editor.h:
* plugins/vibed/nine_button_selector.cpp:
* plugins/vibed/nine_button_selector.h:
* plugins/vibed/vibed.cpp:
* plugins/vst_base/lvsl_client.cpp:
* plugins/vst_base/lvsl_client.h:
* plugins/vst_effect/vst_effect.cpp:
* plugins/vst_effect/vst_effect.h:
* plugins/vst_effect/vst_subplugin_features.cpp:
* plugins/vst_effect/vst_subplugin_features.h:
* src/audio/audio_alsa.cpp:
* src/audio/audio_jack.cpp:
* src/audio/audio_oss.cpp:
* src/audio/audio_port.cpp:
* src/audio/audio_sample_recorder.cpp:
* src/core/arp_and_chords_tab_widget.cpp:
* src/core/automation_editor.cpp:
* src/core/bb_editor.cpp:
* src/core/effect.cpp:
* src/core/effect_chain.cpp:
* src/core/effect_control_dialog.cpp:
* src/core/effect_select_dialog.cpp:
* src/core/effect_tab_widget.cpp:
* src/core/engine.cpp:
* src/core/envelope_and_lfo_widget.cpp:
* src/core/envelope_tab_widget.cpp:
* src/core/export_project_dialog.cpp:
* src/core/file_browser.cpp:
* src/core/import_filter.cpp:
* src/core/instrument.cpp:
* src/core/main.cpp:
* src/core/main_window.cpp:
* src/core/meter_dialog.cpp:
* src/core/midi_tab_widget.cpp:
* src/core/mixer.cpp:
* src/core/name_label.cpp:
* src/core/note.cpp:
* src/core/note_play_handle.cpp:
* src/core/piano_roll.cpp:
* src/core/piano_widget.cpp:
* src/core/plugin.cpp:
* src/core/plugin_browser.cpp:
* src/core/preset_preview_play_handle.cpp:
* src/core/sample_play_handle.cpp:
* src/core/setup_dialog.cpp:
* src/core/song_editor.cpp:
* src/core/surround_area.cpp:
* src/core/timeline.cpp:
* src/core/tool.cpp:
* src/core/track.cpp:
* src/core/track_container.cpp:
* src/lib/journalling_object.cpp:
* src/lib/project_journal.cpp:
* src/lib/sample_buffer.cpp:
* src/lib/string_pair_drag.cpp:
* src/midi/midi_alsa_raw.cpp:
* src/midi/midi_alsa_seq.cpp:
* src/midi/midi_client.cpp:
* src/midi/midi_oss.cpp:
* src/tracks/automation_pattern.cpp:
* src/tracks/bb_track.cpp:
* src/tracks/instrument_track.cpp:
* src/tracks/pattern.cpp:
* src/tracks/sample_track.cpp:
* src/widgets/automatable_button.cpp:
* src/widgets/automatable_slider.cpp:
* src/widgets/combobox.cpp:
* src/widgets/cpuload_widget.cpp:
* src/widgets/effect_label.cpp:
* src/widgets/group_box.cpp:
* src/widgets/knob.cpp:
* src/widgets/lcd_spinbox.cpp:
* src/widgets/led_checkbox.cpp:
* src/widgets/pixmap_button.cpp:
* src/widgets/project_notes.cpp:
* src/widgets/rack_plugin.cpp:
* src/widgets/rack_view.cpp:
* src/widgets/tempo_sync_knob.cpp:
* src/widgets/visualization_widget.cpp:
* src/widgets/volume_knob.cpp:
return of the singletons
* include/fifo_buffer.h:
initial release, allows chunked audio buffer
* include/audio_alsa.h:
* include/audio_device.h:
* include/audio_dummy.h:
* include/audio_jack.h:
* include/audio_oss.h:
* include/audio_sdl.h:
* include/mixer.h:
* src/audio/audio_alsa.cpp:
* src/audio/audio_device.cpp:
* src/audio/audio_jack.cpp:
* src/audio/audio_oss.cpp:
* src/audio/audio_sdl.cpp:
* src/core/mixer.cpp:
* src/core/setup_dialog.cpp:
use chunked audio buffer
* src/core/mixer.cpp:
don't delete the audio device when changing quality, fixes JACK without
external server
* include/sample_buffer.h:
* plugins/audio_file_processor/audio_file_processor.cpp:
* plugins/patman/patman.cpp:
* src/lib/sample_buffer.cpp:
handle different sample rates, fixes many looping patch samples
* src/core/sample_play_handle.cpp:
fixed high quality
* plugins/patman/patman.cpp:
automated Loop and Tune modes
* plugins/audio_file_processor/audio_file_processor.cpp:
automated Loop mode
* src/core/automation_editor.cpp:
fixed selections
* src/core/track_container.cpp:
use modularized sample extensions
* include/string_pair_drag.h:
* plugins/audio_file_processor/audio_file_processor.cpp:
* plugins/patman/patman.cpp:
* src/lib/string_pair_drag.cpp:
changed string pair MIME type
* src/lib/mmp.cpp:
renamed root element
* data/lmms.xml:
initial release, project MIME type
* data/Makefile.am:
install project MIME type
* data/lmms.desktop:
- added project MIME type
- added Catalan translation
* include/oscillator.h:
* src/lib/oscillator.cpp:
got switches out of for-loops
* include/arp_and_chords_tab_widget.h:
* include/effect_tab_widget.h:
* include/instrument_track.h:
* include/midi_tab_widget.h:
* include/track.h:
cleaned up dependencies
* data/locale/ca.ts:
updated translation
2007-04-07 Javier Serrano Polo <jasp00/at/terra/dot/es>
* plugins/patman/artwork.png:

View File

@@ -331,6 +331,7 @@ lmms_SOURCES = \
$(srcdir)/include/midi_alsa_seq.h \
$(srcdir)/include/micro_timer.h \
$(srcdir)/include/fade_button.h \
$(srcdir)/include/fifo_buffer.h \
$(srcdir)/include/combobox.h \
$(srcdir)/include/rubberband.h \
$(srcdir)/include/base64.h \

View File

@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(lmms, 0.2.1-svn20070407, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20070407)
AC_INIT(lmms, 0.2.1-svn20070419, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.2.1-svn20070419)
AM_CONFIG_HEADER(config.h)

View File

@@ -6,6 +6,8 @@ menu_DATA = lmms
applicationsdir = $(datadir)/applications
applications_DATA = lmms.desktop
EXTRA_DIST = $(menu_DATA) $(applications_DATA)
mimedir = $(datadir)/mime/packages
mime_DATA = lmms.xml
EXTRA_DIST = $(menu_DATA) $(applications_DATA) $(mime_DATA)

View File

@@ -1,8 +1,10 @@
[Desktop Entry]
Name=Linux MultiMedia Studio
GenericName=software for music-production
GenericName[ca]=Programari de producció musical
GenericName[de]=Software zur Musik-Produktion
Comment=easy music-production for everyone!
Comment[ca]=Producció fàcil de música per a tothom!
Icon=/usr/share/lmms/themes/default/icon.png
Exec=/usr/bin/lmms
Terminal=false
@@ -10,3 +12,4 @@ Type=Application
Encoding=UTF-8
X-Desktop-File-Install-Version=0.3
Categories=Application;AudioVideo;Qt
MimeType=application/x-lmms-project

14
data/lmms.xml Normal file
View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-lmms-project">
<sub-class-of type="application/xml"/>
<comment>LMMS project</comment>
<comment xml:lang="ca">Projecte LMMS</comment>
<glob pattern="*.mmp"/>
<glob pattern="*.mmpz"/>
<magic priority="80">
<match type="string" value="&lt;!DOCTYPE multimedia-project" offset="0:256"/>
<match type="string" value="&lt;multimedia-project" offset="0:64"/>
</magic>
</mime-type>
</mime-info>

Binary file not shown.

View File

@@ -691,6 +691,10 @@ http://lmms.sourceforge.net</translation>
<source>END</source>
<translation>FI</translation>
</message>
<message>
<source>Loop</source>
<translation>Bucle</translation>
</message>
</context>
<context>
<name>automatableButton</name>
@@ -2741,6 +2745,14 @@ Per favor, visita http://wiki.mindrules.net per a documentació sobre LMMS.</tra
<source>Patch-Files (*.pat)</source>
<translation>Fitxers Pedaç (*.pat)</translation>
</message>
<message>
<source>Loop</source>
<translation>Bucle</translation>
</message>
<message>
<source>Tune</source>
<translation>Afina</translation>
</message>
</context>
<context>
<name>pattern</name>
@@ -3510,7 +3522,7 @@ Si funciona amb altre programari VST sota Linux, per favor contacta amb un desen
</message>
<message>
<source>BUFFER SIZE</source>
<translation>TAMANY DE MEMÒRIA INTERMÈDIA</translation>
<translation>MIDA DE MEMÒRIA INTERMÈDIA</translation>
</message>
<message>
<source>Reset to default-value</source>
@@ -3620,7 +3632,7 @@ Latència: %2 ms</translation>
</message>
<message>
<source>Here you can setup the internal buffer-size used by LMMS. Smaller values result in a lower latency but also may cause unusable sound or bad performance, especially on older computers or systems with a non-realtime kernel.</source>
<translation>Aquí pots configurar la grandària de la memòria intermèdia interna usada per LMMS. Els valors més petits donen menor latència però també poden causar so inservible o baix rendiment, especialment a ordinadors antics o sistemes amb un nucli sense temps real.</translation>
<translation>Aquí pots configurar la mida de la memòria intermèdia interna usada per LMMS. Els valors més petits donen menor latència però també poden causar so inservible o baix rendiment, especialment a ordinadors antics o sistemes amb un nucli sense temps real.</translation>
</message>
<message>
<source>Choose LMMS working directory</source>
@@ -3670,7 +3682,7 @@ Latència: %2 ms</translation>
<source>If you have a machine with more then one processor (e.g. dual-core systems) you should use a parallelizing-level above 1 which means that LMMS will try to split up sound-processing into several threads which should should be run on several cores by the underlaying operating-system.
Please note that in some cases parallelizing won&apos;t work with small buffer-sizes. If you experience problems (i.e. lot of xruns), try to increase buffer-size.</source>
<translation>Si tens una màquina amb més d&apos;un processador (p.e. sistemes amb nucli dual) hauries d&apos;usar un nivell de paral·lelització més gran que 1, que vol dir que LMMS tractarà de dividir el processament de so en varis fils que haurien d&apos;executar-se en varis nuclis pel sistema operatiu subjacent.
Fixa&apos;t que en alguns casos la paral·lelització no funcionarà amb memòries intermèdies de grandària petita. Si experimentes problemes (p.e. molts xruns), prova d&apos;augmentar la grandària de la memòria intermèdia.</translation>
Fixa&apos;t que en alguns casos la paral·lelització no funcionarà amb memòries intermèdies de mida petita. Si experimentes problemes (p.e. molts xruns), prova d&apos;augmentar la mida de la memòria intermèdia.</translation>
</message>
<message>
<source>Choose LADSPA plugin directory</source>

View File

@@ -2,7 +2,7 @@
* arp_and_chords_tab_widget.h - declaration of class arpAndChordWidget which
* provides code for using arpeggio and chords
*
* 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
*
@@ -45,7 +45,6 @@
#include "journalling_object.h"
#include "types.h"
#include "engine.h"
class QPixmap;

View File

@@ -100,7 +100,6 @@ private:
snd_pcm_sw_params_t * m_swParams;
bool m_convertEndian;
volatile bool m_quit;
} ;

View File

@@ -97,15 +97,13 @@ public:
return( m_channels );
}
void processNextBuffer( void );
bool processNextBuffer( void );
virtual void startProcessing( void )
{
}
virtual void stopProcessing( void )
{
}
virtual void stopProcessing( void );
class setupWidget : public tabWidget

View File

@@ -35,8 +35,7 @@ class audioDummy : public audioDevice, public QThread
public:
audioDummy( const sample_rate_t _sample_rate, bool & _success_ful,
mixer * _mixer ) :
audioDevice( _sample_rate, DEFAULT_CHANNELS, _mixer ),
m_quit( FALSE )
audioDevice( _sample_rate, DEFAULT_CHANNELS, _mixer )
{
_success_ful = TRUE;
}
@@ -82,7 +81,6 @@ private:
{
if( isRunning() )
{
m_quit = TRUE;
wait( 1000 );
terminate();
}
@@ -91,10 +89,13 @@ private:
virtual void run( void )
{
microTimer timer;
while( m_quit == FALSE )
while( TRUE )
{
timer.reset();
processNextBuffer();
if ( !processNextBuffer() )
{
break;
}
const Sint32 microseconds = static_cast<Sint32>(
getMixer()->framesPerAudioBuffer() *
1000000.0f / getMixer()->sampleRate() -
@@ -106,9 +107,6 @@ private:
}
}
volatile bool m_quit;
} ;

View File

@@ -107,9 +107,11 @@ private:
jack_client_t * m_client;
bool m_active;
bool m_stopped;
QMutex m_processCallbackMutex;
// QMutex m_processCallbackMutex;
QSemaphore m_stop_semaphore;
vvector<jack_port_t *> m_outputPorts;
surroundSampleFrame * m_outBuf;

View File

@@ -83,7 +83,6 @@ private:
int m_audioFD;
bool m_convertEndian;
volatile bool m_quit;
} ;

View File

@@ -1,7 +1,7 @@
/*
* audio_port.h - base-class for objects providing sound at a port
*
* 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
*
@@ -43,10 +43,10 @@
#include "effect_chain.h"
class audioPort : public engineObject
class audioPort
{
public:
audioPort( const QString & _name, engine * _engine );
audioPort( const QString & _name );
~audioPort();
inline surroundSampleFrame * firstBuffer( void )

View File

@@ -92,6 +92,9 @@ private:
bool m_convertEndian;
bool m_stopped;
QSemaphore m_stop_semaphore;
} ;
#endif

View File

@@ -1,7 +1,7 @@
/*
* automatable_button.h - class automatableButton, the base for all buttons
*
* 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
*
@@ -51,7 +51,7 @@ class automatableButton : public QWidget, public automatableObject<bool,
Q_OBJECT
public:
automatableButton( QWidget * _parent, const QString & _name,
engine * _engine, track * _track );
track * _track );
virtual ~automatableButton();
@@ -109,7 +109,7 @@ class automatableButtonGroup : public QWidget, public automatableObject<int>
Q_OBJECT
public:
automatableButtonGroup( QWidget * _parent, const QString & _name,
engine * _engine, track * _track );
track * _track );
virtual ~automatableButtonGroup();
void addButton( automatableButton * _btn );

View File

@@ -1,7 +1,7 @@
/*
* automatable_object.h - declaration of class automatableObject
*
* 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
*
@@ -31,6 +31,7 @@
#include "qt3support.h"
#include "automation_editor.h"
#include "automation_pattern.h"
#include "engine.h"
#include "journalling_object.h"
#include "templates.h"
#include "midi_time.h"
@@ -57,11 +58,9 @@ class automatableObject : public journallingObject, public levelObject
public:
typedef automatableObject<T, EDIT_STEP_TYPE> autoObj;
automatableObject( engine * _engine, track * _track = NULL,
const T _val = 0, const T _min = 0,
const T _max = 0,
automatableObject( track * _track = NULL, const T _val = 0,
const T _min = 0, const T _max = 0,
const T _step = defaultRelStep() ) :
journallingObject( _engine ),
m_value( _val ),
m_minValue( _min ),
m_maxValue( _max ),
@@ -372,9 +371,9 @@ public:
return( m_track == NULL );
}
void initAutomationPattern( engine * _engine )
void initAutomationPattern( void )
{
m_automation_pattern = new automationPattern( _engine, this );
m_automation_pattern = new automationPattern( NULL, this );
}
@@ -432,11 +431,11 @@ protected:
{
m_automation_pattern->putValue( midiTime( 0 ),
m_curLevel, FALSE );
if( eng()->getAutomationEditor() &&
eng()->getAutomationEditor()->currentPattern()
if( engine::getAutomationEditor() &&
engine::getAutomationEditor()->currentPattern()
== m_automation_pattern )
{
eng()->getAutomationEditor()->update();
engine::getAutomationEditor()->update();
}
}
}

View File

@@ -1,7 +1,7 @@
/*
* automatable_slider.h - class automatableSlider, a QSlider with automation
*
* 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
*
@@ -48,7 +48,7 @@ class automatableSlider : public QSlider
Q_OBJECT
public:
automatableSlider( QWidget * _parent, const QString & _name,
engine * _engine, class track * _track );
class track * _track );
virtual ~automatableSlider();
virtual void setRange( int _min, int _max );

View File

@@ -2,7 +2,7 @@
* automation_editor.h - declaration of class automationEditor which is a window
* where you can edit dynamic values in an easy way
*
* 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
*
@@ -45,7 +45,6 @@
#include "types.h"
#include "note.h"
#include "engine.h"
#include "journalling_object.h"
#include "automation_pattern.h"
@@ -168,7 +167,7 @@ private:
static const int VALUES_WIDTH = 64;
automationEditor( engine * _engine );
automationEditor( void );
automationEditor( const automationEditor & );
virtual ~automationEditor();

View File

@@ -2,7 +2,7 @@
* automation_pattern.h - declaration of class automationPattern, which contains
* all information about an automation pattern
*
* 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
*
@@ -52,7 +52,6 @@ public:
#endif
automationPattern( track * _track, levelObject * _object );
automationPattern( engine * _engine, levelObject * _object );
automationPattern( const automationPattern & _pat_to_copy );
automationPattern( const automationPattern & _pat_to_copy,
levelObject * _object );

View File

@@ -1,7 +1,7 @@
/*
* bb_editor.h - declaration of class bbEditor, a basic-component of 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
*
@@ -89,7 +89,7 @@ protected:
private:
bbEditor( engine * _engine );
bbEditor( void );
//bbEditor( const bbEditor & );
virtual ~bbEditor();

View File

@@ -2,7 +2,7 @@
* bb_track.h - class bbTrack, a wrapper for using bbEditor
* (which is a singleton-class) as track
*
* 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
*
@@ -113,7 +113,7 @@ public:
virtual void FASTCALL loadTrackSpecificSettings( const QDomElement &
_this );
static bbTrack * FASTCALL findBBTrack( csize _bb_num, engine * _engine );
static bbTrack * FASTCALL findBBTrack( csize _bb_num );
static csize FASTCALL numOfBBTrack( track * _track );
static void FASTCALL swapBBTracks( track * _track1, track * _track2 );

View File

@@ -1,7 +1,7 @@
/*
* combobox.h - class comboBox, a very cool combo-box
*
* 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
*
@@ -56,8 +56,7 @@ class comboBox : public QWidget, public automatableObject<int>
{
Q_OBJECT
public:
comboBox( QWidget * _parent, const QString & _name, engine * _engine,
track * _track );
comboBox( QWidget * _parent, const QString & _name, track * _track );
virtual ~comboBox();
void addItem( const QString & _item, const QPixmap & _pixmap =

View File

@@ -2,7 +2,7 @@
* cpuload_widget.h - widget for displaying CPU-load (partly based on
* Hydrogen's CPU-load-widget)
*
* 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
*
@@ -44,14 +44,13 @@
#endif
#include "types.h"
#include "engine.h"
class cpuloadWidget : public QWidget, public engineObject
class cpuloadWidget : public QWidget
{
Q_OBJECT
public:
cpuloadWidget( QWidget * _parent, engine * _engine );
cpuloadWidget( QWidget * _parent );
virtual ~cpuloadWidget();

View File

@@ -2,7 +2,7 @@
* dummy_plugin.h - empty plugin which is used as fallback if a plugin couldn't
* be found
*
* 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
*
@@ -33,8 +33,8 @@
class dummyPlugin : public plugin
{
public:
inline dummyPlugin( engine * _engine = NULL ) :
plugin( NULL, _engine )
inline dummyPlugin( void ) :
plugin( NULL )
{
}

View File

@@ -1,8 +1,8 @@
/*
* effect.h - base class for effects
*
* Copyright (c) 2006 Danny McRae <khjklujn/at/users.sourceforge.net>
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2007 Danny McRae <khjklujn/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
*
@@ -57,14 +57,8 @@ class track;
class effect : public plugin
{
public:
struct constructionData
{
engine * eng;
descriptor::subPluginFeatures::key key;
} ;
effect( const plugin::descriptor * _desc, constructionData * _cdata );
effect( const plugin::descriptor * _desc,
const descriptor::subPluginFeatures::key * _key );
virtual ~effect();
virtual bool FASTCALL processAudioBuffer(
@@ -196,7 +190,7 @@ public:
virtual effectControlDialog * createControlDialog( track * _track ) = 0;
static effect * FASTCALL instantiate( const QString & _plugin_name,
constructionData & _cdata );
descriptor::subPluginFeatures::key * _key );
private:

View File

@@ -1,7 +1,7 @@
/*
* effect_chain.h - class for processing and effects chain
*
* 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
*
@@ -37,15 +37,14 @@
#include "qt3support.h"
#include "engine.h"
#include "effect.h"
typedef vvector<effect *> effect_list_t;
class effectChain: public engineObject
class effectChain
{
public:
effectChain( engine * _engine );
effectChain( void );
virtual ~effectChain();
void FASTCALL appendEffect( effect * _effect );

View File

@@ -2,7 +2,7 @@
* effect_label.h - a label which is renamable by double-clicking it and
* offers access to an effect rack
*
* 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
*
@@ -54,9 +54,8 @@ class effectLabel: public QWidget, public journallingObject
{
Q_OBJECT
public:
effectLabel( const QString & _initial_name,
QWidget * _parent, engine * _engine,
sampleTrack * _track );
effectLabel( const QString & _initial_name, QWidget * _parent,
sampleTrack * _track );
virtual ~effectLabel();
inline const QString & text( void )

View File

@@ -43,15 +43,14 @@
#endif
#include "engine.h"
#include "effect.h"
class effectSelectDialog : public QDialog, public engineObject
class effectSelectDialog : public QDialog
{
Q_OBJECT
public:
effectSelectDialog( QWidget * _parent, engine * _engine );
effectSelectDialog( QWidget * _parent );
virtual ~effectSelectDialog();
effect * instantiateSelectedPlugin( void );
@@ -68,11 +67,11 @@ private:
class effectList : public QWidget, public engineObject
class effectList : public QWidget
{
Q_OBJECT
public:
effectList( QWidget * _parent, engine * _engine );
effectList( QWidget * _parent );
virtual ~effectList();

View File

@@ -2,7 +2,7 @@
* effect_tab_widget.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
*
@@ -50,7 +50,6 @@
#endif
#include "journalling_object.h"
#include "engine.h"
#include "rack_plugin.h"
#include "rack_view.h"
#include "audio_port.h"

View File

@@ -55,142 +55,97 @@ class ladspa2LMMS;
class engine
{
public:
engine( const bool _has_gui = true );
engine( const engine & _engine );
~engine();
static void init( const bool _has_gui = true );
static void destroy( void );
engine * duplicate( const engine * _engine )
static bool hasGUI( void )
{
return( new engine( *_engine ) );
return( s_hasGUI );
}
inline bool hasGUI( void ) const
static mixer * getMixer( void )
{
return( m_hasGUI );
return( s_mixer );
}
inline mixer * getMixer( void )
static mainWindow * getMainWindow( void )
{
return( m_mixer );
return( s_mainWindow );
}
inline const mixer * getMixer( void ) const
static songEditor * getSongEditor( void )
{
return( m_mixer );
return( s_songEditor );
}
inline mainWindow * getMainWindow( void )
static bbEditor * getBBEditor( void )
{
return( m_mainWindow );
return( s_bbEditor );
}
inline songEditor * getSongEditor( void )
static pianoRoll * getPianoRoll( void )
{
return( m_songEditor );
return( s_pianoRoll );
}
inline const songEditor * getSongEditor( void ) const
static projectNotes * getProjectNotes( void )
{
return( m_songEditor );
return( s_projectNotes );
}
inline bbEditor * getBBEditor( void )
static projectJournal * getProjectJournal( void )
{
return( m_bbEditor );
return( s_projectJournal );
}
inline pianoRoll * getPianoRoll( void )
static automationEditor * getAutomationEditor( void )
{
return( m_pianoRoll );
}
inline projectNotes * getProjectNotes( void )
{
return( m_projectNotes );
}
inline projectJournal * getProjectJournal( void )
{
return( m_projectJournal );
}
inline automationEditor * getAutomationEditor( void )
{
return( m_automationEditor );
return( s_automationEditor );
}
#ifdef LADSPA_SUPPORT
inline ladspa2LMMS * getLADSPAManager( void )
static ladspa2LMMS * getLADSPAManager( void )
{
return( m_ladspaManager );
return( s_ladspaManager );
}
#endif
void close( void );
float framesPerTact64th( void ) const
static float framesPerTact64th( void )
{
return( m_frames_per_tact64th );
return( s_frames_per_tact64th );
}
void updateFramesPerTact64th( void );
static void updateFramesPerTact64th( void );
const QMap<QString, QString> & sampleExtensions( void )
static const QMap<QString, QString> & sampleExtensions( void )
{
return( m_sample_extensions );
return( s_sample_extensions );
}
private:
bool m_hasGUI;
float m_frames_per_tact64th;
static bool s_hasGUI;
static float s_frames_per_tact64th;
mixer * m_mixer;
mainWindow * m_mainWindow;
songEditor * m_songEditor;
automationEditor * m_automationEditor;
bbEditor * m_bbEditor;
pianoRoll * m_pianoRoll;
projectNotes * m_projectNotes;
projectJournal * m_projectJournal;
static mixer * s_mixer;
static mainWindow * s_mainWindow;
static songEditor * s_songEditor;
static automationEditor * s_automationEditor;
static bbEditor * s_bbEditor;
static pianoRoll * s_pianoRoll;
static projectNotes * s_projectNotes;
static projectJournal * s_projectJournal;
#ifdef LADSPA_SUPPORT
ladspa2LMMS * m_ladspaManager;
static ladspa2LMMS * s_ladspaManager;
#endif
QMap<QString, QString> m_sample_extensions;
static QMap<QString, QString> s_sample_extensions;
void load_extensions( void );
static void load_extensions( void );
} ;
class engineObject
{
public:
engineObject( engine * _engine );
~engineObject();
inline engine * eng( void )
{
return( m_engine );
}
inline const engine * eng( void ) const
{
return( m_engine );
}
inline bool hasGUI( void ) const
{
return( m_engine->hasGUI() );
}
private:
engine * m_engine;
} ;
#endif

View File

@@ -3,7 +3,7 @@
* is used by envelope/lfo/filter-tab of
* channel-window
*
* 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
*
@@ -37,13 +37,11 @@
#ifdef QT4
#include <QtGui/QWidget>
#include <QtCore/QMap>
#include <QtCore/QVector>
#else
#include <qwidget.h>
#include <qmap.h>
#include <qvaluevector.h>
#endif
@@ -76,7 +74,7 @@ class envelopeAndLFOWidget : public QWidget, public journallingObject,
Q_OBJECT
public:
envelopeAndLFOWidget( float _value_for_zero_amount, QWidget * _parent,
engine * _engine, track * _track );
track * _track );
virtual ~envelopeAndLFOWidget();
static inline float expKnobVal( float val )
@@ -84,8 +82,8 @@ public:
return( ( ( val < 0 ) ? -1 : 1 ) * val*val );
}
static void triggerLFO( engine * _engine );
static void resetLFO( engine * _engine );
static void triggerLFO( void );
static void resetLFO( void );
void FASTCALL fillLevel( float * _buf, f_cnt_t _frame,
const f_cnt_t _release_begin,
@@ -140,7 +138,7 @@ private:
static QPixmap * s_envGraph;
static QPixmap * s_lfoGraph;
static QMap<engine *, vvector<envelopeAndLFOWidget *> > s_EaLWidgets;
static vvector<envelopeAndLFOWidget *> s_EaLWidgets;
bool m_used;

View File

@@ -2,7 +2,7 @@
* export_project_dialog.h - declaration of class exportProjectDialog which is
* responsible for exporting project
*
* 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,7 +44,6 @@
#endif
#include "export.h"
#include "engine.h"
class QLabel;
@@ -56,12 +55,11 @@ class ledCheckBox;
class pixmapButton;
class exportProjectDialog : public QDialog, public engineObject
class exportProjectDialog : public QDialog
{
Q_OBJECT
public:
exportProjectDialog( const QString & _file_name, QWidget * _parent,
engine * _engine );
exportProjectDialog( const QString & _file_name, QWidget * _parent );
virtual ~exportProjectDialog();

97
include/fifo_buffer.h Normal file
View File

@@ -0,0 +1,97 @@
/*
* fifo_buffer.h - FIFO fixed-size buffer
*
* 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 _FIFO_BUFFER_H
#define _FIFO_BUFFER_H
#ifdef QT4
#include <QtCore/QSemaphore>
#else
#include <qsemaphore.h>
#endif
template<typename T>
class fifoBuffer
{
public:
fifoBuffer( int _size ) :
m_reader_sem( _size ),
m_writer_sem( _size ),
m_reader_index( 0 ),
m_writer_index( 0 ),
m_size( _size )
{
m_buffer = new T[_size];
m_reader_sem += _size;
}
~fifoBuffer()
{
delete[] m_buffer;
m_reader_sem -= m_size;
}
void write( T _element )
{
m_writer_sem++;
m_buffer[m_writer_index++] = _element;
m_writer_index %= m_size;
m_reader_sem--;
}
T read( void )
{
m_reader_sem++;
T element = m_buffer[m_reader_index++];
m_reader_index %= m_size;
m_writer_sem--;
return( element );
}
bool available( void )
{
return( m_reader_sem.available() );
}
private:
QSemaphore m_reader_sem;
QSemaphore m_writer_sem;
int m_reader_index;
int m_writer_index;
int m_size;
T * m_buffer;
} ;
#endif

View File

@@ -48,7 +48,6 @@
#include "side_bar_widget.h"
#include "engine.h"
class fileItem;
@@ -59,13 +58,13 @@ class trackContainer;
class fileBrowser : public sideBarWidget, public engineObject
class fileBrowser : public sideBarWidget
{
Q_OBJECT
public:
fileBrowser( const QString & _directories, const QString & _filter,
const QString & _title, const QPixmap & _pm,
QWidget * _parent, engine * _engine );
QWidget * _parent );
virtual ~fileBrowser();
static bool isDirWithContent( const QString & _path,
@@ -107,11 +106,11 @@ private:
class listView : public Q3ListView, public engineObject
class listView : public Q3ListView
{
Q_OBJECT
public:
listView( QWidget * _parent, engine * _engine );
listView( QWidget * _parent );
virtual ~listView();
@@ -133,15 +132,13 @@ private:
class directory : public Q3ListViewItem, public engineObject
class directory : public Q3ListViewItem
{
public:
directory( Q3ListView * _parent, const QString & _filename,
const QString & _path, const QString & _filter,
engine * _engine );
const QString & _path, const QString & _filter );
directory( directory * _parent, const QString & _filename,
const QString & _path, const QString & _filter,
engine * _engine );
const QString & _path, const QString & _filter );
void setOpen( bool );
void setup( void );
@@ -189,15 +186,13 @@ private:
class fileItem : public Q3ListViewItem, public engineObject
class fileItem : public Q3ListViewItem
{
public:
fileItem( Q3ListView * _parent, const QString & _name,
const QString & _path,
engine * _engine );
const QString & _path );
fileItem( Q3ListViewItem * _parent, const QString & _name,
const QString & _path,
engine * _engine );
const QString & _path );
inline QString fullName( void ) const
{

View File

@@ -1,7 +1,7 @@
/*
* group_box.h - LMMS-groupbox
*
* 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
*
@@ -44,12 +44,11 @@
class QPixmap;
class groupBox : public QWidget, public engineObject
class groupBox : public QWidget
{
Q_OBJECT
public:
groupBox( const QString & _caption, QWidget * _parent,
engine * _engine, track * _track );
groupBox( const QString & _caption, QWidget * _parent, track * _track );
virtual ~groupBox();
bool isActive( void ) const

View File

@@ -2,7 +2,7 @@
* import_filter.h - declaration of class importFilter, the base-class for all
* file import filters
*
* 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
*
@@ -55,7 +55,7 @@ class importFilter : public plugin
{
public:
importFilter( const QString & _file_name,
const descriptor * _descriptor, engine * _eng );
const descriptor * _descriptor );
virtual ~importFilter();

View File

@@ -2,7 +2,7 @@
* instrument.h - declaration of class instrument, which provides a
* standard interface for all instrument plugins
*
* 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
*
@@ -48,6 +48,7 @@
#endif
#include "engine.h"
#include "plugin.h"
#include "mixer.h"
@@ -140,7 +141,7 @@ protected:
inline void invalidate( void )
{
m_valid = FALSE;
eng()->getMixer()->checkValidityOfPlayHandles();
engine::getMixer()->checkValidityOfPlayHandles();
}

View File

@@ -2,7 +2,7 @@
* instrument_track.h - declaration of class instrumentTrack, a track + window
* which holds an instrument-plugin
*
* 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
*
@@ -50,7 +50,6 @@
#include "midi_event_processor.h"
#include "gui_templates.h"
#include "tab_widget.h"
#include "engine.h"
#include "volume_knob.h"
#include "instrument.h"

View File

@@ -1,7 +1,7 @@
/*
* journalling_object.h - declaration of class journallingObject
*
* 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
*
@@ -31,7 +31,6 @@
#endif
#include "types.h"
#include "engine.h"
#include "qt3support.h"
#ifndef QT3
@@ -110,10 +109,10 @@ typedef vvector<journalEntry> journalEntryVector;
class journallingObject : public engineObject
class journallingObject
{
public:
journallingObject( engine * _engine );
journallingObject( void );
virtual ~journallingObject();
inline const jo_id_t id( void ) const

View File

@@ -4,7 +4,7 @@
* This file is based on the knob-widget of the Qwt Widget Library by
* Josef Wilgen
*
* 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,7 +44,6 @@
#endif
#include "engine.h"
#include "automatable_object.h"
@@ -64,7 +63,7 @@ class knob : public QWidget, public automatableObject<float>
Q_OBJECT
public:
knob( int _knob_num, QWidget * _parent, const QString & _name,
engine * _engine, track * _track );
track * _track );
virtual ~knob();

View File

@@ -1,7 +1,7 @@
/*
* lcd_spinbox.h - class lcdSpinBox, an improved QLCDNumber
*
* 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
*
@@ -52,8 +52,7 @@ class lcdSpinBox : public QWidget, public automatableObject<int>
Q_OBJECT
public:
lcdSpinBox( int _min, int _max, int _num_digits, QWidget * _parent,
const QString & _name,
engine * _engine, track * _track );
const QString & _name, track * _track );
virtual ~lcdSpinBox();
virtual void setStep( const int _step );

View File

@@ -1,7 +1,7 @@
/*
* led_checkbox.h - class ledCheckBox, an improved QCheckBox
*
* 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
*
@@ -42,8 +42,8 @@ public:
} ;
ledCheckBox( const QString & _txt, QWidget * _parent,
const QString & _name, engine * _engine,
track * _track, ledColors _color = YELLOW );
const QString & _name, track * _track,
ledColors _color = YELLOW );
virtual ~ledCheckBox();

View File

@@ -49,7 +49,6 @@
#include "types.h"
#include "engine.h"
class QDomElement;
@@ -61,7 +60,7 @@ class tool;
class toolButton;
class mainWindow : public QMainWindow, public engineObject
class mainWindow : public QMainWindow
{
Q_OBJECT
public:
@@ -138,7 +137,7 @@ protected:
private:
mainWindow( engine * _engine );
mainWindow( void );
mainWindow( const mainWindow & );
virtual ~mainWindow();

View File

@@ -61,7 +61,7 @@ class QLineEdit;
class midiALSARaw : public midiClientRaw, public QThread
{
public:
midiALSARaw( engine * _engine );
midiALSARaw( void );
virtual ~midiALSARaw();
static QString probeDevice( void );

View File

@@ -71,7 +71,7 @@ class midiALSASeq :
{
Q_OBJECT
public:
midiALSASeq( engine * _engine );
midiALSASeq( void );
virtual ~midiALSASeq();
static QString probeDevice( void );

View File

@@ -44,17 +44,16 @@
#include "midi.h"
#include "midi_event_processor.h"
#include "tab_widget.h"
#include "engine.h"
class midiPort;
// base-class for all MIDI-clients
class midiClient : public engineObject
class midiClient
{
public:
midiClient( engine * _engine );
midiClient( void );
virtual ~midiClient();
// to be implemented by sub-classes
@@ -144,7 +143,7 @@ const Uint8 RAW_MIDI_PARSE_BUF_SIZE = 16;
class midiClientRaw : public midiClient
{
public:
midiClientRaw( engine * _engine );
midiClientRaw( void );
virtual ~midiClientRaw();
// we are raw-clients for sure!

View File

@@ -35,8 +35,7 @@
class midiDummy : public midiClientRaw
{
public:
midiDummy( engine * _engine ) :
midiClientRaw( _engine )
midiDummy( void )
{
}
virtual ~midiDummy()

View File

@@ -43,7 +43,7 @@ class QLineEdit;
class midiOSS : public midiClientRaw, public QThread
{
public:
midiOSS( engine * _engine );
midiOSS( void );
virtual ~midiOSS();
static QString probeDevice( void );

View File

@@ -2,7 +2,7 @@
* midi_tab_widget.h - tab-widget in channel-track-window for setting up
* MIDI-related stuff
*
* 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
*
@@ -44,7 +44,6 @@
#endif
#include "journalling_object.h"
#include "engine.h"
class QMenu;

View File

@@ -35,12 +35,14 @@
#ifdef QT4
#include <QtCore/QMutex>
#include <QtCore/QThread>
#include <QtCore/QVector>
#else
#include <qobject.h>
#include <qmutex.h>
#include <qthread.h>
#include <qvaluevector.h>
#endif
@@ -52,7 +54,7 @@
#include "note.h"
#include "play_handle.h"
#include "effect_board.h"
#include "engine.h"
#include "fifo_buffer.h"
class audioDevice;
@@ -106,7 +108,7 @@ const octaves BASE_OCTAVE = OCTAVE_4;
class mixer : public QObject, public engineObject
class mixer : public QObject
{
Q_OBJECT
public:
@@ -285,7 +287,10 @@ public:
bool criticalXRuns( void ) const;
const surroundSampleFrame * renderNextBuffer( void );
const surroundSampleFrame * nextBuffer( void )
{
return( m_fifo->read() );
}
public slots:
@@ -299,7 +304,27 @@ signals:
private:
mixer( engine * _engine );
typedef fifoBuffer<surroundSampleFrame *> fifo;
class fifoWriter : public QThread
{
public:
fifoWriter( mixer * _mixer, fifo * _fifo );
void finish( void );
private:
mixer * m_mixer;
fifo * m_fifo;
bool m_writing;
virtual void run( void );
} ;
mixer( void );
virtual ~mixer();
void startProcessing( void );
@@ -307,8 +332,7 @@ private:
// we don't allow to create mixer by using copy-ctor
mixer( const mixer & ) :
engineObject( NULL )
mixer( const mixer & )
{
}
@@ -322,6 +346,8 @@ private:
void FASTCALL scaleClip( fpab_t _frame, ch_cnt_t _chnl );
const surroundSampleFrame * renderNextBuffer( void );
vvector<audioPort *> m_audioPorts;
fpab_t m_framesPerAudioBuffer;
@@ -366,7 +392,12 @@ private:
Uint8 m_mixMutexLockLevel;
fifo * m_fifo;
fifoWriter * m_fifo_writer;
friend class engine;
friend class fifoWriter;
} ;

View File

@@ -2,7 +2,7 @@
* name_label.h - class nameLabel, a label which is renamable by
* double-clicking it
*
* 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,15 +41,12 @@
#endif
#include "engine.h"
class nameLabel : public QLabel, public engineObject
class nameLabel : public QLabel
{
Q_OBJECT
public:
nameLabel( const QString & _initial_name, QWidget * _parent,
engine * _engine );
nameLabel( const QString & _initial_name, QWidget * _parent );
virtual ~nameLabel();
const QPixmap & pixmap( void ) const

View File

@@ -2,7 +2,7 @@
* note.h - declaration of class note which contains all informations about a
* note + definitions of several constants and enums
*
* 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
*
@@ -95,13 +95,13 @@ class knob;
class note : public journallingObject
{
public:
note( engine * _engine = NULL,
const midiTime & _length = 0,
note( const midiTime & _length = 0,
const midiTime & _pos = 0,
tones _tone = A,
octaves _octave = DEFAULT_OCTAVE,
volume _volume = DEFAULT_VOLUME,
panning _panning = DEFAULT_PANNING ) FASTCALL;
panning _panning = DEFAULT_PANNING,
knob * _detuning = NULL ) FASTCALL;
note( const note & _note );
virtual ~note();
@@ -112,7 +112,6 @@ public:
void FASTCALL setKey( const int _key );
void FASTCALL setVolume( const volume _volume = DEFAULT_VOLUME );
void FASTCALL setPanning( const panning _panning = DEFAULT_PANNING );
void FASTCALL setDetuning( knob * _detuning );
void FASTCALL quantizeLength( const int _q_grid );
void FASTCALL quantizePos( const int _q_grid );
@@ -208,6 +207,7 @@ private:
knob * m_detuning;
void createDetuning( void );
void FASTCALL setDetuning( knob * _detuning );
} ;

View File

@@ -1,7 +1,7 @@
/*
* oscillator.h - header-file for oscillator.cpp, a powerful oscillator-class
*
* 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
*
@@ -183,10 +183,33 @@ private:
const ch_cnt_t _chnl );
inline bool syncOk( float _osc_coeff );
template<waveShapes W>
void updateNoSub( sampleFrame * _ab, const fpab_t _frames,
const ch_cnt_t _chnl );
template<waveShapes W>
void updatePM( sampleFrame * _ab, const fpab_t _frames,
const ch_cnt_t _chnl );
template<waveShapes W>
void updateAM( sampleFrame * _ab, const fpab_t _frames,
const ch_cnt_t _chnl );
template<waveShapes W>
void updateMix( sampleFrame * _ab, const fpab_t _frames,
const ch_cnt_t _chnl );
template<waveShapes W>
void updateSync( sampleFrame * _ab, const fpab_t _frames,
const ch_cnt_t _chnl );
template<waveShapes W>
void updateFM( sampleFrame * _ab, const fpab_t _frames,
const ch_cnt_t _chnl );
template<waveShapes W>
inline sample_t getSample( const float _sample );
inline void FASTCALL recalcPhase( void );
} ;
#endif

View File

@@ -273,7 +273,7 @@ signals:
class patternFreezeThread : public QThread, public engineObject
class patternFreezeThread : public QThread
{
public:
patternFreezeThread( pattern * _pattern );

View File

@@ -2,7 +2,7 @@
* piano_roll.h - declaration of class pianoRoll which is a window where you
* can set and edit notes in an easy way
*
* 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
*
@@ -45,7 +45,6 @@
#include "types.h"
#include "note.h"
#include "engine.h"
#include "journalling_object.h"
@@ -173,7 +172,7 @@ private:
} ;
pianoRoll( engine * _engine );
pianoRoll( void );
pianoRoll( const pianoRoll & );
virtual ~pianoRoll();

View File

@@ -1,7 +1,7 @@
/*
* pixmap_button.h - declaration of class pixmapButton
*
* 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
*
@@ -47,7 +47,7 @@ class pixmapButton : public automatableButton
Q_OBJECT
public:
pixmapButton( QWidget * _parent, const QString & _name,
engine * _engine, track * _track );
track * _track );
virtual ~pixmapButton();
void setActiveGraphic( const QPixmap & _pm );

View File

@@ -134,12 +134,11 @@ public:
{
}
virtual void fillDescriptionWidget(
QWidget *, engine *, const key & )
virtual void fillDescriptionWidget( QWidget *,
const key * )
{
}
virtual void listSubPluginKeys( engine *,
plugin::descriptor *,
virtual void listSubPluginKeys( plugin::descriptor *,
keyList & )
{
}
@@ -159,7 +158,7 @@ public:
} ;
// contructor of a plugin
plugin( const descriptor * _descriptor, engine * _engine );
plugin( const descriptor * _descriptor );
virtual ~plugin();
// returns public-name out of descriptor

View File

@@ -1,7 +1,7 @@
/*
* plugin_browser.h - include file for pluginBrowser
*
* 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
*
@@ -55,11 +55,11 @@
class trackContainer;
class pluginBrowser : public sideBarWidget, public engineObject
class pluginBrowser : public sideBarWidget
{
Q_OBJECT
public:
pluginBrowser( QWidget * _parent, engine * _engine );
pluginBrowser( QWidget * _parent );
virtual ~pluginBrowser();
@@ -73,12 +73,11 @@ private:
class pluginDescWidget : public QWidget, public engineObject
class pluginDescWidget : public QWidget
{
Q_OBJECT
public:
pluginDescWidget( const plugin::descriptor & _pd, QWidget * _parent,
engine * _engine );
pluginDescWidget( const plugin::descriptor & _pd, QWidget * _parent );
virtual ~pluginDescWidget();

View File

@@ -2,7 +2,7 @@
* preset_preview_play_handle.h - play-handle for playing a short preview-sound
* of a preset
*
* 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
*
@@ -29,19 +29,8 @@
#include "qt3support.h"
#ifdef QT4
#include <QtCore/QMap>
#else
#include <qmap.h>
#endif
#include "note_play_handle.h"
#include "engine.h"
class instrumentTrack;
@@ -49,27 +38,21 @@ class notePlayHandle;
class previewTrackContainer;
class presetPreviewPlayHandle : public playHandle, public engineObject
class presetPreviewPlayHandle : public playHandle
{
public:
presetPreviewPlayHandle( const QString & _preset_file,
engine * _engine );
presetPreviewPlayHandle( const QString & _preset_file );
virtual ~presetPreviewPlayHandle();
virtual void play( bool _try_parallelizing );
virtual bool done( void ) const;
static void cleanUp( engine * _engine );
static void cleanUp( void );
static constNotePlayHandleVector nphsOfInstrumentTrack(
const instrumentTrack * _ct );
private:
inline previewTrackContainer * previewTC( void )
{
return( s_previewTCs[eng()] );
}
static QMap<const engine *, previewTrackContainer *> s_previewTCs;
static previewTrackContainer * s_previewTC;
notePlayHandle * m_previewNote;

View File

@@ -1,7 +1,7 @@
/*
* project_journal.h - declaration of class projectJournal
*
* 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
*
@@ -27,7 +27,6 @@
#define _PROJECT_JOURNAL_H
#include "types.h"
#include "engine.h"
#include "qt3support.h"
#ifndef QT3
@@ -48,10 +47,10 @@
class journallingObject;
class projectJournal : public engineObject
class projectJournal
{
public:
projectJournal( engine * _engine );
projectJournal( void );
virtual ~projectJournal();
void undo( void );

View File

@@ -1,7 +1,7 @@
/*
* project_notes.h - header for project-notes-editor
*
* 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
*
@@ -40,7 +40,6 @@
#endif
#include "journalling_object.h"
#include "engine.h"
class QAction;
@@ -52,7 +51,7 @@ class projectNotes : public QMainWindow, public journallingObject
{
Q_OBJECT
public:
projectNotes( engine * _engine );
projectNotes( void );
virtual ~projectNotes();
void clear( void );

View File

@@ -1,7 +1,7 @@
/*
* right_frame.h - provides the display for the rackInsert instances
*
* Copyright (c) 2006 Danny McRae <khjklujn@netscape.net>
* Copyright (c) 2006-2007 Danny McRae <khjklujn@netscape.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -56,8 +56,7 @@ class rackView: public QWidget, public journallingObject
Q_OBJECT
public:
rackView( QWidget * _parent, engine * _engine,
track * _track, audioPort * _port );
rackView( QWidget * _parent, track * _track, audioPort * _port );
~rackView();
void addEffect( effect * _e );

View File

@@ -60,7 +60,7 @@
class QPainter;
class sampleBuffer : public QObject, public engineObject, public sharedObject
class sampleBuffer : public QObject, public sharedObject
{
Q_OBJECT
public:
@@ -92,11 +92,10 @@ public:
// constructor which either loads sample _audio_file or decodes
// base64-data out of string
sampleBuffer( engine * _engine, const QString & _audio_file = "",
sampleBuffer( const QString & _audio_file = "",
bool _is_base64_data = FALSE );
sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames,
engine * _engine );
sampleBuffer( const f_cnt_t _frames, engine * _engine );
sampleBuffer( const sampleFrame * _data, const f_cnt_t _frames );
sampleBuffer( const f_cnt_t _frames );
virtual ~sampleBuffer();
@@ -164,6 +163,11 @@ public:
m_frequency = _freq;
}
inline void setSampleRate( sample_rate_t _rate )
{
m_sample_rate = _rate;
}
inline const sampleFrame * data( void ) const
{
return( m_data );
@@ -177,8 +181,7 @@ public:
static sampleBuffer * FASTCALL resample( sampleFrame * _data,
const f_cnt_t _frames,
const sample_rate_t _src_sr,
const sample_rate_t _dst_sr,
engine * _engine );
const sample_rate_t _dst_sr );
static inline sampleBuffer * FASTCALL resample(
sampleBuffer * _buf,
@@ -186,7 +189,7 @@ public:
const sample_rate_t _dst_sr )
{
return( resample( _buf->m_data, _buf->m_frames, _src_sr,
_dst_sr, _buf->eng() ) );
_dst_sr ) );
}
void normalize_sample_rate( const sample_rate_t _src_sr,
@@ -270,6 +273,7 @@ private:
float m_amplification;
bool m_reversed;
float m_frequency;
sample_rate_t m_sample_rate;
QMutex m_dataMutex;
#ifdef HAVE_SAMPLERATE_H

View File

@@ -31,7 +31,6 @@
#include "play_handle.h"
#include "sample_buffer.h"
#include "types.h"
#include "engine.h"
class bbTrack;
class pattern;
@@ -40,11 +39,11 @@ class track;
class audioPort;
class samplePlayHandle : public QObject, public playHandle, public engineObject
class samplePlayHandle : public QObject, public playHandle
{
Q_OBJECT
public:
samplePlayHandle( const QString & _sample_file, engine * _engine );
samplePlayHandle( const QString & _sample_file );
samplePlayHandle( sampleBuffer * _sample_buffer );
samplePlayHandle( sampleTCO * _tco );
samplePlayHandle( pattern * _pattern );

View File

@@ -53,7 +53,7 @@ class QSlider;
class tabBar;
class setupDialog : public QDialog, public engineObject
class setupDialog : public QDialog
{
Q_OBJECT
public:
@@ -63,8 +63,7 @@ public:
AUDIO_SETTINGS, MIDI_SETTINGS
} ;
setupDialog( engine * _engine,
configTabs _tab_to_open = GENERAL_SETTINGS );
setupDialog( configTabs _tab_to_open = GENERAL_SETTINGS );
virtual ~setupDialog();

View File

@@ -2,7 +2,7 @@
* song_editor.h - declaration of class songEditor, a window where you can
* setup your songs
*
* 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
*
@@ -230,7 +230,7 @@ protected slots:
private:
songEditor( engine * _engine );
songEditor( void );
songEditor( const songEditor & );
virtual ~songEditor();

View File

@@ -2,7 +2,7 @@
* string_pair_drag.h - class stringPairDrag which provides general support
* for drag'n'drop of string-pairs
*
* 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
*
@@ -39,23 +39,19 @@
#endif
#include "engine.h"
class QPixmap;
class stringPairDrag : public
#ifdef QT4
QDrag,
QDrag
#else
QStoredDrag,
QStoredDrag
#endif
public engineObject
{
public:
stringPairDrag( const QString & _key, const QString & _value,
const QPixmap & _icon, QWidget * _w, engine * _engine );
const QPixmap & _icon, QWidget * _w );
~stringPairDrag();
static bool processDragEnterEvent( QDragEnterEvent * _dee,
@@ -63,6 +59,11 @@ public:
static QString decodeKey( QDropEvent * _de );
static QString decodeValue( QDropEvent * _de );
static const char * mimeType( void )
{
return( "application/x-lmms-stringpair" );
}
} ;

View File

@@ -3,7 +3,7 @@
* position of a channel + calculation of volume for each
* speaker
*
* Copyright (c) 2004-2005 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
*
@@ -57,7 +57,7 @@ class surroundArea : public QWidget
Q_OBJECT
public:
surroundArea( QWidget * _parent, const QString & _name,
engine * _engine, track * _track );
track * _track );
virtual ~surroundArea();
volumeVector getVolumeVector( float _v_scale = 0.0f ) const;
inline const QPoint & value( void ) const

View File

@@ -1,7 +1,7 @@
/*
* tempo_sync_knob.h - adds bpm to ms conversion for knob class
*
* Copyright (c) 2005 Danny McRae <khjklujn/at/yahoo.com>
* Copyright (c) 2005-2007 Danny McRae <khjklujn/at/yahoo.com>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -63,8 +63,7 @@ public:
tempoSyncKnob( int _knob_num, QWidget * _parent, const QString & _name,
engine * _engine, track * _track,
float _scale = 1.0f );
track * _track, float _scale = 1.0f );
virtual ~tempoSyncKnob();
virtual void FASTCALL saveSettings( QDomDocument & _doc,

View File

@@ -1,7 +1,7 @@
/*
* timeline.h - class timeLine, representing a time-line with position marker
*
* 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
*
@@ -68,7 +68,7 @@ public:
timeLine( int _xoff, int _yoff, float _ppt, songEditor::playPos & _pos,
const midiTime & _begin, QWidget * _parent, engine * _engine );
const midiTime & _begin, QWidget * _parent );
virtual ~timeLine();
inline songEditor::playPos & pos( void )

View File

@@ -2,7 +2,7 @@
* track.h - declaration of classes concerning tracks -> neccessary for all
* track-like objects (beat/bassline, sample-track...)
*
* 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
*
@@ -55,7 +55,6 @@
#include "types.h"
#include "midi_time.h"
#include "rubberband.h"
#include "engine.h"
#include "journalling_object.h"

View File

@@ -2,7 +2,7 @@
* track_container.h - base-class for all track-containers like Song-Editor,
* BB-Editor...
*
* 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
*
@@ -47,7 +47,6 @@
#include "track.h"
#include "journalling_object.h"
#include "rubberband.h"
#include "engine.h"
@@ -60,7 +59,7 @@ class trackContainer : public QMainWindow, public journallingObject
{
Q_OBJECT
public:
trackContainer( engine * _engine );
trackContainer( void );
virtual ~trackContainer();
inline QWidget * containerWidget( void )

View File

@@ -1,7 +1,7 @@
/*
* visualization_widget.h - widget for visualization of sound-data
*
* 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
*
@@ -47,7 +47,7 @@
class QTimer;
class visualizationWidget : public QWidget, public engineObject
class visualizationWidget : public QWidget
{
Q_OBJECT
public:
@@ -56,7 +56,6 @@ public:
SIMPLE // add more here
} ;
visualizationWidget( const QPixmap & _bg, QWidget * _parent,
engine * _engine,
visualizationTypes _vtype = SIMPLE );
virtual ~visualizationWidget();

View File

@@ -2,7 +2,7 @@
* volume_knob.h - defines a knob that display it's value as either a
* percentage or in dbV.
*
* 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
*
@@ -45,7 +45,7 @@ class volumeKnob: public knob
Q_OBJECT
public:
volumeKnob( int _knob_num, QWidget * _parent, const QString & _name,
engine * _engine, track * _track );
track * _track );
virtual ~volumeKnob();

View File

@@ -92,7 +92,6 @@ QPixmap * audioFileProcessor::s_artwork = NULL;
audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
instrument( _channel_track, &audiofileprocessor_plugin_descriptor ),
specialBgHandlingWidget( PLUGIN_NAME::getIconPixmap( "artwork" ) ),
m_sampleBuffer( eng(), "" ),
m_drawMethod( sampleBuffer::LINE_CONNECT )
{
connect( &m_sampleBuffer, SIGNAL( sampleUpdated() ), this,
@@ -105,7 +104,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
}
m_openAudioFileButton = new pixmapButton( this, NULL, eng(), NULL );
m_openAudioFileButton = new pixmapButton( this, NULL, NULL );
m_openAudioFileButton->setCursor( QCursor( Qt::PointingHandCursor ) );
m_openAudioFileButton->move( 200, 90 );
m_openAudioFileButton->setActiveGraphic( embed::getIconPixmap(
@@ -130,7 +129,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"are not reset, so please don't wonder if your sample "
"doesn't sound like the original one..." ) );
m_reverseButton = new pixmapButton( this, NULL, eng(), NULL );
m_reverseButton = new pixmapButton( this, NULL, NULL );
m_reverseButton->setCheckable( TRUE );
m_reverseButton->move( 160, 124 );
m_reverseButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
@@ -150,7 +149,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"This is useful for cool effects, e.g. a reversed "
"crash." ) );
m_loopButton = new pixmapButton( this, NULL, eng(), NULL );
m_loopButton = new pixmapButton( this, tr( "Loop" ), _channel_track );
m_loopButton->setCheckable( TRUE );
m_loopButton->move( 180, 124 );
m_loopButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
@@ -171,8 +170,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"This is useful for things like string- and choir-"
"samples." ) );
m_ampKnob = new volumeKnob( knobDark_28, this, tr( "Amplify" ), eng(),
NULL );
m_ampKnob = new volumeKnob( knobDark_28, this, tr( "Amplify" ), NULL );
m_ampKnob->setRange( 0, 500, 1.0f );
m_ampKnob->move( 6, 114 );
m_ampKnob->setInitValue( 100.0f );
@@ -191,7 +189,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"actual sample-file isn't touched!)" ) );
m_startKnob = new knob( knobDark_28, this, tr( "Start of sample" ),
eng(), _channel_track );
_channel_track );
m_startKnob->setRange( 0.0f, 1.0f, 0.00001f );
m_startKnob->move( 46, 114 );
m_startKnob->setInitValue( 0.0f );
@@ -210,7 +208,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"which AudioFileProcessor returns if a note is longer "
"than the sample between start- and end-point." ) );
m_endKnob = new knob( knobDark_28, this, tr( "End of sample" ), eng(),
m_endKnob = new knob( knobDark_28, this, tr( "End of sample" ),
_channel_track );
m_endKnob->setRange( 0.0f, 1.0f, 0.00001f );
m_endKnob->move( 84, 114 );
@@ -230,7 +228,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"AudioFileProcessor returns if a note is longer than "
"the sample between start- and end-point." ) );
m_viewLinesPB = new pixmapButton( this, NULL, eng(), NULL );
m_viewLinesPB = new pixmapButton( this, NULL, NULL );
m_viewLinesPB->move( 154, 158 );
m_viewLinesPB->setBgGraphic( getBackground( m_viewLinesPB ) );
if( m_drawMethod == sampleBuffer::LINE_CONNECT )
@@ -249,7 +247,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"sound itself. It just gives you another view to your "
"sample." ) );
m_viewDotsPB = new pixmapButton( this, NULL, eng(), NULL );
m_viewDotsPB = new pixmapButton( this, NULL, NULL );
m_viewDotsPB->move( 204, 158 );
m_viewDotsPB->setBgGraphic( getBackground( m_viewDotsPB ) );
if( m_drawMethod == sampleBuffer::DOTS )
@@ -268,7 +266,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
"It just gives you another view to your sample." ) );
automatableButtonGroup * view_group = new automatableButtonGroup( this,
NULL, eng(), NULL );
NULL, NULL );
view_group->addButton( m_viewLinesPB );
view_group->addButton( m_viewDotsPB );
@@ -360,7 +358,7 @@ Uint32 audioFileProcessor::getBeatLen( notePlayHandle * _n ) const
const float freq_factor = BASE_FREQ /
( getInstrumentTrack()->frequency( _n ) *
DEFAULT_SAMPLE_RATE /
eng()->getMixer()->sampleRate() );
engine::getMixer()->sampleRate() );
return( static_cast<Uint32>( floorf( ( m_sampleBuffer.endFrame() -
m_sampleBuffer.startFrame() ) *
@@ -394,13 +392,11 @@ void audioFileProcessor::setAudioFile( const QString & _audio_file, bool _rename
void audioFileProcessor::playNote( notePlayHandle * _n, bool )
{
const Uint32 frames = eng()->getMixer()->framesPerAudioBuffer();
const Uint32 frames = engine::getMixer()->framesPerAudioBuffer();
sampleFrame * buf = bufferAllocator::alloc<sampleFrame>( frames );
// calculate frequency of note
const float note_freq = getInstrumentTrack()->frequency( _n ) /
( eng()->getMixer()->sampleRate() /
DEFAULT_SAMPLE_RATE );
const float note_freq = getInstrumentTrack()->frequency( _n );
if( !_n->m_pluginData )
{
@@ -430,9 +426,10 @@ void audioFileProcessor::deleteNotePluginData( notePlayHandle * _n )
void audioFileProcessor::dragEnterEvent( QDragEnterEvent * _dee )
{
#ifdef QT4
if( _dee->mimeData()->hasFormat( "lmms/stringpair" ) )
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
{
QString txt = _dee->mimeData()->data( "lmms/stringpair" );
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == QString( "tco_%1" ).arg(
track::SAMPLE_TRACK ) )
{
@@ -452,7 +449,7 @@ void audioFileProcessor::dragEnterEvent( QDragEnterEvent * _dee )
_dee->ignore();
}
#else
QString txt = _dee->encodedData( "lmms/stringpair" );
QString txt = _dee->encodedData( stringPairDrag::mimeType() );
if( txt != "" )
{
if( txt.section( ':', 0, 0 ) == QString( "tco_%1" ).arg(
@@ -620,7 +617,7 @@ void audioFileProcessor::sampleUpdated( void )
void audioFileProcessor::reverseBtnToggled( bool _on )
{
m_sampleBuffer.setReversed( _on );
eng()->getSongEditor()->setModified();
engine::getSongEditor()->setModified();
}
@@ -727,7 +724,7 @@ void audioFileProcessor::openAudioFile( void )
if( af != "" )
{
setAudioFile( af );
eng()->getSongEditor()->setModified();
engine::getSongEditor()->setModified();
}
}

View File

@@ -1,7 +1,7 @@
/*
* bass_booster.cpp - bass-booster-effect-plugin
*
* 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
*
@@ -51,8 +51,9 @@ plugin::descriptor bassbooster_plugin_descriptor =
bassBoosterEffect::bassBoosterEffect( effect::constructionData * _cdata ) :
effect( &bassbooster_plugin_descriptor, _cdata ),
bassBoosterEffect::bassBoosterEffect(
const descriptor::subPluginFeatures::key * _key ) :
effect( &bassbooster_plugin_descriptor, _key ),
m_bbFX( effectLib::fastBassBoost<>( 70.0f, 1.0f, 2.8f ) )
{
}
@@ -116,7 +117,8 @@ extern "C"
plugin * lmms_plugin_main( void * _data )
{
return( new bassBoosterEffect(
static_cast<effect::constructionData *>( _data ) ) );
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
_data ) ) );
}
}

View File

@@ -1,7 +1,7 @@
/*
* bass_booster.h - bass-booster-effect-plugin
*
* 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
*
@@ -29,6 +29,7 @@
#include "effect.h"
#include "effect_lib.h"
#include "engine.h"
#include "main_window.h"
#include "bassbooster_control_dialog.h"
@@ -37,7 +38,7 @@
class bassBoosterEffect : public effect
{
public:
bassBoosterEffect( effect::constructionData * _cdata );
bassBoosterEffect( const descriptor::subPluginFeatures::key * _key );
virtual ~bassBoosterEffect();
virtual bool FASTCALL processAudioBuffer( surroundSampleFrame * _buf,
const fpab_t _frames );
@@ -49,7 +50,7 @@ public:
virtual inline effectControlDialog * createControlDialog( track * )
{
return( new bassBoosterControlDialog(
eng()->getMainWindow()->workspace(),
engine::getMainWindow()->workspace(),
this ) );
}

View File

@@ -1,7 +1,7 @@
/*
* bassbooster_control_dialog.cpp - control-dialog for bassbooster-effect
*
* 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
*
@@ -45,8 +45,7 @@ bassBoosterControlDialog::bassBoosterControlDialog( QWidget * _parent,
{
QHBoxLayout * l = new QHBoxLayout( this );
m_freqKnob = new knob( knobBright_26, this, tr( "Frequency" ),
eng(), NULL );
m_freqKnob = new knob( knobBright_26, this, tr( "Frequency" ), NULL );
m_freqKnob->setRange( 50.0f, 200.0f, 1.0f );
m_freqKnob->setInitValue( 100.0f );
m_freqKnob->setLabel( tr( "FREQ" ) );
@@ -54,7 +53,7 @@ bassBoosterControlDialog::bassBoosterControlDialog( QWidget * _parent,
connect( m_freqKnob, SIGNAL( valueChanged( float ) ),
this, SLOT( changeFrequency( void ) ) );
m_gainKnob = new knob( knobBright_26, this, tr( "Gain" ), eng(), NULL );
m_gainKnob = new knob( knobBright_26, this, tr( "Gain" ), NULL );
m_gainKnob->setRange( 0.1f, 5.0f, 0.1f );
m_gainKnob->setInitValue( 1.0f );
m_gainKnob->setLabel( tr( "GAIN" ) );
@@ -62,8 +61,7 @@ bassBoosterControlDialog::bassBoosterControlDialog( QWidget * _parent,
connect( m_gainKnob, SIGNAL( valueChanged( float ) ),
this, SLOT( changeGain( void ) ) );
m_ratioKnob = new knob( knobBright_26, this, tr( "Ratio" ), eng(),
NULL );
m_ratioKnob = new knob( knobBright_26, this, tr( "Ratio" ), NULL );
m_ratioKnob->setRange( 0.1f, 10.0f, 0.1f );
m_ratioKnob->setInitValue( 2.0f );
m_ratioKnob->setLabel( tr( "RATIO" ) );

View File

@@ -1,7 +1,7 @@
/*
* bit_invader.cpp - instrument which uses a usereditable wavetable
*
* Copyright (c) 2006 Andreas Brandmaier <andy/at/brandmaier/dot/de>
* Copyright (c) 2006-2007 Andreas Brandmaier <andy/at/brandmaier/dot/de>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -189,7 +189,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
m_sampleLengthKnob = new knob( knobDark_28, this, tr( "Samplelength" ),
eng(), _channel_track );
_channel_track );
m_sampleLengthKnob->setRange( 8, 128, 1 );
m_sampleLengthKnob->setInitValue( 128 );
m_sampleLengthKnob->move( 10, 120 );
@@ -201,7 +201,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
m_interpolationToggle = new ledCheckBox( "Interpolation", this,
tr( "Interpolation" ),
eng(), _channel_track );
_channel_track );
m_interpolationToggle->move( 55,80 );
connect( m_interpolationToggle, SIGNAL( toggled( bool ) ),
@@ -209,14 +209,14 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
m_normalizeToggle = new ledCheckBox( "Normalize", this,
tr( "Normalize" ),
eng(), _channel_track );
_channel_track );
m_normalizeToggle->move( 55, 100 );
connect( m_normalizeToggle, SIGNAL( toggled( bool ) ),
this, SLOT ( normalizeToggle( bool ) ) );
m_graph = new graph( this, eng() );
m_graph = new graph( this );
m_graph->move(53,118); // 55,120 - 2px border
m_graph->setCursor( QCursor( Qt::CrossCursor ) );
@@ -234,7 +234,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
connect( m_graph, SIGNAL ( sampleChanged( void ) ),
this, SLOT ( sampleChanged( void ) ) );
sinWaveBtn = new pixmapButton( this, tr( "Sine wave" ), eng(),
sinWaveBtn = new pixmapButton( this, tr( "Sine wave" ),
_channel_track );
sinWaveBtn->move( 188, 120 );
sinWaveBtn->setActiveGraphic( embed::getIconPixmap(
@@ -246,7 +246,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
"current oscillator." ) );
triangleWaveBtn = new pixmapButton( this, tr( "Triangle wave" ),
eng(), _channel_track );
_channel_track );
triangleWaveBtn->move( 188, 136 );
triangleWaveBtn->setActiveGraphic(
embed::getIconPixmap( "triangle_wave_active" ) );
@@ -256,7 +256,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
tr( "Click here if you want a triangle-wave "
"for current oscillator." ) );
sawWaveBtn = new pixmapButton( this, tr( "Saw wave" ), eng(),
sawWaveBtn = new pixmapButton( this, tr( "Saw wave" ),
_channel_track );
sawWaveBtn->move( 188, 152 );
sawWaveBtn->setActiveGraphic( embed::getIconPixmap(
@@ -267,7 +267,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
tr( "Click here if you want a saw-wave for "
"current oscillator." ) );
sqrWaveBtn = new pixmapButton( this, tr( "Square wave" ), eng(),
sqrWaveBtn = new pixmapButton( this, tr( "Square wave" ),
_channel_track );
sqrWaveBtn->move( 188, 168 );
sqrWaveBtn->setActiveGraphic( embed::getIconPixmap(
@@ -280,7 +280,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
whiteNoiseWaveBtn = new pixmapButton( this,
tr( "White noise wave" ),
eng(), _channel_track );
_channel_track );
whiteNoiseWaveBtn->move( 188, 184 );
whiteNoiseWaveBtn->setActiveGraphic(
embed::getIconPixmap( "white_noise_wave_active" ) );
@@ -291,7 +291,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
"current oscillator." ) );
usrWaveBtn = new pixmapButton( this, tr( "User defined wave" ),
eng(), _channel_track );
_channel_track );
usrWaveBtn->move( 188, 200 );
usrWaveBtn->setActiveGraphic( embed::getIconPixmap(
"usr_wave_active" ) );
@@ -317,7 +317,7 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
smoothBtn = new pixmapButton( this, tr( "Smooth" ), eng(),
smoothBtn = new pixmapButton( this, tr( "Smooth" ),
_channel_track );
smoothBtn->move( 55, 225 );
smoothBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
@@ -447,7 +447,7 @@ void bitInvader::usrWaveClicked( void )
}
// load user shape
sampleBuffer buffer( eng() );
sampleBuffer buffer;
QString af = buffer.openAudioFile();
if ( af != "" )
{
@@ -635,14 +635,14 @@ void bitInvader::interpolationToggle( bool value )
{
interpolation = value;
eng()->getSongEditor()->setModified();
engine::getSongEditor()->setModified();
}
void bitInvader::normalizeToggle( bool value )
{
normalize = value;
eng()->getSongEditor()->setModified();
engine::getSongEditor()->setModified();
}
@@ -674,7 +674,7 @@ void bitInvader::smoothClicked( void )
update();
m_graph->update();
eng()->getSongEditor()->setModified();
engine::getSongEditor()->setModified();
}
@@ -697,10 +697,10 @@ void bitInvader::playNote( notePlayHandle * _n, bool )
_n->m_pluginData = new bSynth( sample_shape, sample_length,freq
, interpolation, factor,
eng()->getMixer()->sampleRate() );
engine::getMixer()->sampleRate() );
}
const fpab_t frames = eng()->getMixer()->framesPerAudioBuffer();
const fpab_t frames = engine::getMixer()->framesPerAudioBuffer();
sampleFrame * buf = bufferAllocator::alloc<sampleFrame>( frames );
bSynth * ps = static_cast<bSynth *>( _n->m_pluginData );
@@ -772,7 +772,7 @@ void bitInvader::sampleSizeChanged( float _new_sample_length )
m_graph->setSamplePointer( sample_shape, sample_length );
// set Song modified
eng()->getSongEditor()->setModified();
engine::getSongEditor()->setModified();
}
@@ -793,7 +793,7 @@ void bitInvader::sampleChanged()
m_graph->update();
}
eng()->getSongEditor()->setModified();
engine::getSongEditor()->setModified();
}

View File

@@ -1,7 +1,7 @@
/*
* graph.cpp - a QT widget for displaying and manipulating waveforms
*
* Copyright (c) 2006 Andreas Brandmaier <andy/at/brandmaier/dot/de>
* Copyright (c) 2006-2007 Andreas Brandmaier <andy/at/brandmaier/dot/de>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -50,9 +50,8 @@ using namespace std;
graph::graph( QWidget * _parent, engine * _engine ) :
QWidget( _parent ),
engineObject( _engine )
graph::graph( QWidget * _parent ) :
QWidget( _parent )
{
// m_background = 0; TODO
@@ -96,7 +95,7 @@ void graph::loadSampleFromFile( const QString & _filename )
}
// load user shape
sampleBuffer buffer( eng(), _filename );
sampleBuffer buffer( _filename );
// copy buffer data
sampleLength = min( sampleLength, static_cast<int>(buffer.frames()) );

View File

@@ -1,7 +1,7 @@
/*
* graph.h - a QT widget for displaying and manipulating waveforms
*
* Copyright (c) 2006 Andreas Brandmaier <andy/at/brandmaier/dot/de>
* Copyright (c) 2006-2007 Andreas Brandmaier <andy/at/brandmaier/dot/de>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -43,14 +43,11 @@
#endif
#include "engine.h"
class graph : public QWidget, public engineObject
class graph : public QWidget
{
Q_OBJECT
public:
graph( QWidget * _parent, engine * _engine );
graph( QWidget * _parent );
virtual ~graph();
void setSamplePointer( float * pointer, int length );

View File

@@ -127,7 +127,7 @@ static void dump_mem( const void * buffer, uint n_bytes )
flpImport::flpImport( const QString & _file ) :
importFilter( _file, &flpimport_plugin_descriptor, NULL )
importFilter( _file, &flpimport_plugin_descriptor )
{
}
@@ -246,9 +246,9 @@ bool flpImport::tryImport( trackContainer * _tc )
int ev_cnt = 0;
_tc->eng()->getSongEditor()->clearProject();
const bool is_journ = _tc->eng()->getProjectJournal()->isJournalling();
_tc->eng()->getProjectJournal()->setJournalling( FALSE );
engine::getSongEditor()->clearProject();
const bool is_journ = engine::getProjectJournal()->isJournalling();
engine::getProjectJournal()->setJournalling( FALSE );
while( file().atEnd() == FALSE )
@@ -333,7 +333,7 @@ bool flpImport::tryImport( trackContainer * _tc )
case FLP_MainVol:
printf( "main-volume: %d\n", data );
_tc->eng()->getSongEditor()->setMasterVolume(
engine::getSongEditor()->setMasterVolume(
static_cast<volume>( data * 100 /
128 ) );
break;
@@ -364,7 +364,7 @@ bool flpImport::tryImport( trackContainer * _tc )
printf( "new channel\n" );
it = dynamic_cast<instrumentTrack *>(
track::create( track::INSTRUMENT_TRACK, _tc->eng()->getBBEditor() ) );
track::create( track::INSTRUMENT_TRACK, engine::getBBEditor() ) );
assert( it != NULL );
i_tracks.push_back( it );
it_inst = it->loadInstrument(
@@ -384,7 +384,7 @@ bool flpImport::tryImport( trackContainer * _tc )
case FLP_Tempo:
printf( "tempo: %d\n", data );
_tc->eng()->getSongEditor()->setTempo( data );
engine::getSongEditor()->setTempo( data );
break;
case FLP_CurrentPatNum:
@@ -417,8 +417,7 @@ bool flpImport::tryImport( trackContainer * _tc )
break;
case FLP_MainPitch:
_tc->eng()->getSongEditor()->setMasterPitch(
data );
engine::getSongEditor()->setMasterPitch( data );
break;
case FLP_Resonance:
@@ -533,7 +532,7 @@ bool flpImport::tryImport( trackContainer * _tc )
ba.resetRawData( text, text_len );
#endif
_tc->eng()->getProjectNotes()->setText( out );
engine::getProjectNotes()->setText( out );
outstring = "";
break;
}
@@ -749,7 +748,7 @@ bool flpImport::tryImport( trackContainer * _tc )
8 ) );
pos /= 6;
len /= 6;
note n( NULL, len, pos );
note n( len, pos );
n.setKey( key );
m_notes.push_back( qMakePair(
num_channels * current_pattern + ch, n ) );
@@ -816,10 +815,10 @@ bool flpImport::tryImport( trackContainer * _tc )
const int ch = ( *it ) >> 16;
const csize pat = ( ( *it ) & 0xffff ) / 16;
const csize pos = ( ( ( *it ) & 0xffff ) % 16 ) * 4;
while( _tc->eng()->getBBEditor()->numOfBBs() <= pat )
while( engine::getBBEditor()->numOfBBs() <= pat )
{
track::create( track::BB_TRACK,
_tc->eng()->getSongEditor() );
engine::getSongEditor() );
}
pattern * p = dynamic_cast<pattern *>(
i_tracks[ch]->getTCO( pat ) );
@@ -827,7 +826,7 @@ bool flpImport::tryImport( trackContainer * _tc )
{
continue;
}
p->setNoteAt( pos / 4, note( NULL, -64, pos ) );
p->setNoteAt( pos / 4, note( -64, pos ) );
}
// now process all notes
@@ -841,10 +840,10 @@ bool flpImport::tryImport( trackContainer * _tc )
{
continue;
}
while( _tc->eng()->getBBEditor()->numOfBBs() <= pat )
while( engine::getBBEditor()->numOfBBs() <= pat )
{
track::create( track::BB_TRACK,
_tc->eng()->getSongEditor() );
engine::getSongEditor() );
#ifdef QT4
qApp->processEvents( QEventLoop::AllEvents, 100 );
#else
@@ -868,10 +867,10 @@ bool flpImport::tryImport( trackContainer * _tc )
{
continue;
}
while( _tc->eng()->getBBEditor()->numOfBBs() <= pat_num )
while( engine::getBBEditor()->numOfBBs() <= pat_num )
{
track::create( track::BB_TRACK,
_tc->eng()->getSongEditor() );
engine::getSongEditor() );
#ifdef QT4
qApp->processEvents( QEventLoop::AllEvents, 100 );
#else
@@ -879,17 +878,17 @@ bool flpImport::tryImport( trackContainer * _tc )
#endif
}
bbTrack * bbt = bbTrack::findBBTrack( pat_num, _tc->eng() );
bbTrack * bbt = bbTrack::findBBTrack( pat_num );
trackContentObject * tco = bbt->addTCO( bbt->createTCO( 0 ) );
tco->movePosition( midiTime( ( ( *it ) & 0xffff ) * 64 ) );
}
if( (csize) project_cur_pat < _tc->eng()->getBBEditor()->numOfBBs() )
if( (csize) project_cur_pat < engine::getBBEditor()->numOfBBs() )
{
_tc->eng()->getBBEditor()->setCurrentBB( project_cur_pat );
engine::getBBEditor()->setCurrentBB( project_cur_pat );
}
_tc->eng()->getProjectJournal()->setJournalling( is_journ );
engine::getProjectJournal()->setJournalling( is_journ );
return( TRUE );
}

View File

@@ -1,7 +1,7 @@
/*
* kicker.cpp - bassdrum-synthesizer
*
* 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
*
@@ -74,35 +74,35 @@ kickerInstrument::kickerInstrument( instrumentTrack * _instrument_track ) :
QVBoxLayout * vl = new QVBoxLayout( this );
QHBoxLayout * hl = new QHBoxLayout;
m_startFreqKnob = new knob( knobDark_28, this, tr( "Start frequency" ),
eng(), _instrument_track );
_instrument_track );
m_startFreqKnob->setRange( 5.0f, 1000.0f, 1.0f );
m_startFreqKnob->setInitValue( 150.0f );
m_startFreqKnob->setLabel( tr( "START" ) );
m_startFreqKnob->setHintText( tr( "Start frequency:" ) + " ", "Hz" );
m_endFreqKnob = new knob( knobDark_28, this, tr( "End frequency" ),
eng(), _instrument_track );
_instrument_track );
m_endFreqKnob->setRange( 5.0f, 1000.0f, 1.0f );
m_endFreqKnob->setInitValue( 40.0f );
m_endFreqKnob->setLabel( tr( "END" ) );
m_endFreqKnob->setHintText( tr( "End frequency:" ) + " ", "Hz" );
m_decayKnob = new knob( knobDark_28, this, tr( "Decay" ),
eng(), _instrument_track );
_instrument_track );
m_decayKnob->setRange( 5.0f, 1000.0f, 1.0f );
m_decayKnob->setInitValue( 120.0f );
m_decayKnob->setLabel( tr( "DECAY" ) );
m_decayKnob->setHintText( tr( "Decay:" ) + " ", "ms" );
m_distKnob = new knob( knobDark_28, this, tr( "Distortion" ),
eng(), _instrument_track );
_instrument_track );
m_distKnob->setRange( 0.0f, 100.0f, 0.1f );
m_distKnob->setInitValue( 0.8f );
m_distKnob->setLabel( tr( "DIST" ) );
m_distKnob->setHintText( tr( "Distortion:" ) + " ", "" );
m_gainKnob = new knob( knobDark_28, this, tr( "Gain" ),
eng(), _instrument_track );
_instrument_track );
m_gainKnob->setRange( 0.1f, 5.0f, 0.05f );
m_gainKnob->setInitValue( 1.0f );
m_gainKnob->setLabel( tr( "GAIN" ) );
@@ -176,7 +176,7 @@ typedef sweepOscillator<effectLib::monoToStereoAdaptor<distFX> > sweepOsc;
void kickerInstrument::playNote( notePlayHandle * _n, bool )
{
const float decfr = m_decayKnob->value() *
eng()->getMixer()->sampleRate() / 1000.0f;
engine::getMixer()->sampleRate() / 1000.0f;
const f_cnt_t tfp = _n->totalFramesPlayed();
if ( tfp == 0 )
@@ -195,9 +195,9 @@ void kickerInstrument::playNote( notePlayHandle * _n, bool )
const fpab_t frames = _n->released() ?
tMax( tMin<f_cnt_t>( desiredReleaseFrames() -
_n->releaseFramesDone(),
eng()->getMixer()->framesPerAudioBuffer() ), 0 )
engine::getMixer()->framesPerAudioBuffer() ), 0 )
:
eng()->getMixer()->framesPerAudioBuffer();
engine::getMixer()->framesPerAudioBuffer();
const float f1 = m_startFreqKnob->value() + tfp * fdiff / decfr;
const float f2 = m_startFreqKnob->value() + (frames+tfp-1)*fdiff/decfr;
@@ -205,7 +205,7 @@ void kickerInstrument::playNote( notePlayHandle * _n, bool )
sweepOsc * so = static_cast<sweepOsc *>( _n->m_pluginData );
so->update( buf, frames, f1, f2, eng()->getMixer()->sampleRate() );
so->update( buf, frames, f1, f2, engine::getMixer()->sampleRate() );
if( _n->released() )
{

View File

@@ -2,7 +2,7 @@
* ladspa_2_lmms.cpp - class that identifies and instantiates LADSPA effects
* for use with LMMS
*
* Copyright (c) 2005 Danny McRae <khjklujn@netscape.net>
* Copyright (c) 2005-2007 Danny McRae <khjklujn@netscape.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -30,8 +30,7 @@
#define indexOf find
#endif
ladspa2LMMS::ladspa2LMMS( engine * _engine ):
ladspaManager( _engine )
ladspa2LMMS::ladspa2LMMS( void )
{
l_sortable_plugin_t plugins = getSortedPlugins();

View File

@@ -2,7 +2,7 @@
* ladspa_2_lmms.h - class that identifies and instantiates LADSPA effects
* for use with LMMS
*
* Copyright (c) 2005 Danny McRae <khjklujn@netscape.net>
* Copyright (c) 2005-2007 Danny McRae <khjklujn@netscape.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -28,7 +28,6 @@
#include "ladspa_manager.h"
#include "engine.h"
class ladspa2LMMS: public ladspaManager
@@ -64,10 +63,9 @@ public:
QString getShortName( const ladspa_key_t & _key );
private:
ladspa2LMMS( engine * _engine );
ladspa2LMMS( void );
~ladspa2LMMS();
// engine * m_engine;
// ladspaManager * m_ladspa;
l_sortable_plugin_t m_instruments;

View File

@@ -1,8 +1,8 @@
/*
* ladspa_base.h - basic declarations concerning LADSPA
*
* Copyright (c) 2006 Danny McRae <khjklujn/at/users.sourceforge.net>
* Copyright (c) 2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2007 Danny McRae <khjklujn/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
*
@@ -70,10 +70,10 @@ typedef struct portDescription
inline ladspa_key_t subPluginKeyToLadspaKey(
const plugin::descriptor::subPluginFeatures::key & _key )
const plugin::descriptor::subPluginFeatures::key * _key )
{
return( ladspa_key_t( _key.user.toStringList().first(),
_key.user.toStringList().last() ) );
return( ladspa_key_t( _key->user.toStringList().first(),
_key->user.toStringList().last() ) );
}
inline plugin::descriptor::subPluginFeatures::key ladspaKeyToSubPluginKey(

View File

@@ -44,7 +44,6 @@
ladspaControl::ladspaControl( QWidget * _parent,
port_desc_t * _port,
engine * _engine,
track * _track,
bool _link) :
QWidget( _parent
@@ -52,7 +51,6 @@ ladspaControl::ladspaControl( QWidget * _parent,
, "ladspaControl"
#endif
),
journallingObject( _engine ),
m_port( _port ),
m_track( _track ),
m_link( NULL ),
@@ -67,7 +65,7 @@ ladspaControl::ladspaControl( QWidget * _parent,
if( _link )
{
m_link = new ledCheckBox( "", this, "", eng(), m_track );
m_link = new ledCheckBox( "", this, "", m_track );
m_link->setChecked( FALSE );
connect( m_link, SIGNAL( toggled( bool ) ),
this, SLOT( portLink( bool ) ) );
@@ -78,9 +76,8 @@ ladspaControl::ladspaControl( QWidget * _parent,
switch( m_port->data_type )
{
case TOGGLED:
m_toggle = new ledCheckBox( m_port->name, this, "",
eng(), m_track,
ledCheckBox::GREEN );
m_toggle = new ledCheckBox( m_port->name, this, "",
m_track, ledCheckBox::GREEN );
connect( m_toggle, SIGNAL( toggled( bool ) ),
this, SLOT( ledChange( bool ) ) );
setFixedSize( m_toggle->width(), m_toggle->height() );
@@ -97,8 +94,8 @@ ladspaControl::ladspaControl( QWidget * _parent,
}
break;
case INTEGER:
m_knob = new knob( knobBright_26, this,
m_port->name, eng(), m_track);
m_knob = new knob( knobBright_26, this, m_port->name,
m_track );
connect( m_knob, SIGNAL( valueChanged( float ) ),
this, SLOT( knobChange( float ) ) );
m_knob->setLabel( m_port->name );
@@ -125,8 +122,8 @@ ladspaControl::ladspaControl( QWidget * _parent,
}
break;
case FLOAT:
m_knob = new knob( knobBright_26, this,
m_port->name, eng(), m_track);
m_knob = new knob( knobBright_26, this, m_port->name,
m_track );
connect( m_knob, SIGNAL( valueChanged( float ) ),
this, SLOT( knobChange( float ) ) );
m_knob->setLabel( m_port->name );
@@ -153,8 +150,8 @@ ladspaControl::ladspaControl( QWidget * _parent,
}
break;
case TIME:
m_knob = new tempoSyncKnob( knobBright_26, this,
m_port->name, eng(), m_track);
m_knob = new tempoSyncKnob( knobBright_26, this,
m_port->name, m_track );
connect( m_knob, SIGNAL( valueChanged( float ) ),
this, SLOT( knobChange( float ) ) );
m_knob->setLabel( m_port->name );

View File

@@ -1,7 +1,7 @@
/*
* ladspa_control.h - widget for controlling a LADSPA port
*
* 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
*
@@ -56,9 +56,8 @@ class ladspaControl : public QWidget, public journallingObject
{
Q_OBJECT
public:
ladspaControl( QWidget * _parent, port_desc_t * _port,
engine * _engine, track * _track,
bool _link = FALSE );
ladspaControl( QWidget * _parent, port_desc_t * _port, track * _track,
bool _link = FALSE );
~ladspaControl();
LADSPA_Data getValue( void );

View File

@@ -2,7 +2,7 @@
* ladspa_manager.cpp - a class to manage loading and instantiation
* of ladspa plugins
*
* Copyright (c) 2005 Danny McRae <khjklujn@netscape.net>
* Copyright (c) 2005-2007 Danny McRae <khjklujn@netscape.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -50,7 +50,7 @@
ladspaManager::ladspaManager( engine * _engine )
ladspaManager::ladspaManager( void )
{
#ifdef QT4
QStringList ladspaDirectories = QString( getenv( "LADSPA_PATH" ) ).

View File

@@ -3,7 +3,7 @@
* a class to manage loading and instantiation
* of ladspa plugins
*
* Copyright (c) 2005 Danny McRae <khjklujn@netscape.net>
* Copyright (c) 2005-2007 Danny McRae <khjklujn@netscape.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -61,7 +61,6 @@
#include "types.h"
//#include "qt3support.h"
class engine;
const float NOHINT = -99342.2243f;
@@ -107,7 +106,7 @@ class ladspaManager
{
public:
ladspaManager( engine * _engine );
ladspaManager( void );
~ladspaManager();
l_sortable_plugin_t getSortedPlugins();

View File

@@ -1,7 +1,7 @@
/*
* ladspa_port_dialog.cpp - dialog to test a LADSPA plugin
*
* 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
*
@@ -41,15 +41,13 @@
#include "ladspa_port_dialog.h"
#include "embed.h"
#include "engine.h"
#include "mixer.h"
ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key,
engine * _engine ) :
QDialog(),
engineObject( _engine ),
ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key ) :
m_key( _key ),
m_ladspa( _engine->getLADSPAManager() )
m_ladspa( engine::getLADSPAManager() )
{
setWindowIcon( embed::getIconPixmap( "ports" ) );
setWindowTitle( "Ports" );
@@ -158,11 +156,11 @@ ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key,
{
if( min != NOHINT )
{
min *= eng()->getMixer()->sampleRate();
min *= engine::getMixer()->sampleRate();
}
if( max != NOHINT )
{
max *= eng()->getMixer()->sampleRate();
max *= engine::getMixer()->sampleRate();
}
}

View File

@@ -1,7 +1,7 @@
/*
* ladspa_port_dialog.h - dialog to test a LADSPA plugin
*
* 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
*
@@ -42,12 +42,11 @@
#include "ladspa_2_lmms.h"
class ladspaPortDialog : public QDialog, public engineObject
class ladspaPortDialog : public QDialog
{
Q_OBJECT
public:
ladspaPortDialog( const ladspa_key_t & _key,
engine * _engine );
ladspaPortDialog( const ladspa_key_t & _key );
virtual ~ladspaPortDialog();
private:

View File

@@ -2,7 +2,7 @@
* ladspa_control_dialog.cpp - dialog for displaying and editing control port
* values for LADSPA plugins
*
* 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
*
@@ -110,9 +110,8 @@ ladspaControlDialog::ladspaControlDialog( QWidget * _parent,
last_port == TOGGLED ) )
{
(*it)->control =
new ladspaControl(
grouper, (*it),
eng(), m_track,
new ladspaControl( grouper, *it,
m_track,
linked_control );
}
else
@@ -123,9 +122,8 @@ ladspaControlDialog::ladspaControlDialog( QWidget * _parent,
new QWidget( grouper ) );
row_cnt++;
}
(*it)->control = new ladspaControl(
(*it)->control = new ladspaControl(
grouper, (*it),
eng(),
m_track,
linked_control );
row_cnt = 0;
@@ -163,8 +161,8 @@ ladspaControlDialog::ladspaControlDialog( QWidget * _parent,
QHBoxLayout * center = new QHBoxLayout();
m_mainLay->addLayout( center );
#endif
m_stereoLink = new ledCheckBox( tr( "Link Channels" ),
this, "", eng(), m_track );
m_stereoLink = new ledCheckBox( tr( "Link Channels" ), this, "",
m_track );
connect( m_stereoLink, SIGNAL( toggled( bool ) ),
this, SLOT( link( bool ) ) );
m_stereoLink->setChecked( TRUE );

View File

@@ -70,13 +70,13 @@ plugin::descriptor ladspaeffect_plugin_descriptor =
}
ladspaEffect::ladspaEffect( effect::constructionData * _cdata ) :
effect( &ladspaeffect_plugin_descriptor, _cdata ),
ladspaEffect::ladspaEffect( const descriptor::subPluginFeatures::key * _key ) :
effect( &ladspaeffect_plugin_descriptor, _key ),
m_effName( "none" ),
m_key( subPluginKeyToLadspaKey( _cdata->key )
m_key( subPluginKeyToLadspaKey( _key )
/* ladspa_key_t( _cdata->settings.attribute( "label" ),
_cdata->settings.attribute( "lib" ) )*/ ),
m_ladspa( eng()->getLADSPAManager() )
m_ladspa( engine::getLADSPAManager() )
{
if( m_ladspa->getDescription( m_key ) == NULL )
{
@@ -90,7 +90,7 @@ ladspaEffect::ladspaEffect( effect::constructionData * _cdata ) :
setPublicName( m_ladspa->getShortName( m_key ) );
// Calculate how many processing units are needed.
const ch_cnt_t lmms_chnls = eng()->getMixer()->audioDev()->channels();
const ch_cnt_t lmms_chnls = engine::getMixer()->audioDev()->channels();
m_effectChannels = m_ladspa->getDescription( m_key )->inputChannels;
setProcessorCount( lmms_chnls / m_effectChannels );
@@ -117,7 +117,7 @@ ladspaEffect::ladspaEffect( effect::constructionData * _cdata ) :
// during cleanup. It was easier to troubleshoot with the
// memory management all taking place in one file.
p->buffer =
new LADSPA_Data[eng()->getMixer()->framesPerAudioBuffer()];
new LADSPA_Data[engine::getMixer()->framesPerAudioBuffer()];
if( p->name.toUpper().contains( "IN" ) &&
m_ladspa->isPortInput( m_key, port ) )
@@ -198,7 +198,7 @@ ladspaEffect::ladspaEffect( effect::constructionData * _cdata ) :
if( m_ladspa->areHintsSampleRateDependent(
m_key, port ) )
{
p->max *= eng()->getMixer()->sampleRate();
p->max *= engine::getMixer()->sampleRate();
}
p->min = m_ladspa->getLowerBound( m_key, port );
@@ -210,7 +210,7 @@ ladspaEffect::ladspaEffect( effect::constructionData * _cdata ) :
if( m_ladspa->areHintsSampleRateDependent(
m_key, port ) )
{
p->min *= eng()->getMixer()->sampleRate();
p->min *= engine::getMixer()->sampleRate();
}
p->def = m_ladspa->getDefaultSetting( m_key, port );
@@ -267,7 +267,7 @@ ladspaEffect::ladspaEffect( effect::constructionData * _cdata ) :
for( ch_cnt_t proc = 0; proc < getProcessorCount(); proc++ )
{
LADSPA_Handle effect = m_ladspa->instantiate( m_key,
eng()->getMixer()->sampleRate() );
engine::getMixer()->sampleRate() );
if( effect == NULL )
{
QMessageBox::warning( 0, "Effect",
@@ -492,7 +492,8 @@ extern "C"
plugin * lmms_plugin_main( void * _data )
{
return( new ladspaEffect(
static_cast<effect::constructionData *>( _data ) ) );
static_cast<const plugin::descriptor::subPluginFeatures::key *>(
_data ) ) );
}
}

View File

@@ -1,7 +1,7 @@
/*
* ladspa_effect.h - class for handling LADSPA effect plugins
*
* 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
*
@@ -45,7 +45,7 @@ typedef vvector<port_desc_t *> multi_proc_t;
class ladspaEffect : public effect
{
public:
ladspaEffect( effect::constructionData * _cdata );
ladspaEffect( const descriptor::subPluginFeatures::key * _key );
virtual ~ladspaEffect();
virtual bool FASTCALL processAudioBuffer( surroundSampleFrame * _buf,
@@ -72,7 +72,7 @@ public:
track * _track )
{
return( new ladspaControlDialog(
eng()->getMainWindow()->workspace(),
engine::getMainWindow()->workspace(),
this, _track ) );
}

View File

@@ -45,6 +45,7 @@
#include "ladspa_2_lmms.h"
#include "mixer.h"
#include "audio_device.h"
#include "engine.h"
ladspaSubPluginFeatures::ladspaSubPluginFeatures( plugin::pluginTypes _type ) :
@@ -55,11 +56,11 @@ ladspaSubPluginFeatures::ladspaSubPluginFeatures( plugin::pluginTypes _type ) :
void ladspaSubPluginFeatures::fillDescriptionWidget(
QWidget * _parent, engine * _eng, const key & _key )
void ladspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
const key * _key )
{
const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key );
ladspa2LMMS * lm = _eng->getLADSPAManager();
ladspa2LMMS * lm = engine::getLADSPAManager();
QLabel * label = new QLabel( _parent );
label->setText( QWidget::tr( "Name: " ) + lm->getName( lkey ) );
@@ -113,10 +114,10 @@ void ladspaSubPluginFeatures::fillDescriptionWidget(
void ladspaSubPluginFeatures::listSubPluginKeys( engine * _eng,
plugin::descriptor * _desc, keyList & _kl )
void ladspaSubPluginFeatures::listSubPluginKeys( plugin::descriptor * _desc,
keyList & _kl )
{
ladspa2LMMS * lm = _eng->getLADSPAManager();
ladspa2LMMS * lm = engine::getLADSPAManager();
l_sortable_plugin_t plugins;
switch( m_type )
@@ -142,7 +143,7 @@ void ladspaSubPluginFeatures::listSubPluginKeys( engine * _eng,
it != plugins.end(); ++it )
{
if( lm->getDescription( ( *it ).second )->inputChannels <=
_eng->getMixer()->audioDev()->channels() )
engine::getMixer()->audioDev()->channels() )
{
_kl.push_back( ladspaKeyToSubPluginKey(
_desc,

View File

@@ -39,11 +39,10 @@ public:
ladspaSubPluginFeatures( plugin::pluginTypes _type );
virtual void fillDescriptionWidget( QWidget * _parent,
engine * _eng,
const key & _key );
const key * _key );
virtual void listSubPluginKeys( engine * _eng,
plugin::descriptor * _desc, keyList & _kl );
virtual void listSubPluginKeys( plugin::descriptor * _desc,
keyList & _kl );
} ;

View File

@@ -258,7 +258,7 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
// GUI
vcf_cut_knob = new knob( knobBright_26, this, tr( "VCF Cutoff Frequency" ),
eng(), _channel_track );
_channel_track );
vcf_cut_knob->setRange( 0.0f, 1.5f, 0.005f ); // Originally [0,1.0]
vcf_cut_knob->setInitValue( 0.75f );
vcf_cut_knob->move( 75, 130 );
@@ -266,7 +266,7 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
vcf_cut_knob->setLabel( tr("CUT") );
vcf_res_knob = new knob( knobBright_26, this, tr( "VCF Resonance" ),
eng(), _channel_track );
_channel_track );
vcf_res_knob->setRange( 0.0f, 1.25f, 0.005f ); // Originally [0,1.0]
vcf_res_knob->setInitValue( 0.75f );
vcf_res_knob->move( 120, 130 );
@@ -274,7 +274,7 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
vcf_res_knob->setLabel( tr("RES") );
vcf_mod_knob = new knob( knobBright_26, this, tr( "VCF Envelope Mod" ),
eng(), _channel_track );
_channel_track );
vcf_mod_knob->setRange( 0.0f, 1.0f, 0.005f ); // Originally [0,1.0]
vcf_mod_knob->setInitValue( 1.0f );
vcf_mod_knob->move( 165, 130 );
@@ -282,7 +282,7 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
vcf_mod_knob->setLabel( tr("ENV MOD") );
vcf_dec_knob = new knob( knobBright_26, this, tr( "VCF Envelope Decay" ),
eng(), _channel_track );
_channel_track );
vcf_dec_knob->setRange( 0.0f, 1.0f, 0.005f ); // Originally [0,1.0]
vcf_dec_knob->setInitValue( 0.1f );
vcf_dec_knob->move( 210, 130 );
@@ -291,30 +291,30 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
slideToggle = new ledCheckBox( "Slide", this,
tr( "Slide" ),
eng(), _channel_track );
_channel_track );
slideToggle->move( 10, 180 );
accentToggle = new ledCheckBox( "Accent", this,
tr( "Accent" ),
eng(), _channel_track );
_channel_track );
accentToggle->move( 10, 200 );
accentToggle->setDisabled(true);
deadToggle = new ledCheckBox( "Dead", this,
tr( "Dead" ),
eng(), _channel_track );
_channel_track );
deadToggle->move( 10, 220 );
db24Toggle = new ledCheckBox( "24dB/oct", this,
tr( "303-es-que, 24dB/octave, 3 pole filter" ),
eng(), _channel_track );
_channel_track );
db24Toggle->move( 10, 150);
slide_dec_knob = new knob( knobBright_26, this, tr( "Slide Decay" ),
eng(), _channel_track );
_channel_track );
slide_dec_knob->setRange( 0.0f, 1.0f, 0.005f ); // Originally [0,1.0]
slide_dec_knob->setInitValue( 0.6f );
slide_dec_knob->move( 210, 75 );
@@ -323,7 +323,7 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
vco_fine_detune_knob = new knob( knobBright_26, this,
tr("Fine detuning of the VCO. Ranged between -100 and 100 centes."),
eng(), _channel_track );
_channel_track );
vco_fine_detune_knob->setRange(-100.0f, 100.0f, 1.0f);
vco_fine_detune_knob->setInitValue(0.0f);
vco_fine_detune_knob->move(165,75);
@@ -332,7 +332,7 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
dist_knob = new knob( knobBright_26, this, tr( "Distortion" ),
eng(), _channel_track );
_channel_track );
dist_knob->setRange( 0.0f, 1.0f, 0.01f ); // Originally [0,1.0]
dist_knob->setInitValue( 0.0f );
dist_knob->move( 210, 190 );
@@ -341,7 +341,7 @@ lb302Synth::lb302Synth( instrumentTrack * _channel_track ) :
wave_knob = new knob( knobBright_26, this, tr( "Waveform" ),
eng(), _channel_track );
_channel_track );
wave_knob->setRange( 0.0f, 5.0f, 1.0f ); // Originally [0,1.0]
wave_knob->setInitValue( 0.0f );
wave_knob->move( 120, 75 );
@@ -730,7 +730,7 @@ void lb302Synth::playNote( notePlayHandle * _n, bool )
}
}
const Uint32 frames = eng()->getMixer()->framesPerAudioBuffer();
const Uint32 frames = engine::getMixer()->framesPerAudioBuffer();
sampleFrame *buf = bufferAllocator::alloc<sampleFrame>( frames );
if (buf) {

Some files were not shown because too many files have changed in this diff Show More