Rename engine to Engine
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include "interpolation.h"
|
||||
#include "lmms_basics.h"
|
||||
#include "lmms_math.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
|
||||
#define MAXLEN 11
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
*/
|
||||
static inline float freqToLen( float f )
|
||||
{
|
||||
return freqToLen( f, engine::mixer()->processingSampleRate() );
|
||||
return freqToLen( f, Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
/*! \brief This method converts frequency to wavelength, but you can use any custom sample rate with it.
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "MemoryManager.h"
|
||||
#include "lmms_basics.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include <QtCore/QAtomicInt>
|
||||
#include <QtCore/QReadWriteLock>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "export.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class engine;
|
||||
class Engine;
|
||||
|
||||
|
||||
const QString PROJECTS_PATH = "projects/";
|
||||
@@ -221,7 +221,7 @@ private:
|
||||
settingsMap m_settings;
|
||||
|
||||
|
||||
friend class engine;
|
||||
friend class Engine;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef CONTROLLER_H
|
||||
#define CONTROLLER_H
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "Model.h"
|
||||
#include "JournallingObject.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define EFFECT_H
|
||||
|
||||
#include "Plugin.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "TempoSyncKnobModel.h"
|
||||
@@ -102,8 +102,8 @@ public:
|
||||
|
||||
inline f_cnt_t timeout() const
|
||||
{
|
||||
const float samples = engine::mixer()->processingSampleRate() * m_autoQuitModel.value() / 1000.0f;
|
||||
return 1 + ( static_cast<int>( samples ) / engine::mixer()->framesPerPeriod() );
|
||||
const float samples = Engine::mixer()->processingSampleRate() * m_autoQuitModel.value() / 1000.0f;
|
||||
return 1 + ( static_cast<int>( samples ) / Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
inline float wetLevel() const
|
||||
@@ -176,9 +176,9 @@ protected:
|
||||
sample_rate_t _dst_sr )
|
||||
{
|
||||
resample( 0, _src_buf,
|
||||
engine::mixer()->processingSampleRate(),
|
||||
Engine::mixer()->processingSampleRate(),
|
||||
_dst_buf, _dst_sr,
|
||||
engine::mixer()->framesPerPeriod() );
|
||||
Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
inline void sampleBack( const sampleFrame * _src_buf,
|
||||
@@ -186,9 +186,9 @@ protected:
|
||||
sample_rate_t _src_sr )
|
||||
{
|
||||
resample( 1, _src_buf, _src_sr, _dst_buf,
|
||||
engine::mixer()->processingSampleRate(),
|
||||
engine::mixer()->framesPerPeriod() * _src_sr /
|
||||
engine::mixer()->processingSampleRate() );
|
||||
Engine::mixer()->processingSampleRate(),
|
||||
Engine::mixer()->framesPerPeriod() * _src_sr /
|
||||
Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
void reinitSRC();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* engine.h - engine-system of LMMS
|
||||
* Engine.h - engine-system of LMMS
|
||||
*
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -50,7 +50,7 @@ class ladspa2LMMS;
|
||||
class ControllerRackView;
|
||||
|
||||
|
||||
class EXPORT engine
|
||||
class EXPORT Engine
|
||||
{
|
||||
public:
|
||||
static void init( const bool _has_gui = true );
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "FxLine.h"
|
||||
#include "FxMixer.h"
|
||||
#include "ModelView.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "fader.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
@@ -366,7 +366,7 @@ private:
|
||||
// did we start a mouseclick with shift pressed
|
||||
bool m_startedWithShift;
|
||||
|
||||
friend class engine;
|
||||
friend class Engine;
|
||||
|
||||
// qproperty fields
|
||||
QColor m_gridColor;
|
||||
|
||||
@@ -317,7 +317,7 @@ private:
|
||||
|
||||
inline f_cnt_t currentFrame() const
|
||||
{
|
||||
return m_playPos[m_playMode].getTicks() * engine::framesPerTick() + m_playPos[m_playMode].currentFrame();
|
||||
return m_playPos[m_playMode].getTicks() * Engine::framesPerTick() + m_playPos[m_playMode].currentFrame();
|
||||
}
|
||||
|
||||
void setPlayPos( tick_t _ticks, PlayModes _play_mode );
|
||||
@@ -364,7 +364,7 @@ private:
|
||||
VstSyncController m_vstSyncController;
|
||||
|
||||
|
||||
friend class engine;
|
||||
friend class Engine;
|
||||
friend class SongEditor;
|
||||
friend class mainWindow;
|
||||
friend class ControllerRackView;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "AmplifierControls.h"
|
||||
#include "Amplifier.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
|
||||
inline void BassBoosterEffect::changeFrequency()
|
||||
{
|
||||
const sample_t fac = engine::mixer()->processingSampleRate() / 44100.0f;
|
||||
const sample_t fac = Engine::mixer()->processingSampleRate() / 44100.0f;
|
||||
|
||||
m_bbFX.leftFX().setFrequency( m_bbControls.m_freqModel.value() * fac );
|
||||
m_bbFX.rightFX().setFrequency( m_bbControls.m_freqModel.value() * fac );
|
||||
|
||||
@@ -37,7 +37,7 @@ BassBoosterControls::BassBoosterControls( BassBoosterEffect* effect ) :
|
||||
m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this, tr( "Gain" ) ),
|
||||
m_ratioModel( 2.0f, 0.1f, 10.0f, 0.1f, this, tr( "Ratio" ) )
|
||||
{
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeFrequency() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeFrequency() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ DualFilterEffect::DualFilterEffect( Model* parent, const Descriptor::SubPluginFe
|
||||
Effect( &dualfilter_plugin_descriptor, parent, key ),
|
||||
m_dfControls( this )
|
||||
{
|
||||
m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
// ensure filters get updated
|
||||
m_filter1changed = true;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "DualFilterControls.h"
|
||||
#include "DualFilter.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
#include "basic_filters.h"
|
||||
#include "embed.h"
|
||||
@@ -97,7 +97,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_filter2Model.addItem( tr( "Fast Formant" ), new PixmapLoader( "filter_hp" ) );
|
||||
m_filter2Model.addItem( tr( "Tripole" ), new PixmapLoader( "filter_lp" ) );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -108,8 +108,8 @@ void DualFilterControls::updateFilters()
|
||||
|
||||
delete m_effect->m_filter1;
|
||||
delete m_effect->m_filter2;
|
||||
m_effect->m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_effect->m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() );
|
||||
m_effect->m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
m_effect->m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
// flag filters as needing recalculation
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "LocalFileMng.h"
|
||||
#include "HydrogenImport.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "note.h"
|
||||
@@ -143,7 +143,7 @@ bool HydrogenImport::readSong()
|
||||
QHash<QString, int> pattern_length;
|
||||
QHash<QString, int> pattern_id;
|
||||
|
||||
Song *s = engine::getSong();
|
||||
Song *s = Engine::getSong();
|
||||
int song_num_tracks = s->tracks().size();
|
||||
if ( QFile( filename ).exists() == false )
|
||||
{
|
||||
@@ -213,7 +213,7 @@ bool HydrogenImport::readSong()
|
||||
|
||||
if ( nLayer == 0 )
|
||||
{
|
||||
drum_track[sId] = ( InstrumentTrack * ) Track::create( Track::InstrumentTrack,engine::getBBTrackContainer() );
|
||||
drum_track[sId] = ( InstrumentTrack * ) Track::create( Track::InstrumentTrack,Engine::getBBTrackContainer() );
|
||||
drum_track[sId]->volumeModel()->setValue( fVolume * 100 );
|
||||
drum_track[sId]->panningModel()->setValue( ( fPan_R - fPan_L ) * 100 );
|
||||
ins = drum_track[sId]->loadInstrument( "audiofileprocessor" );
|
||||
@@ -237,7 +237,7 @@ bool HydrogenImport::readSong()
|
||||
}
|
||||
QDomNode patterns = songNode.firstChildElement( "patternList" );
|
||||
int pattern_count = 0;
|
||||
int nbb = engine::getBBTrackContainer()->numOfBBs();
|
||||
int nbb = Engine::getBBTrackContainer()->numOfBBs();
|
||||
QDomNode patternNode = patterns.firstChildElement( "pattern" );
|
||||
int pn = 1;
|
||||
while ( !patternNode.isNull() )
|
||||
|
||||
@@ -71,10 +71,10 @@ LadspaEffect::LadspaEffect( Model * _parent,
|
||||
m_maxSampleRate( 0 ),
|
||||
m_key( LadspaSubPluginFeatures::subPluginKeyToLadspaKey( _key ) )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
if( manager->getDescription( m_key ) == NULL )
|
||||
{
|
||||
if( !engine::suppressMessages() )
|
||||
if( !Engine::suppressMessages() )
|
||||
{
|
||||
QMessageBox::warning( 0, tr( "Effect" ),
|
||||
tr( "Unknown LADSPA plugin %1 requested." ).
|
||||
@@ -89,7 +89,7 @@ LadspaEffect::LadspaEffect( Model * _parent,
|
||||
|
||||
pluginInstantiation();
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( changeSampleRate() ) );
|
||||
}
|
||||
|
||||
@@ -147,13 +147,13 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
sampleFrame * o_buf = NULL;
|
||||
sampleFrame sBuf [_frames];
|
||||
|
||||
if( m_maxSampleRate < engine::mixer()->processingSampleRate() )
|
||||
if( m_maxSampleRate < Engine::mixer()->processingSampleRate() )
|
||||
{
|
||||
o_buf = _buf;
|
||||
_buf = &sBuf[0];
|
||||
sampleDown( o_buf, _buf, m_maxSampleRate );
|
||||
frames = _frames * m_maxSampleRate /
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
// Copy the LMMS audio buffer to the LADSPA input buffer and initialize
|
||||
@@ -291,10 +291,10 @@ void LadspaEffect::pluginInstantiation()
|
||||
{
|
||||
m_maxSampleRate = maxSamplerate( displayName() );
|
||||
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
// Calculate how many processing units are needed.
|
||||
const ch_cnt_t lmms_chnls = engine::mixer()->audioDev()->channels();
|
||||
const ch_cnt_t lmms_chnls = Engine::mixer()->audioDev()->channels();
|
||||
int effect_channels = manager->getDescription( m_key )->inputChannels;
|
||||
setProcessorCount( lmms_chnls / effect_channels );
|
||||
|
||||
@@ -329,7 +329,7 @@ void LadspaEffect::pluginInstantiation()
|
||||
manager->isPortInput( m_key, port ) )
|
||||
{
|
||||
p->rate = CHANNEL_IN;
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
inbuf[ inputch ] = p->buffer;
|
||||
inputch++;
|
||||
}
|
||||
@@ -344,19 +344,19 @@ void LadspaEffect::pluginInstantiation()
|
||||
}
|
||||
else
|
||||
{
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
m_inPlaceBroken = true;
|
||||
}
|
||||
}
|
||||
else if( manager->isPortInput( m_key, port ) )
|
||||
{
|
||||
p->rate = AUDIO_RATE_INPUT;
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
else
|
||||
{
|
||||
p->rate = AUDIO_RATE_OUTPUT;
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() );
|
||||
p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -548,7 +548,7 @@ void LadspaEffect::pluginDestruction()
|
||||
|
||||
for( ch_cnt_t proc = 0; proc < processorCount(); proc++ )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
manager->deactivate( m_key, m_handles[proc] );
|
||||
manager->cleanup( m_key, m_handles[proc] );
|
||||
for( int port = 0; port < m_portCount; port++ )
|
||||
@@ -587,7 +587,7 @@ sample_rate_t LadspaEffect::maxSamplerate( const QString & _name )
|
||||
{
|
||||
return( __buggy_plugins[_name] );
|
||||
}
|
||||
return( engine::mixer()->processingSampleRate() );
|
||||
return( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "LadspaSubPluginFeatures.h"
|
||||
#include "AudioDevice.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "LadspaBase.h"
|
||||
#include "Mixer.h"
|
||||
@@ -48,7 +48,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
const Key * _key ) const
|
||||
{
|
||||
const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key );
|
||||
ladspa2LMMS * lm = engine::getLADSPAManager();
|
||||
ladspa2LMMS * lm = Engine::getLADSPAManager();
|
||||
|
||||
QLabel * label = new QLabel( _parent );
|
||||
label->setText( QWidget::tr( "Name: " ) + lm->getName( lkey ) );
|
||||
@@ -119,7 +119,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
void LadspaSubPluginFeatures::listSubPluginKeys(
|
||||
const Plugin::Descriptor * _desc, KeyList & _kl ) const
|
||||
{
|
||||
ladspa2LMMS * lm = engine::getLADSPAManager();
|
||||
ladspa2LMMS * lm = Engine::getLADSPAManager();
|
||||
|
||||
l_sortable_plugin_t plugins;
|
||||
switch( m_type )
|
||||
@@ -145,7 +145,7 @@ void LadspaSubPluginFeatures::listSubPluginKeys(
|
||||
it != plugins.end(); ++it )
|
||||
{
|
||||
if( lm->getDescription( ( *it ).second )->inputChannels <=
|
||||
engine::mixer()->audioDev()->channels() )
|
||||
Engine::mixer()->audioDev()->channels() )
|
||||
{
|
||||
_kl.push_back( ladspaKeyToSubPluginKey( _desc, ( *it ).first, ( *it ).second ) );
|
||||
}
|
||||
|
||||
@@ -96,10 +96,10 @@ bool MidiImport::tryImport( TrackContainer* tc )
|
||||
}
|
||||
|
||||
#ifdef LMMS_HAVE_FLUIDSYNTH
|
||||
if( engine::hasGUI() &&
|
||||
if( Engine::hasGUI() &&
|
||||
ConfigManager::inst()->defaultSoundfont().isEmpty() )
|
||||
{
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
QMessageBox::information( Engine::mainWindow(),
|
||||
tr( "Setup incomplete" ),
|
||||
tr( "You do not have set up a default soundfont in "
|
||||
"the settings dialog (Edit->Settings). "
|
||||
@@ -268,7 +268,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
|
||||
const int preTrackSteps = 2;
|
||||
QProgressDialog pd( TrackContainer::tr( "Importing MIDI-file..." ),
|
||||
TrackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() );
|
||||
TrackContainer::tr( "Cancel" ), 0, preTrackSteps, Engine::mainWindow() );
|
||||
pd.setWindowTitle( TrackContainer::tr( "Please wait..." ) );
|
||||
pd.setWindowModality(Qt::WindowModal);
|
||||
pd.setMinimumDuration( 0 );
|
||||
@@ -285,7 +285,7 @@ bool MidiImport::readSMF( TrackContainer* tc )
|
||||
smfMidiCC ccs[129];
|
||||
smfMidiChannel chs[256];
|
||||
|
||||
MeterModel & timeSigMM = engine::getSong()->getTimeSigModel();
|
||||
MeterModel & timeSigMM = Engine::getSong()->getTimeSigModel();
|
||||
AutomationPattern * timeSigNumeratorPat =
|
||||
AutomationPattern::globalAutomationPattern( &timeSigMM.numeratorModel() );
|
||||
AutomationPattern * timeSigDenominatorPat =
|
||||
|
||||
@@ -127,7 +127,7 @@ bool SpectrumAnalyzer::processAudioBuffer( sampleFrame* _buf, const fpp_t _frame
|
||||
|
||||
// hanming( m_buffer, FFT_BUFFER_SIZE, HAMMING );
|
||||
|
||||
const sample_rate_t sr = engine::mixer()->processingSampleRate();
|
||||
const sample_rate_t sr = Engine::mixer()->processingSampleRate();
|
||||
const int LOWEST_FREQ = 0;
|
||||
const int HIGHEST_FREQ = sr / 2;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
m_background( PLUGIN_NAME::getIconPixmap( "spectrum_background" ).toImage() )
|
||||
{
|
||||
setFixedSize( 249, 151 );
|
||||
connect( engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) );
|
||||
connect( Engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) );
|
||||
setAttribute( Qt::WA_OpaquePaintEvent, true );
|
||||
}
|
||||
|
||||
|
||||
@@ -142,8 +142,8 @@ void VstEffect::openPlugin( const QString & _plugin )
|
||||
return;
|
||||
}
|
||||
|
||||
VstPlugin::connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) );
|
||||
m_plugin->setTempo( engine::getSong()->getTempo() );
|
||||
VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) );
|
||||
m_plugin->setTempo( Engine::getSong()->getTempo() );
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
m_vi->m_scrollArea = new QScrollArea( widget );
|
||||
l = new QGridLayout( widget );
|
||||
|
||||
m_vi->m_subWindow = engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
m_vi->m_subWindow = Engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
|
||||
m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
|
||||
m_vi->m_subWindow->setFixedSize( 960, 300);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <samplerate.h>
|
||||
|
||||
#include "audio_file_processor.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -293,7 +293,7 @@ QString audioFileProcessor::nodeName( void ) const
|
||||
int audioFileProcessor::getBeatLen( NotePlayHandle * _n ) const
|
||||
{
|
||||
const float freq_factor = BaseFreq / _n->frequency() *
|
||||
engine::mixer()->processingSampleRate() / engine::mixer()->baseSampleRate();
|
||||
Engine::mixer()->processingSampleRate() / Engine::mixer()->baseSampleRate();
|
||||
|
||||
return static_cast<int>( floorf( ( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() ) * freq_factor ) );
|
||||
}
|
||||
@@ -708,7 +708,7 @@ void AudioFileProcessorView::openAudioFile( void )
|
||||
if( af != "" )
|
||||
{
|
||||
castModel<audioFileProcessor>()->setAudioFile( af );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "bit_invader.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "graph.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
@@ -279,7 +279,7 @@ void bitInvader::playNote( NotePlayHandle * _n,
|
||||
m_graph.length(),
|
||||
_n,
|
||||
m_interpolation.value(), factor,
|
||||
engine::mixer()->processingSampleRate() );
|
||||
Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
@@ -472,7 +472,7 @@ void bitInvaderView::modelChanged()
|
||||
void bitInvaderView::sinWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ void bitInvaderView::sinWaveClicked()
|
||||
void bitInvaderView::triangleWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ void bitInvaderView::triangleWaveClicked()
|
||||
void bitInvaderView::sawWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ void bitInvaderView::sawWaveClicked()
|
||||
void bitInvaderView::sqrWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -508,7 +508,7 @@ void bitInvaderView::sqrWaveClicked()
|
||||
void bitInvaderView::noiseWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToNoise();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ void bitInvaderView::usrWaveClicked()
|
||||
{
|
||||
QString fileName = m_graph->model()->setWaveToUser();
|
||||
toolTip::add( m_usrWaveBtn, fileName );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
/*
|
||||
m_graph->model()->setWaveToNoise();
|
||||
engine::getSong()->setModified();
|
||||
@@ -554,7 +554,7 @@ void bitInvaderView::usrWaveClicked()
|
||||
void bitInvaderView::smoothClicked()
|
||||
{
|
||||
m_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ void bitInvaderView::smoothClicked()
|
||||
void bitInvaderView::interpolationToggled( bool value )
|
||||
{
|
||||
m_graph->setGraphStyle( value ? graph::LinearStyle : graph::NearestStyle);
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ void bitInvaderView::interpolationToggled( bool value )
|
||||
|
||||
void bitInvaderView::normalizeToggled( bool value )
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "delaycontrols.h"
|
||||
#include "delayeffect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
DelayControls::DelayControls( DelayEffect* effect ):
|
||||
@@ -37,7 +37,7 @@ DelayControls::DelayControls( DelayEffect* effect ):
|
||||
m_lfoTimeModel(2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Lfo Frequency" ) ),
|
||||
m_lfoAmountModel(0.0f,0.0f,0.1f,0.0001f, this, tr ( "Lfo Amount" ) )
|
||||
{
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "delayeffect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "embed.cpp"
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ DelayEffect::DelayEffect( Model* parent, const Plugin::Descriptor::SubPluginFeat
|
||||
m_delayControls( this )
|
||||
{
|
||||
m_delay = 0;
|
||||
m_delay = new StereoDelay( 20, engine::mixer()->processingSampleRate() );
|
||||
m_lfo = new Lfo( engine::mixer()->processingSampleRate() );
|
||||
m_delay = new StereoDelay( 20, Engine::mixer()->processingSampleRate() );
|
||||
m_lfo = new Lfo( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
double outSum = 0.0;
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
const float length = m_delayControls.m_delayTimeModel.value() * engine::mixer()->processingSampleRate();
|
||||
const float length = m_delayControls.m_delayTimeModel.value() * Engine::mixer()->processingSampleRate();
|
||||
m_lfo->setAmplitude( m_delayControls.m_lfoAmountModel.value() );
|
||||
m_lfo->setFrequency( 1.0 / m_delayControls.m_lfoTimeModel.value() );
|
||||
m_delay->setFeedback( m_delayControls.m_feedbackModel.value() );
|
||||
@@ -104,8 +104,8 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
|
||||
void DelayEffect::changeSampleRate()
|
||||
{
|
||||
m_lfo->setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_delay->setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_lfo->setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
m_delay->setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ dynProcEffect::dynProcEffect( Model * _parent,
|
||||
m_dpControls( this )
|
||||
{
|
||||
m_currentPeak[0] = m_currentPeak[1] = DYN_NOISE_FLOOR;
|
||||
m_rms[0] = new RmsHelper( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1] = new RmsHelper( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[0] = new RmsHelper( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1] = new RmsHelper( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
calcAttack();
|
||||
calcRelease();
|
||||
}
|
||||
@@ -76,12 +76,12 @@ dynProcEffect::~dynProcEffect()
|
||||
|
||||
inline void dynProcEffect::calcAttack()
|
||||
{
|
||||
m_attCoeff = exp10( ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
m_attCoeff = exp10( ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
inline void dynProcEffect::calcRelease()
|
||||
{
|
||||
m_relCoeff = exp10( ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() );
|
||||
m_relCoeff = exp10( ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ bool dynProcEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
if( m_needsUpdate )
|
||||
{
|
||||
m_rms[0]->setSize( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1]->setSize( 64 * engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[0]->setSize( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
m_rms[1]->setSize( 64 * Engine::mixer()->processingSampleRate() / 44100 );
|
||||
calcAttack();
|
||||
calcRelease();
|
||||
m_needsUpdate = false;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "dynamics_processor.h"
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ dynProcControls::dynProcControls( dynProcEffect * _eff ) :
|
||||
{
|
||||
connect( &m_wavegraphModel, SIGNAL( samplesChanged( int, int ) ),
|
||||
this, SLOT( samplesChanged( int, int ) ) );
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
|
||||
setDefaultShape();
|
||||
|
||||
@@ -63,7 +63,7 @@ void dynProcControls::sampleRateChanged()
|
||||
|
||||
void dynProcControls::samplesChanged( int _begin, int _end)
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -126,13 +126,13 @@ void dynProcControls::setDefaultShape()
|
||||
void dynProcControls::resetClicked()
|
||||
{
|
||||
setDefaultShape();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::smoothClicked()
|
||||
{
|
||||
m_wavegraphModel.smoothNonCyclic();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::addOneClicked()
|
||||
@@ -141,7 +141,7 @@ void dynProcControls::addOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] * onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void dynProcControls::subOneClicked()
|
||||
@@ -150,7 +150,7 @@ void dynProcControls::subOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] / onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "debug.h"
|
||||
#include "Effect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "FxMixer.h"
|
||||
#include "FxMixerView.h"
|
||||
#include "group_box.h"
|
||||
@@ -767,8 +767,8 @@ bool FlpImport::tryImport( TrackContainer* tc )
|
||||
|
||||
int cur_channel = -1;
|
||||
|
||||
const bool is_journ = engine::projectJournal()->isJournalling();
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
const bool is_journ = Engine::projectJournal()->isJournalling();
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
|
||||
while( file().atEnd() == false )
|
||||
@@ -1411,22 +1411,22 @@ else
|
||||
|
||||
|
||||
// now create a project from FL_Project data structure
|
||||
engine::getSong()->clearProject();
|
||||
Engine::getSong()->clearProject();
|
||||
|
||||
// configure the mixer
|
||||
for( int i=0; i<NumFLFxChannels; ++i )
|
||||
{
|
||||
engine::fxMixer()->createChannel();
|
||||
Engine::fxMixer()->createChannel();
|
||||
}
|
||||
engine::fxMixerView()->refreshDisplay();
|
||||
Engine::fxMixerView()->refreshDisplay();
|
||||
|
||||
// set global parameters
|
||||
engine::getSong()->setMasterVolume( p.mainVolume );
|
||||
engine::getSong()->setMasterPitch( p.mainPitch );
|
||||
engine::getSong()->setTempo( p.tempo );
|
||||
Engine::getSong()->setMasterVolume( p.mainVolume );
|
||||
Engine::getSong()->setMasterPitch( p.mainPitch );
|
||||
Engine::getSong()->setTempo( p.tempo );
|
||||
|
||||
// set project notes
|
||||
engine::getProjectNotes()->setText( p.projectNotes );
|
||||
Engine::getProjectNotes()->setText( p.projectNotes );
|
||||
|
||||
|
||||
progressDialog.setMaximum( p.maxPatterns + p.channels.size() +
|
||||
@@ -1437,11 +1437,11 @@ else
|
||||
QList<bbTrack *> bb_tracks;
|
||||
QList<InstrumentTrack *> i_tracks;
|
||||
|
||||
while( engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns )
|
||||
while( Engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns )
|
||||
{
|
||||
const int cur_pat = bb_tracks.size();
|
||||
bbTrack * bbt = dynamic_cast<bbTrack *>(
|
||||
Track::create( Track::BBTrack, engine::getSong() ) );
|
||||
Track::create( Track::BBTrack, Engine::getSong() ) );
|
||||
if( p.patternNames.contains( cur_pat ) )
|
||||
{
|
||||
bbt->setName( p.patternNames[cur_pat] );
|
||||
@@ -1457,8 +1457,8 @@ else
|
||||
{
|
||||
InstrumentTrack * t = dynamic_cast<InstrumentTrack *>(
|
||||
Track::create( Track::InstrumentTrack,
|
||||
engine::getBBTrackContainer() ) );
|
||||
engine::getBBTrackContainer()->updateAfterTrackAdd();
|
||||
Engine::getBBTrackContainer() ) );
|
||||
Engine::getBBTrackContainer()->updateAfterTrackAdd();
|
||||
i_tracks.push_back( t );
|
||||
switch( it->pluginType )
|
||||
{
|
||||
@@ -1657,7 +1657,7 @@ p->putValue( jt->pos, value, false );
|
||||
|
||||
for( int fx_ch = 0; fx_ch <= NumFLFxChannels ; ++fx_ch )
|
||||
{
|
||||
FxChannel * ch = engine::fxMixer()->effectChannel( fx_ch );
|
||||
FxChannel * ch = Engine::fxMixer()->effectChannel( fx_ch );
|
||||
if( !ch )
|
||||
{
|
||||
continue;
|
||||
@@ -1719,7 +1719,7 @@ p->putValue( jt->pos, value, false );
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EffectChain * ec = &engine::fxMixer()->
|
||||
EffectChain * ec = &Engine::fxMixer()->
|
||||
effectChannel( it->fxChannel )->m_fxChain;
|
||||
qDebug( "adding %s to %d\n", effName.toUtf8().constData(),
|
||||
it->fxChannel );
|
||||
@@ -1763,14 +1763,14 @@ p->putValue( jt->pos, value, false );
|
||||
|
||||
|
||||
// set current pattern
|
||||
if( p.activeEditPattern < engine::getBBTrackContainer()->numOfBBs() )
|
||||
if( p.activeEditPattern < Engine::getBBTrackContainer()->numOfBBs() )
|
||||
{
|
||||
engine::getBBTrackContainer()->setCurrentBB(
|
||||
Engine::getBBTrackContainer()->setCurrentBB(
|
||||
p.activeEditPattern );
|
||||
}
|
||||
|
||||
// restore journalling settings
|
||||
engine::projectJournal()->setJournalling( is_journ );
|
||||
Engine::projectJournal()->setJournalling( is_journ );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QPainter>
|
||||
|
||||
#include "kicker.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -166,7 +166,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n,
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
const float decfr = m_decayModel.value() *
|
||||
engine::mixer()->processingSampleRate() / 1000.0f;
|
||||
Engine::mixer()->processingSampleRate() / 1000.0f;
|
||||
const f_cnt_t tfp = _n->totalFramesPlayed();
|
||||
|
||||
if ( tfp == 0 )
|
||||
@@ -190,7 +190,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n,
|
||||
}
|
||||
|
||||
SweepOsc * so = static_cast<SweepOsc *>( _n->m_pluginData );
|
||||
so->update( _working_buffer + offset, frames, engine::mixer()->processingSampleRate() );
|
||||
so->update( _working_buffer + offset, frames, Engine::mixer()->processingSampleRate() );
|
||||
|
||||
if( _n->isReleased() )
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "AudioDevice.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "Mixer.h"
|
||||
|
||||
@@ -41,7 +41,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent,
|
||||
ladspaPluginType _type ) :
|
||||
QWidget( _parent )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
l_sortable_plugin_t plugins;
|
||||
switch( _type )
|
||||
@@ -74,7 +74,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent,
|
||||
{
|
||||
if( _type != VALID ||
|
||||
manager->getDescription( ( *it ).second )->inputChannels
|
||||
<= engine::mixer()->audioDev()->channels() )
|
||||
<= Engine::mixer()->audioDev()->channels() )
|
||||
{
|
||||
pluginNames.push_back( ( *it ).first );
|
||||
m_pluginKeys.push_back( ( *it ).second );
|
||||
@@ -128,7 +128,7 @@ void ladspaDescription::update( const ladspa_key_t & _key )
|
||||
QVBoxLayout * layout = new QVBoxLayout( description );
|
||||
layout->setSizeConstraint( QLayout::SetFixedSize );
|
||||
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
QLabel * name = new QLabel( description );
|
||||
name->setText( QWidget::tr( "Name: " ) + manager->getName( _key ) );
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
#include <QTableWidget>
|
||||
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ladspa_2_lmms.h"
|
||||
#include "Mixer.h"
|
||||
|
||||
|
||||
ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key )
|
||||
{
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
ladspa2LMMS * manager = Engine::getLADSPAManager();
|
||||
|
||||
setWindowIcon( embed::getIconPixmap( "ports" ) );
|
||||
setWindowTitle( tr( "Ports" ) );
|
||||
@@ -87,11 +87,11 @@ ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key )
|
||||
{
|
||||
if( min != NOHINT )
|
||||
{
|
||||
min *= engine::mixer()->processingSampleRate();
|
||||
min *= Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
if( max != NOHINT )
|
||||
{
|
||||
max *= engine::mixer()->processingSampleRate();
|
||||
max *= Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "lb302.h"
|
||||
#include "automatable_button.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
@@ -109,8 +109,8 @@ void lb302Filter::recalc()
|
||||
{
|
||||
vcf_e1 = exp(6.109 + 1.5876*(fs->envmod) + 2.1553*(fs->cutoff) - 1.2*(1.0-(fs->reso)));
|
||||
vcf_e0 = exp(5.613 - 0.8*(fs->envmod) + 2.1553*(fs->cutoff) - 0.7696*(1.0-(fs->reso)));
|
||||
vcf_e0*=M_PI/engine::mixer()->processingSampleRate();
|
||||
vcf_e1*=M_PI/engine::mixer()->processingSampleRate();
|
||||
vcf_e0*=M_PI/Engine::mixer()->processingSampleRate();
|
||||
vcf_e1*=M_PI/Engine::mixer()->processingSampleRate();
|
||||
vcf_e1 -= vcf_e0;
|
||||
|
||||
vcf_rescoeff = exp(-1.20 + 3.455*(fs->reso));
|
||||
@@ -226,14 +226,14 @@ void lb302Filter3Pole::envRecalc()
|
||||
w = vcf_e0 + vcf_c0;
|
||||
k = (fs->cutoff > 0.975)?0.975:fs->cutoff;
|
||||
kfco = 50.f + (k)*((2300.f-1600.f*(fs->envmod))+(w) *
|
||||
(700.f+1500.f*(k)+(1500.f+(k)*(engine::mixer()->processingSampleRate()/2.f-6000.f)) *
|
||||
(700.f+1500.f*(k)+(1500.f+(k)*(Engine::mixer()->processingSampleRate()/2.f-6000.f)) *
|
||||
(fs->envmod)) );
|
||||
//+iacc*(.3+.7*kfco*kenvmod)*kaccent*kaccurve*2000
|
||||
|
||||
|
||||
#ifdef LB_24_IGNORE_ENVELOPE
|
||||
// kfcn = fs->cutoff;
|
||||
kfcn = 2.0 * kfco / engine::mixer()->processingSampleRate();
|
||||
kfcn = 2.0 * kfco / Engine::mixer()->processingSampleRate();
|
||||
#else
|
||||
kfcn = w;
|
||||
#endif
|
||||
@@ -284,7 +284,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
|
||||
{
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged( ) ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged( ) ),
|
||||
this, SLOT ( filterChanged( ) ) );
|
||||
|
||||
connect( &vcf_cut_knob, SIGNAL( dataChanged( ) ),
|
||||
@@ -354,7 +354,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
filterChanged();
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ void lb302Synth::filterChanged()
|
||||
|
||||
float d = 0.2 + (2.3*vcf_dec_knob.value());
|
||||
|
||||
d *= engine::mixer()->processingSampleRate(); // d *= smpl rate
|
||||
d *= Engine::mixer()->processingSampleRate(); // d *= smpl rate
|
||||
fs.envdecay = pow(0.1, 1.0/d * ENVINC); // decay is 0.1 to the 1/d * ENVINC
|
||||
// vcf_envdecay is now adjusted for both
|
||||
// sampling rate and ENVINC
|
||||
@@ -463,12 +463,12 @@ inline int MIN(int a, int b) {
|
||||
}
|
||||
|
||||
inline float GET_INC(float freq) {
|
||||
return freq/engine::mixer()->processingSampleRate(); // TODO: Use actual sampling rate.
|
||||
return freq/Engine::mixer()->processingSampleRate(); // TODO: Use actual sampling rate.
|
||||
}
|
||||
|
||||
int lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
{
|
||||
const float sampleRatio = 44100.f / engine::mixer()->processingSampleRate();
|
||||
const float sampleRatio = 44100.f / Engine::mixer()->processingSampleRate();
|
||||
float w;
|
||||
float samp;
|
||||
|
||||
@@ -643,7 +643,7 @@ int lb302Synth::process(sampleFrame *outbuf, const int size)
|
||||
// Handle Envelope
|
||||
if(vca_mode==0) {
|
||||
vca_a+=(vca_a0-vca_a)*vca_attack;
|
||||
if(sample_cnt>=0.5*engine::mixer()->processingSampleRate())
|
||||
if(sample_cnt>=0.5*Engine::mixer()->processingSampleRate())
|
||||
vca_mode = 2;
|
||||
}
|
||||
else if(vca_mode == 1) {
|
||||
@@ -793,7 +793,7 @@ void lb302Synth::play( sampleFrame * _working_buffer )
|
||||
processNote( m_notes.takeFirst() );
|
||||
};
|
||||
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
process( _working_buffer, frames );
|
||||
instrumentTrack()->processAudioBuffer( _working_buffer, frames, NULL );
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "Monstro.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "templates.h"
|
||||
#include "gui_templates.h"
|
||||
@@ -1012,9 +1012,9 @@ MonstroInstrument::MonstroInstrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
// updateSampleRate
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ) );
|
||||
|
||||
m_fpp = engine::mixer()->framesPerPeriod();
|
||||
m_fpp = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
updateSamplerate();
|
||||
updateVolume1();
|
||||
@@ -1425,7 +1425,7 @@ void MonstroInstrument::updateLFOAtts()
|
||||
|
||||
void MonstroInstrument::updateSamplerate()
|
||||
{
|
||||
m_samplerate = engine::mixer()->processingSampleRate();
|
||||
m_samplerate = Engine::mixer()->processingSampleRate();
|
||||
|
||||
m_integrator = 0.5f - ( 0.5f - INTEGRATOR ) * 44100.0f / m_samplerate;
|
||||
m_fmCorrection = 44100.f / m_samplerate * FM_AMOUNT;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "Nes.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
@@ -560,7 +560,7 @@ void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer )
|
||||
|
||||
if ( n->totalFramesPlayed() == 0 || n->m_pluginData == NULL )
|
||||
{
|
||||
NesObject * nes = new NesObject( this, engine::mixer()->processingSampleRate(), n );
|
||||
NesObject * nes = new NesObject( this, Engine::mixer()->processingSampleRate(), n );
|
||||
n->m_pluginData = nes;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "mididata.h"
|
||||
#include "debug.h"
|
||||
#include "Instrument.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
|
||||
@@ -139,14 +139,14 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
{
|
||||
// Connect the plugin to the mixer...
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
// Voices are laid out in a funny way...
|
||||
// adlib_opadd = {0x00, 0x01, 0x02, 0x08, 0x09, 0x0A, 0x10, 0x11, 0x12};
|
||||
|
||||
// Create an emulator - samplerate, 16 bit, mono
|
||||
emulatorMutex.lock();
|
||||
theEmulator = new CTemuopl(engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator = new CTemuopl(Engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator->init();
|
||||
// Enable waveform selection
|
||||
theEmulator->write(0x01,0x20);
|
||||
@@ -163,7 +163,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
updatePatch();
|
||||
|
||||
// Can the buffer size change suddenly? I bet that would break lots of stuff
|
||||
frameCount = engine::mixer()->framesPerPeriod();
|
||||
frameCount = Engine::mixer()->framesPerPeriod();
|
||||
renderbuffer = new short[frameCount];
|
||||
|
||||
// Some kind of sane defaults
|
||||
@@ -173,7 +173,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
tuneEqual(69, 440);
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( reloadEmulator() ) );
|
||||
// Connect knobs
|
||||
// This one's for testing...
|
||||
@@ -221,7 +221,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
opl2instrument::~opl2instrument() {
|
||||
delete theEmulator;
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
delete [] renderbuffer;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ opl2instrument::~opl2instrument() {
|
||||
void opl2instrument::reloadEmulator() {
|
||||
delete theEmulator;
|
||||
emulatorMutex.lock();
|
||||
theEmulator = new CTemuopl(engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator = new CTemuopl(Engine::mixer()->processingSampleRate(), true, false);
|
||||
theEmulator->init();
|
||||
theEmulator->write(0x01,0x20);
|
||||
emulatorMutex.unlock();
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -143,7 +143,7 @@ organicInstrument::organicInstrument( InstrumentTrack * _instrument_track ) :
|
||||
}
|
||||
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateAllDetuning() ) );
|
||||
}
|
||||
|
||||
@@ -628,10 +628,10 @@ void OscillatorObject::updateDetuning()
|
||||
{
|
||||
m_detuningLeft = powf( 2.0f, organicInstrument::s_harmonics[ static_cast<int>( m_harmModel.value() ) ]
|
||||
+ (float)m_detuneModel.value() * CENT ) /
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
m_detuningRight = powf( 2.0f, organicInstrument::s_harmonics[ static_cast<int>( m_harmModel.value() ) ]
|
||||
- (float)m_detuneModel.value() * CENT ) /
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "NotePlayHandle.h"
|
||||
#include "pixmap_button.h"
|
||||
#include "tooltip.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "graph.h"
|
||||
|
||||
#include "embed.cpp"
|
||||
@@ -237,7 +237,7 @@ void papuInstrument::playNote( NotePlayHandle * _n,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
const f_cnt_t tfp = _n->totalFramesPlayed();
|
||||
const int samplerate = engine::mixer()->processingSampleRate();
|
||||
const int samplerate = Engine::mixer()->processingSampleRate();
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "endian_handling.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -551,7 +551,7 @@ void PatmanView::openFile( void )
|
||||
if( f != "" )
|
||||
{
|
||||
m_pi->setFile( f );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ PeakControllerEffect::PeakControllerEffect(
|
||||
m_lastSample( 0 ),
|
||||
m_autoController( NULL )
|
||||
{
|
||||
m_autoController = new PeakController( engine::getSong(), this );
|
||||
engine::getSong()->addController( m_autoController );
|
||||
m_autoController = new PeakController( Engine::getSong(), this );
|
||||
Engine::getSong()->addController( m_autoController );
|
||||
PeakController::s_effects.append( this );
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ PeakControllerEffect::~PeakControllerEffect()
|
||||
if( idx >= 0 )
|
||||
{
|
||||
PeakController::s_effects.remove( idx );
|
||||
engine::getSong()->removeController( m_autoController );
|
||||
Engine::getSong()->removeController( m_autoController );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
* m_effectId is copied, then there would be two instruments
|
||||
* having the same id.
|
||||
*/
|
||||
if( engine::getSong()->isLoadingProject() == true )
|
||||
if( Engine::getSong()->isLoadingProject() == true )
|
||||
{
|
||||
m_effect->m_effectId = _this.attribute( "effectId" ).toInt();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "FileDialog.h"
|
||||
#include "sf2_player.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -119,7 +119,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
m_synth = new_fluid_synth( m_settings );
|
||||
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
loadFile( ConfigManager::inst()->defaultSoundfont() );
|
||||
|
||||
@@ -133,7 +133,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
connect( &m_bankNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) );
|
||||
connect( &m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
|
||||
// Gain
|
||||
connect( &m_gain, SIGNAL( dataChanged() ), this, SLOT( updateGain() ) );
|
||||
@@ -158,7 +158,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
sf2Instrument::~sf2Instrument()
|
||||
{
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
freeFont();
|
||||
delete_fluid_synth( m_synth );
|
||||
delete_fluid_settings( m_settings );
|
||||
@@ -465,7 +465,7 @@ void sf2Instrument::updateSampleRate()
|
||||
double tempRate;
|
||||
|
||||
// Set & get, returns the true sample rate
|
||||
fluid_settings_setnum( m_settings, (char *) "synth.sample-rate", engine::mixer()->processingSampleRate() );
|
||||
fluid_settings_setnum( m_settings, (char *) "synth.sample-rate", Engine::mixer()->processingSampleRate() );
|
||||
fluid_settings_getnum( m_settings, (char *) "synth.sample-rate", &tempRate );
|
||||
m_internalSampleRate = static_cast<int>( tempRate );
|
||||
|
||||
@@ -495,7 +495,7 @@ void sf2Instrument::updateSampleRate()
|
||||
}
|
||||
|
||||
m_synthMutex.lock();
|
||||
if( engine::mixer()->currentQualitySettings().interpolation >=
|
||||
if( Engine::mixer()->currentQualitySettings().interpolation >=
|
||||
Mixer::qualitySettings::Interpolation_SincFastest )
|
||||
{
|
||||
fluid_synth_set_interp_method( m_synth, -1, FLUID_INTERP_7THORDER );
|
||||
@@ -505,7 +505,7 @@ void sf2Instrument::updateSampleRate()
|
||||
fluid_synth_set_interp_method( m_synth, -1, FLUID_INTERP_DEFAULT );
|
||||
}
|
||||
m_synthMutex.unlock();
|
||||
if( m_internalSampleRate < engine::mixer()->processingSampleRate() )
|
||||
if( m_internalSampleRate < Engine::mixer()->processingSampleRate() )
|
||||
{
|
||||
m_synthMutex.lock();
|
||||
if( m_srcState != NULL )
|
||||
@@ -513,7 +513,7 @@ void sf2Instrument::updateSampleRate()
|
||||
src_delete( m_srcState );
|
||||
}
|
||||
int error;
|
||||
m_srcState = src_new( engine::mixer()->currentQualitySettings().libsrcInterpolation(), DEFAULT_CHANNELS, &error );
|
||||
m_srcState = src_new( Engine::mixer()->currentQualitySettings().libsrcInterpolation(), DEFAULT_CHANNELS, &error );
|
||||
if( m_srcState == NULL || error )
|
||||
{
|
||||
qCritical( "error while creating libsamplerate data structure in Sf2Instrument::updateSampleRate()" );
|
||||
@@ -641,7 +641,7 @@ void sf2Instrument::noteOff( SF2PluginData * n )
|
||||
|
||||
void sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
{
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
// set midi pitch for this period
|
||||
const int currentMidiPitch = instrumentTrack()->midiPitch();
|
||||
@@ -722,10 +722,10 @@ void sf2Instrument::play( sampleFrame * _working_buffer )
|
||||
void sf2Instrument::renderFrames( f_cnt_t frames, sampleFrame * buf )
|
||||
{
|
||||
m_synthMutex.lock();
|
||||
if( m_internalSampleRate < engine::mixer()->processingSampleRate() &&
|
||||
if( m_internalSampleRate < Engine::mixer()->processingSampleRate() &&
|
||||
m_srcState != NULL )
|
||||
{
|
||||
const fpp_t f = frames * m_internalSampleRate / engine::mixer()->processingSampleRate();
|
||||
const fpp_t f = frames * m_internalSampleRate / Engine::mixer()->processingSampleRate();
|
||||
#ifdef __GNUC__
|
||||
sampleFrame tmp[f];
|
||||
#else
|
||||
@@ -1084,7 +1084,7 @@ void sf2InstrumentView::showFileDialog()
|
||||
if( f != "" )
|
||||
{
|
||||
k->openFile( f );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ float frnd(float range)
|
||||
#include <QDomElement>
|
||||
|
||||
#include "sfxr.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -451,7 +451,7 @@ QString sfxrInstrument::nodeName() const
|
||||
|
||||
void sfxrInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
{
|
||||
float currentSampleRate = engine::mixer()->processingSampleRate();
|
||||
float currentSampleRate = Engine::mixer()->processingSampleRate();
|
||||
|
||||
fpp_t frameNum = _n->framesLeftForCurrentPeriod();
|
||||
const f_cnt_t offset = _n->noteOffset();
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "sid.h"
|
||||
|
||||
#include "sid_instrument.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -230,7 +230,7 @@ QString sidInstrument::nodeName() const
|
||||
|
||||
f_cnt_t sidInstrument::desiredReleaseFrames() const
|
||||
{
|
||||
const float samplerate = engine::mixer()->processingSampleRate();
|
||||
const float samplerate = Engine::mixer()->processingSampleRate();
|
||||
int maxrel = 0;
|
||||
for( int i = 0 ; i < 3 ; ++i )
|
||||
{
|
||||
@@ -305,7 +305,7 @@ void sidInstrument::playNote( NotePlayHandle * _n,
|
||||
const f_cnt_t tfp = _n->totalFramesPlayed();
|
||||
|
||||
const int clockrate = C64_PAL_CYCLES_PER_SEC;
|
||||
const int samplerate = engine::mixer()->processingSampleRate();
|
||||
const int samplerate = Engine::mixer()->processingSampleRate();
|
||||
|
||||
if ( tfp == 0 )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "Effect.h"
|
||||
#include "DspEffectLibrary.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "stereoenhancer_controls.h"
|
||||
|
||||
class stereoEnhancerEffect : public Effect
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "TripleOscillator.h"
|
||||
#include "automatable_button.h"
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "knob.h"
|
||||
#include "NotePlayHandle.h"
|
||||
@@ -175,7 +175,7 @@ void OscillatorObject::updateDetuningLeft()
|
||||
{
|
||||
m_detuningLeft = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f
|
||||
+ (float)m_fineLeftModel.value() ) / 1200.0f )
|
||||
/ engine::mixer()->processingSampleRate();
|
||||
/ Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ void OscillatorObject::updateDetuningRight()
|
||||
{
|
||||
m_detuningRight = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f
|
||||
+ (float)m_fineRightModel.value() ) / 1200.0f )
|
||||
/ engine::mixer()->processingSampleRate();
|
||||
/ Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ TripleOscillator::TripleOscillator( InstrumentTrack * _instrument_track ) :
|
||||
|
||||
}
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateAllDetuning() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QMenu>
|
||||
#include <QDomElement>
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "InstrumentPlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
@@ -83,7 +83,7 @@ vestigeInstrument::vestigeInstrument( InstrumentTrack * _instrument_track ) :
|
||||
{
|
||||
// now we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ vestigeInstrument::~vestigeInstrument()
|
||||
knobFModel = NULL;
|
||||
}
|
||||
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
closePlugin();
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ void vestigeInstrument::play( sampleFrame * _buf )
|
||||
|
||||
m_plugin->process( NULL, _buf );
|
||||
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
instrumentTrack()->processAudioBuffer( _buf, frames, NULL );
|
||||
|
||||
@@ -647,7 +647,7 @@ void VestigeInstrumentView::openPlugin()
|
||||
{
|
||||
return;
|
||||
}
|
||||
engine::mixer()->lock();
|
||||
Engine::mixer()->lock();
|
||||
|
||||
if (m_vi->p_subWindow != NULL) {
|
||||
delete m_vi->p_subWindow;
|
||||
@@ -655,7 +655,7 @@ void VestigeInstrumentView::openPlugin()
|
||||
}
|
||||
|
||||
m_vi->loadFile( ofd.selectedFiles()[0] );
|
||||
engine::mixer()->unlock();
|
||||
Engine::mixer()->unlock();
|
||||
if( m_vi->m_plugin && m_vi->m_plugin->pluginWidget() )
|
||||
{
|
||||
m_vi->m_plugin->pluginWidget()->setWindowIcon(
|
||||
@@ -881,7 +881,7 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
|
||||
widget = new QWidget(this);
|
||||
l = new QGridLayout( this );
|
||||
|
||||
m_vi->m_subWindow = engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
m_vi->m_subWindow = Engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow |
|
||||
Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
|
||||
m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::MinimumExpanding );
|
||||
m_vi->m_subWindow->setFixedWidth( 960 );
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QWhatsThis>
|
||||
|
||||
#include "vibed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "tooltip.h"
|
||||
@@ -277,7 +277,7 @@ void vibed::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer )
|
||||
if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL )
|
||||
{
|
||||
_n->m_pluginData = new stringContainer( _n->frequency(),
|
||||
engine::mixer()->processingSampleRate(),
|
||||
Engine::mixer()->processingSampleRate(),
|
||||
__sampleLength );
|
||||
|
||||
for( int i = 0; i < 9; ++i )
|
||||
@@ -690,7 +690,7 @@ void vibedView::showString( int _string )
|
||||
void vibedView::sinWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -698,7 +698,7 @@ void vibedView::sinWaveClicked()
|
||||
void vibedView::triangleWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -706,7 +706,7 @@ void vibedView::triangleWaveClicked()
|
||||
void vibedView::sawWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -714,7 +714,7 @@ void vibedView::sawWaveClicked()
|
||||
void vibedView::sqrWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -722,7 +722,7 @@ void vibedView::sqrWaveClicked()
|
||||
void vibedView::noiseWaveClicked()
|
||||
{
|
||||
m_graph->model()->setWaveToNoise();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -731,7 +731,7 @@ void vibedView::usrWaveClicked()
|
||||
{
|
||||
QString fileName = m_graph->model()->setWaveToUser();
|
||||
toolTip::add( m_usrWaveBtn, fileName );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -739,7 +739,7 @@ void vibedView::usrWaveClicked()
|
||||
void vibedView::smoothClicked()
|
||||
{
|
||||
m_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -747,7 +747,7 @@ void vibedView::smoothClicked()
|
||||
void vibedView::normalizeClicked()
|
||||
{
|
||||
m_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "templates.h"
|
||||
#include "interpolation.h"
|
||||
#include "Mixer.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
|
||||
|
||||
vibratingString::vibratingString( float _pitch,
|
||||
@@ -42,7 +42,7 @@ vibratingString::vibratingString( float _pitch,
|
||||
float _detune,
|
||||
bool _state ) :
|
||||
m_oversample( 2 * _oversample / (int)( _sample_rate /
|
||||
engine::mixer()->baseSampleRate() ) ),
|
||||
Engine::mixer()->baseSampleRate() ) ),
|
||||
m_randomize( _randomize ),
|
||||
m_stringLoss( 1.0f - _string_loss ),
|
||||
m_state( 0.1f )
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#endif
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Song.h"
|
||||
#include "templates.h"
|
||||
@@ -108,11 +108,11 @@ VstPlugin::VstPlugin( const QString & _plugin ) :
|
||||
}
|
||||
#endif
|
||||
|
||||
setTempo( engine::getSong()->getTempo() );
|
||||
setTempo( Engine::getSong()->getTempo() );
|
||||
|
||||
connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
this, SLOT( setTempo( bpm_t ) ) );
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateSampleRate() ) );
|
||||
|
||||
// update once per second
|
||||
@@ -237,7 +237,7 @@ void VstPlugin::showEditor( QWidget * _parent, bool isEffect )
|
||||
if( _parent == NULL )
|
||||
{
|
||||
vstSubWin * sw = new vstSubWin(
|
||||
engine::mainWindow()->workspace() );
|
||||
Engine::mainWindow()->workspace() );
|
||||
if( isEffect )
|
||||
{
|
||||
sw->setAttribute( Qt::WA_TranslucentBackground );
|
||||
@@ -377,7 +377,7 @@ void VstPlugin::updateSampleRate()
|
||||
{
|
||||
lock();
|
||||
sendMessage( message( IdSampleRateInformation ).
|
||||
addInt( engine::mixer()->processingSampleRate() ) );
|
||||
addInt( Engine::mixer()->processingSampleRate() ) );
|
||||
unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "Watsyn.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "templates.h"
|
||||
#include "tooltip.h"
|
||||
@@ -337,8 +337,8 @@ void WatsynInstrument::playNote( NotePlayHandle * _n,
|
||||
&B1_wave[0],
|
||||
&B2_wave[0],
|
||||
m_amod.value(), m_bmod.value(),
|
||||
engine::mixer()->processingSampleRate(), _n,
|
||||
engine::mixer()->framesPerPeriod(), this );
|
||||
Engine::mixer()->processingSampleRate(), _n,
|
||||
Engine::mixer()->framesPerPeriod(), this );
|
||||
|
||||
_n->m_pluginData = w;
|
||||
}
|
||||
@@ -983,19 +983,19 @@ void WatsynView::sinWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToSine();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1007,19 +1007,19 @@ void WatsynView::triWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToTriangle();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1031,19 +1031,19 @@ void WatsynView::sawWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToSaw();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1055,19 +1055,19 @@ void WatsynView::sqrWaveClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToSquare();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1079,19 +1079,19 @@ void WatsynView::normalizeClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->normalize();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1103,19 +1103,19 @@ void WatsynView::invertClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->invert();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1127,19 +1127,19 @@ void WatsynView::smoothClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->smooth();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1151,19 +1151,19 @@ void WatsynView::phaseLeftClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->shiftPhase( -15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1175,19 +1175,19 @@ void WatsynView::phaseRightClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->shiftPhase( 15 );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1200,19 +1200,19 @@ void WatsynView::loadClicked()
|
||||
{
|
||||
case A1_OSC:
|
||||
a1_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case A2_OSC:
|
||||
a2_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B1_OSC:
|
||||
b1_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
case B2_OSC:
|
||||
b2_graph->model()->setWaveToUser();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "waveshaper.h"
|
||||
#include "base64.h"
|
||||
#include "graph.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ waveShaperControls::waveShaperControls( waveShaperEffect * _eff ) :
|
||||
|
||||
void waveShaperControls::samplesChanged( int _begin, int _end)
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -115,13 +115,13 @@ void waveShaperControls::setDefaultShape()
|
||||
void waveShaperControls::resetClicked()
|
||||
{
|
||||
setDefaultShape();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void waveShaperControls::smoothClicked()
|
||||
{
|
||||
m_wavegraphModel.smoothNonCyclic();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void waveShaperControls::addOneClicked()
|
||||
@@ -130,7 +130,7 @@ void waveShaperControls::addOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] * onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
void waveShaperControls::subOneClicked()
|
||||
@@ -139,7 +139,7 @@ void waveShaperControls::subOneClicked()
|
||||
{
|
||||
m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] / onedB, 1.0f ) );
|
||||
}
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <QPushButton>
|
||||
|
||||
#include "ZynAddSubFx.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "knob.h"
|
||||
#include "led_checkbox.h"
|
||||
#include "DataFile.h"
|
||||
@@ -130,9 +130,9 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument(
|
||||
|
||||
// now we need a play-handle which cares for calling play()
|
||||
InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack );
|
||||
engine::mixer()->addPlayHandle( iph );
|
||||
Engine::mixer()->addPlayHandle( iph );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( reloadPlugin() ) );
|
||||
|
||||
connect( instrumentTrack()->pitchRangeModel(), SIGNAL( dataChanged() ),
|
||||
@@ -144,7 +144,7 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument(
|
||||
|
||||
ZynAddSubFxInstrument::~ZynAddSubFxInstrument()
|
||||
{
|
||||
engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
Engine::mixer()->removePlayHandles( instrumentTrack() );
|
||||
|
||||
m_pluginMutex.lock();
|
||||
delete m_plugin;
|
||||
@@ -333,7 +333,7 @@ void ZynAddSubFxInstrument::play( sampleFrame * _buf )
|
||||
m_plugin->processAudio( _buf );
|
||||
}
|
||||
m_pluginMutex.unlock();
|
||||
instrumentTrack()->processAudioBuffer( _buf, engine::mixer()->framesPerPeriod(), NULL );
|
||||
instrumentTrack()->processAudioBuffer( _buf, Engine::mixer()->framesPerPeriod(), NULL );
|
||||
}
|
||||
|
||||
|
||||
@@ -443,11 +443,11 @@ void ZynAddSubFxInstrument::initPlugin()
|
||||
QString( ConfigManager::inst()->factoryPresetsDir() +
|
||||
QDir::separator() + "ZynAddSubFX" ) ) ) );
|
||||
|
||||
m_remotePlugin->updateSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_remotePlugin->updateSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
// temporary workaround until the VST synchronization feature gets stripped out of the RemotePluginClient class
|
||||
// causing not to send buffer size information requests
|
||||
m_remotePlugin->sendMessage( RemotePlugin::message( IdBufferSizeInformation ).addInt( engine::mixer()->framesPerPeriod() ) );
|
||||
m_remotePlugin->sendMessage( RemotePlugin::message( IdBufferSizeInformation ).addInt( Engine::mixer()->framesPerPeriod() ) );
|
||||
|
||||
m_remotePlugin->showUI();
|
||||
m_remotePlugin->unlock();
|
||||
@@ -455,8 +455,8 @@ void ZynAddSubFxInstrument::initPlugin()
|
||||
else
|
||||
{
|
||||
m_plugin = new LocalZynAddSubFx;
|
||||
m_plugin->setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
m_plugin->setBufferSize( engine::mixer()->framesPerPeriod() );
|
||||
m_plugin->setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
m_plugin->setBufferSize( Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
@@ -52,7 +52,7 @@ AutomatableModel::AutomatableModel( DataType type,
|
||||
m_hasStrictStepSize( false ),
|
||||
m_hasLinkedModels( false ),
|
||||
m_controllerConnection( NULL ),
|
||||
m_valueBuffer( static_cast<int>( engine::mixer()->framesPerPeriod() ) ),
|
||||
m_valueBuffer( static_cast<int>( Engine::mixer()->framesPerPeriod() ) ),
|
||||
m_lastUpdatedPeriod( -1 ),
|
||||
m_hasSampleExactData( false )
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@ AutomationPattern::AutomationPattern( const AutomationPattern & _pat_to_copy ) :
|
||||
|
||||
AutomationPattern::~AutomationPattern()
|
||||
{
|
||||
if( engine::automationEditor() &&
|
||||
engine::automationEditor()->currentPattern() == this )
|
||||
if( Engine::automationEditor() &&
|
||||
Engine::automationEditor()->currentPattern() == this )
|
||||
{
|
||||
engine::automationEditor()->setCurrentPattern( NULL );
|
||||
Engine::automationEditor()->setCurrentPattern( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,9 +186,9 @@ MidiTime AutomationPattern::putValue( const MidiTime & _time,
|
||||
{
|
||||
cleanObjects();
|
||||
|
||||
MidiTime newTime = _quant_pos && engine::automationEditor() ?
|
||||
MidiTime newTime = _quant_pos && Engine::automationEditor() ?
|
||||
note::quantized( _time,
|
||||
engine::automationEditor()->quantization() ) :
|
||||
Engine::automationEditor()->quantization() ) :
|
||||
_time;
|
||||
|
||||
m_timeMap[newTime] = _value;
|
||||
@@ -219,9 +219,9 @@ void AutomationPattern::removeValue( const MidiTime & _time,
|
||||
{
|
||||
cleanObjects();
|
||||
|
||||
MidiTime newTime = _quant_pos && engine::automationEditor() ?
|
||||
MidiTime newTime = _quant_pos && Engine::automationEditor() ?
|
||||
note::quantized( _time,
|
||||
engine::automationEditor()->quantization() ) :
|
||||
Engine::automationEditor()->quantization() ) :
|
||||
_time;
|
||||
|
||||
m_timeMap.remove( newTime );
|
||||
@@ -259,9 +259,9 @@ MidiTime AutomationPattern::setDragValue( const MidiTime & _time, const float _v
|
||||
{
|
||||
if( m_dragging == false )
|
||||
{
|
||||
MidiTime newTime = _quant_pos && engine::automationEditor() ?
|
||||
MidiTime newTime = _quant_pos && Engine::automationEditor() ?
|
||||
note::quantized( _time,
|
||||
engine::automationEditor()->quantization() ) :
|
||||
Engine::automationEditor()->quantization() ) :
|
||||
_time;
|
||||
this->removeValue( newTime );
|
||||
m_oldTimeMap = m_timeMap;
|
||||
@@ -523,9 +523,9 @@ trackContentObjectView * AutomationPattern::createView( trackView * _tv )
|
||||
bool AutomationPattern::isAutomated( const AutomatableModel * _m )
|
||||
{
|
||||
TrackContainer::TrackList l;
|
||||
l += engine::getSong()->tracks();
|
||||
l += engine::getBBTrackContainer()->tracks();
|
||||
l += engine::getSong()->globalAutomationTrack();
|
||||
l += Engine::getSong()->tracks();
|
||||
l += Engine::getBBTrackContainer()->tracks();
|
||||
l += Engine::getSong()->globalAutomationTrack();
|
||||
|
||||
for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it )
|
||||
{
|
||||
@@ -560,9 +560,9 @@ QVector<AutomationPattern *> AutomationPattern::patternsForModel( const Automata
|
||||
{
|
||||
QVector<AutomationPattern *> patterns;
|
||||
TrackContainer::TrackList l;
|
||||
l += engine::getSong()->tracks();
|
||||
l += engine::getBBTrackContainer()->tracks();
|
||||
l += engine::getSong()->globalAutomationTrack();
|
||||
l += Engine::getSong()->tracks();
|
||||
l += Engine::getBBTrackContainer()->tracks();
|
||||
l += Engine::getSong()->globalAutomationTrack();
|
||||
|
||||
// go through all tracks...
|
||||
for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it )
|
||||
@@ -604,7 +604,7 @@ QVector<AutomationPattern *> AutomationPattern::patternsForModel( const Automata
|
||||
AutomationPattern * AutomationPattern::globalAutomationPattern(
|
||||
AutomatableModel * _m )
|
||||
{
|
||||
AutomationTrack * t = engine::getSong()->globalAutomationTrack();
|
||||
AutomationTrack * t = Engine::getSong()->globalAutomationTrack();
|
||||
Track::tcoVector v = t->getTCOs();
|
||||
for( Track::tcoVector::const_iterator j = v.begin(); j != v.end(); ++j )
|
||||
{
|
||||
@@ -632,9 +632,9 @@ AutomationPattern * AutomationPattern::globalAutomationPattern(
|
||||
|
||||
void AutomationPattern::resolveAllIDs()
|
||||
{
|
||||
TrackContainer::TrackList l = engine::getSong()->tracks() +
|
||||
engine::getBBTrackContainer()->tracks();
|
||||
l += engine::getSong()->globalAutomationTrack();
|
||||
TrackContainer::TrackList l = Engine::getSong()->tracks() +
|
||||
Engine::getBBTrackContainer()->tracks();
|
||||
l += Engine::getSong()->globalAutomationTrack();
|
||||
for( TrackContainer::TrackList::iterator it = l.begin();
|
||||
it != l.end(); ++it )
|
||||
{
|
||||
@@ -651,7 +651,7 @@ void AutomationPattern::resolveAllIDs()
|
||||
for( QVector<jo_id_t>::Iterator k = a->m_idsToResolve.begin();
|
||||
k != a->m_idsToResolve.end(); ++k )
|
||||
{
|
||||
JournallingObject * o = engine::projectJournal()->
|
||||
JournallingObject * o = Engine::projectJournal()->
|
||||
journallingObject( *k );
|
||||
if( o && dynamic_cast<AutomatableModel *>( o ) )
|
||||
{
|
||||
@@ -676,10 +676,10 @@ void AutomationPattern::clear()
|
||||
|
||||
emit dataChanged();
|
||||
|
||||
if( engine::automationEditor() &&
|
||||
engine::automationEditor()->currentPattern() == this )
|
||||
if( Engine::automationEditor() &&
|
||||
Engine::automationEditor()->currentPattern() == this )
|
||||
{
|
||||
engine::automationEditor()->update();
|
||||
Engine::automationEditor()->update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -688,9 +688,9 @@ void AutomationPattern::clear()
|
||||
|
||||
void AutomationPattern::openInAutomationEditor()
|
||||
{
|
||||
engine::automationEditor()->setCurrentPattern( this );
|
||||
engine::automationEditor()->parentWidget()->show();
|
||||
engine::automationEditor()->setFocus();
|
||||
Engine::automationEditor()->setCurrentPattern( this );
|
||||
Engine::automationEditor()->parentWidget()->show();
|
||||
Engine::automationEditor()->setFocus();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "bb_track.h"
|
||||
#include "combobox.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
@@ -82,9 +82,9 @@ bool BBTrackContainer::play( MidiTime _start, fpp_t _frames,
|
||||
|
||||
void BBTrackContainer::updateAfterTrackAdd()
|
||||
{
|
||||
if( numOfBBs() == 0 && !engine::getSong()->isLoadingProject() )
|
||||
if( numOfBBs() == 0 && !Engine::getSong()->isLoadingProject() )
|
||||
{
|
||||
engine::getSong()->addBBTrack();
|
||||
Engine::getSong()->addBBTrack();
|
||||
}
|
||||
|
||||
// make sure, new track(s) have TCOs for every beat/bassline
|
||||
@@ -116,7 +116,7 @@ tact_t BBTrackContainer::lengthOfBB( int _bb )
|
||||
|
||||
int BBTrackContainer::numOfBBs() const
|
||||
{
|
||||
return engine::getSong()->countTracks( Track::BBTrack );
|
||||
return Engine::getSong()->countTracks( Track::BBTrack );
|
||||
}
|
||||
|
||||
|
||||
@@ -182,13 +182,13 @@ void BBTrackContainer::fixIncorrectPositions()
|
||||
|
||||
void BBTrackContainer::play()
|
||||
{
|
||||
if( engine::getSong()->playMode() != Song::Mode_PlayBB )
|
||||
if( Engine::getSong()->playMode() != Song::Mode_PlayBB )
|
||||
{
|
||||
engine::getSong()->playBB();
|
||||
Engine::getSong()->playBB();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getSong()->togglePause();
|
||||
Engine::getSong()->togglePause();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ void BBTrackContainer::play()
|
||||
|
||||
void BBTrackContainer::stop()
|
||||
{
|
||||
engine::getSong()->stop();
|
||||
Engine::getSong()->stop();
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ void BBTrackContainer::currentBBChanged()
|
||||
|
||||
// now update all track-labels (the current one has to become white,
|
||||
// the others gray)
|
||||
TrackList tl = engine::getSong()->tracks();
|
||||
TrackList tl = Engine::getSong()->tracks();
|
||||
for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it )
|
||||
{
|
||||
if( ( *it )->type() == Track::BBTrack )
|
||||
@@ -242,7 +242,7 @@ void BBTrackContainer::currentBBChanged()
|
||||
|
||||
void BBTrackContainer::createTCOsForBB( int _bb )
|
||||
{
|
||||
if( numOfBBs() == 0 || engine::getSong()->isLoadingProject() )
|
||||
if( numOfBBs() == 0 || Engine::getSong()->isLoadingProject() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "Controller.h"
|
||||
#include "ControllerConnection.h"
|
||||
@@ -49,7 +49,7 @@ Controller::Controller( ControllerTypes _type, Model * _parent,
|
||||
const QString & _display_name ) :
|
||||
Model( _parent, _display_name ),
|
||||
JournallingObject(),
|
||||
m_valueBuffer( engine::mixer()->framesPerPeriod() ),
|
||||
m_valueBuffer( Engine::mixer()->framesPerPeriod() ),
|
||||
m_bufferLastUpdated( -1 ),
|
||||
m_connectionCount( 0 ),
|
||||
m_type( _type )
|
||||
@@ -95,9 +95,9 @@ Controller::~Controller()
|
||||
s_controllers.remove( idx );
|
||||
}
|
||||
|
||||
if( engine::getSong() )
|
||||
if( Engine::getSong() )
|
||||
{
|
||||
engine::getSong()->removeController( this );
|
||||
Engine::getSong()->removeController( this );
|
||||
}
|
||||
|
||||
m_valueBuffer.clear();
|
||||
@@ -153,7 +153,7 @@ void Controller::updateValueBuffer()
|
||||
// Get position in frames
|
||||
unsigned int Controller::runningFrames()
|
||||
{
|
||||
return s_periods * engine::mixer()->framesPerPeriod();
|
||||
return s_periods * Engine::mixer()->framesPerPeriod();
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ unsigned int Controller::runningFrames()
|
||||
// Get position in seconds
|
||||
float Controller::runningTime()
|
||||
{
|
||||
return runningFrames() / engine::mixer()->processingSampleRate();
|
||||
return runningFrames() / Engine::mixer()->processingSampleRate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "ControllerConnection.h"
|
||||
|
||||
@@ -160,9 +160,9 @@ void ControllerConnection::finalizeConnections()
|
||||
{
|
||||
ControllerConnection * c = s_connections[i];
|
||||
if ( !c->isFinalized() && c->m_controllerId <
|
||||
engine::getSong()->controllers().size() )
|
||||
Engine::getSong()->controllers().size() )
|
||||
{
|
||||
c->setController( engine::getSong()->
|
||||
c->setController( Engine::getSong()->
|
||||
controllers().at( c->m_controllerId ) );
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,7 @@ void ControllerConnection::finalizeConnections()
|
||||
|
||||
void ControllerConnection::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
if( engine::getSong() )
|
||||
if( Engine::getSong() )
|
||||
{
|
||||
if( m_ownsController )
|
||||
{
|
||||
@@ -181,7 +181,7 @@ void ControllerConnection::saveSettings( QDomDocument & _doc, QDomElement & _thi
|
||||
}
|
||||
else
|
||||
{
|
||||
int id = engine::getSong()->controllers().indexOf( m_controller );
|
||||
int id = Engine::getSong()->controllers().indexOf( m_controller );
|
||||
if( id >= 0 )
|
||||
{
|
||||
_this.setAttribute( "id", id );
|
||||
@@ -198,7 +198,7 @@ void ControllerConnection::loadSettings( const QDomElement & _this )
|
||||
QDomNode node = _this.firstChild();
|
||||
if( !node.isNull() )
|
||||
{
|
||||
setController( Controller::create( node.toElement(), engine::getSong() ) );
|
||||
setController( Controller::create( node.toElement(), Engine::getSong() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "Effect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "EffectChain.h"
|
||||
#include "EffectControls.h"
|
||||
#include "EffectView.h"
|
||||
@@ -182,7 +182,7 @@ void Effect::reinitSRC()
|
||||
}
|
||||
int error;
|
||||
if( ( m_srcState[i] = src_new(
|
||||
engine::mixer()->currentQualitySettings().
|
||||
Engine::mixer()->currentQualitySettings().
|
||||
libsrcInterpolation(),
|
||||
DEFAULT_CHANNELS, &error ) ) == NULL )
|
||||
{
|
||||
@@ -204,7 +204,7 @@ void Effect::resample( int _i, const sampleFrame * _src_buf,
|
||||
return;
|
||||
}
|
||||
m_srcData[_i].input_frames = _frames;
|
||||
m_srcData[_i].output_frames = engine::mixer()->framesPerPeriod();
|
||||
m_srcData[_i].output_frames = Engine::mixer()->framesPerPeriod();
|
||||
m_srcData[_i].data_in = (float *) _src_buf[0];
|
||||
m_srcData[_i].data_out = _dst_buf[0];
|
||||
m_srcData[_i].src_ratio = (double) _dst_sr / _src_sr;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "EffectChain.h"
|
||||
#include "Effect.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "debug.h"
|
||||
#include "DummyEffect.h"
|
||||
#include "MixHelpers.h"
|
||||
@@ -121,9 +121,9 @@ void EffectChain::loadSettings( const QDomElement & _this )
|
||||
|
||||
void EffectChain::appendEffect( Effect * _effect )
|
||||
{
|
||||
engine::mixer()->lock();
|
||||
Engine::mixer()->lock();
|
||||
m_effects.append( _effect );
|
||||
engine::mixer()->unlock();
|
||||
Engine::mixer()->unlock();
|
||||
|
||||
emit dataChanged();
|
||||
}
|
||||
@@ -133,9 +133,9 @@ void EffectChain::appendEffect( Effect * _effect )
|
||||
|
||||
void EffectChain::removeEffect( Effect * _effect )
|
||||
{
|
||||
engine::mixer()->lock();
|
||||
Engine::mixer()->lock();
|
||||
m_effects.erase( qFind( m_effects.begin(), m_effects.end(), _effect ) );
|
||||
engine::mixer()->unlock();
|
||||
Engine::mixer()->unlock();
|
||||
|
||||
emit dataChanged();
|
||||
}
|
||||
@@ -195,7 +195,7 @@ bool EffectChain::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames, b
|
||||
{
|
||||
return false;
|
||||
}
|
||||
const bool exporting = engine::getSong()->isExporting();
|
||||
const bool exporting = Engine::getSong()->isExporting();
|
||||
if( exporting ) // strip infs/nans if exporting
|
||||
{
|
||||
MixHelpers::sanitize( _buf, _frames );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* engine.cpp - implementation of LMMS' engine-system
|
||||
* Engine.cpp - implementation of LMMS' engine-system
|
||||
*
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "AutomationEditor.h"
|
||||
#include "bb_editor.h"
|
||||
#include "BBTrackContainer.h"
|
||||
@@ -46,30 +46,30 @@
|
||||
#include "BandLimitedWave.h"
|
||||
|
||||
|
||||
bool engine::s_hasGUI = true;
|
||||
bool engine::s_suppressMessages = false;
|
||||
float engine::s_framesPerTick;
|
||||
Mixer* engine::s_mixer = NULL;
|
||||
FxMixer * engine::s_fxMixer = NULL;
|
||||
FxMixerView * engine::s_fxMixerView = NULL;
|
||||
MainWindow * engine::s_mainWindow = NULL;
|
||||
BBTrackContainer * engine::s_bbTrackContainer = NULL;
|
||||
Song * engine::s_song = NULL;
|
||||
SongEditor* engine::s_songEditor = NULL;
|
||||
AutomationEditor * engine::s_automationEditor = NULL;
|
||||
bbEditor * engine::s_bbEditor = NULL;
|
||||
PianoRoll* engine::s_pianoRoll = NULL;
|
||||
projectNotes * engine::s_projectNotes = NULL;
|
||||
ProjectJournal * engine::s_projectJournal = NULL;
|
||||
ladspa2LMMS * engine::s_ladspaManager = NULL;
|
||||
DummyTrackContainer * engine::s_dummyTC = NULL;
|
||||
ControllerRackView * engine::s_controllerRackView = NULL;
|
||||
QMap<QString, QString> engine::s_pluginFileHandling;
|
||||
bool Engine::s_hasGUI = true;
|
||||
bool Engine::s_suppressMessages = false;
|
||||
float Engine::s_framesPerTick;
|
||||
Mixer* Engine::s_mixer = NULL;
|
||||
FxMixer * Engine::s_fxMixer = NULL;
|
||||
FxMixerView * Engine::s_fxMixerView = NULL;
|
||||
MainWindow * Engine::s_mainWindow = NULL;
|
||||
BBTrackContainer * Engine::s_bbTrackContainer = NULL;
|
||||
Song * Engine::s_song = NULL;
|
||||
SongEditor* Engine::s_songEditor = NULL;
|
||||
AutomationEditor * Engine::s_automationEditor = NULL;
|
||||
bbEditor * Engine::s_bbEditor = NULL;
|
||||
PianoRoll* Engine::s_pianoRoll = NULL;
|
||||
projectNotes * Engine::s_projectNotes = NULL;
|
||||
ProjectJournal * Engine::s_projectJournal = NULL;
|
||||
ladspa2LMMS * Engine::s_ladspaManager = NULL;
|
||||
DummyTrackContainer * Engine::s_dummyTC = NULL;
|
||||
ControllerRackView * Engine::s_controllerRackView = NULL;
|
||||
QMap<QString, QString> Engine::s_pluginFileHandling;
|
||||
|
||||
|
||||
|
||||
|
||||
void engine::init( const bool _has_gui )
|
||||
void Engine::init( const bool _has_gui )
|
||||
{
|
||||
s_hasGUI = _has_gui;
|
||||
|
||||
@@ -113,7 +113,7 @@ void engine::init( const bool _has_gui )
|
||||
|
||||
|
||||
|
||||
void engine::destroy()
|
||||
void Engine::destroy()
|
||||
{
|
||||
s_mixer->stopProcessing();
|
||||
|
||||
@@ -150,7 +150,7 @@ void engine::destroy()
|
||||
|
||||
|
||||
|
||||
void engine::updateFramesPerTick()
|
||||
void Engine::updateFramesPerTick()
|
||||
{
|
||||
s_framesPerTick = s_mixer->processingSampleRate() * 60.0f * 4 /
|
||||
DefaultTicksPerTact / s_song->getTempo();
|
||||
@@ -159,7 +159,7 @@ void engine::updateFramesPerTick()
|
||||
|
||||
|
||||
|
||||
void engine::initPluginFileHandling()
|
||||
void Engine::initPluginFileHandling()
|
||||
{
|
||||
Plugin::DescriptorList pluginDescriptors;
|
||||
Plugin::getDescriptorsOfAvailPlugins( pluginDescriptors );
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "EnvelopeAndLfoParameters.h"
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "Oscillator.h"
|
||||
|
||||
@@ -47,7 +47,7 @@ void EnvelopeAndLfoParameters::LfoInstances::trigger()
|
||||
it != m_lfos.end(); ++it )
|
||||
{
|
||||
( *it )->m_lfoFrame +=
|
||||
engine::mixer()->framesPerPeriod();
|
||||
Engine::mixer()->framesPerPeriod();
|
||||
( *it )->m_bad_lfoShapeData = true;
|
||||
}
|
||||
}
|
||||
@@ -157,12 +157,12 @@ EnvelopeAndLfoParameters::EnvelopeAndLfoParameters(
|
||||
connect( &m_x100Model, SIGNAL( dataChanged() ),
|
||||
this, SLOT( updateSampleVars() ) );
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateSampleVars() ) );
|
||||
|
||||
|
||||
m_lfoShapeData =
|
||||
new sample_t[engine::mixer()->framesPerPeriod()];
|
||||
new sample_t[Engine::mixer()->framesPerPeriod()];
|
||||
|
||||
updateSampleVars();
|
||||
}
|
||||
@@ -242,7 +242,7 @@ inline sample_t EnvelopeAndLfoParameters::lfoShapeSample( fpp_t _frame_offset )
|
||||
|
||||
void EnvelopeAndLfoParameters::updateLfoShapeData()
|
||||
{
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
for( fpp_t offset = 0; offset < frames; ++offset )
|
||||
{
|
||||
m_lfoShapeData[offset] = lfoShapeSample( offset );
|
||||
@@ -404,7 +404,7 @@ void EnvelopeAndLfoParameters::loadSettings( const QDomElement & _this )
|
||||
void EnvelopeAndLfoParameters::updateSampleVars()
|
||||
{
|
||||
const float frames_per_env_seg = SECS_PER_ENV_SEGMENT *
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
// TODO: Remove the expKnobVals, time should be linear
|
||||
const f_cnt_t predelay_frames = static_cast<f_cnt_t>(
|
||||
frames_per_env_seg *
|
||||
@@ -502,7 +502,7 @@ void EnvelopeAndLfoParameters::updateSampleVars()
|
||||
|
||||
|
||||
const float frames_per_lfo_oscillation = SECS_PER_LFO_OSCILLATION *
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
m_lfoPredelayFrames = static_cast<f_cnt_t>( frames_per_lfo_oscillation *
|
||||
expKnobVal( m_lfoPredelayModel.value() ) );
|
||||
m_lfoAttackFrames = static_cast<f_cnt_t>( frames_per_lfo_oscillation *
|
||||
|
||||
@@ -63,7 +63,7 @@ FxChannel::FxChannel( int idx, Model * _parent ) :
|
||||
m_stillRunning( false ),
|
||||
m_peakLeft( 0.0f ),
|
||||
m_peakRight( 0.0f ),
|
||||
m_buffer( new sampleFrame[engine::mixer()->framesPerPeriod()] ),
|
||||
m_buffer( new sampleFrame[Engine::mixer()->framesPerPeriod()] ),
|
||||
m_muteModel( false, _parent ),
|
||||
m_soloModel( false, _parent ),
|
||||
m_volumeModel( 1.0, 0.0, 2.0, 0.001, _parent ),
|
||||
@@ -73,8 +73,8 @@ FxChannel::FxChannel( int idx, Model * _parent ) :
|
||||
m_queued( false ),
|
||||
m_dependenciesMet( 0 )
|
||||
{
|
||||
engine::mixer()->clearAudioBuffer( m_buffer,
|
||||
engine::mixer()->framesPerPeriod() );
|
||||
Engine::mixer()->clearAudioBuffer( m_buffer,
|
||||
Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
|
||||
@@ -118,8 +118,8 @@ void FxChannel::unmuteForSolo()
|
||||
|
||||
void FxChannel::doProcessing()
|
||||
{
|
||||
const fpp_t fpp = engine::mixer()->framesPerPeriod();
|
||||
const bool exporting = engine::getSong()->isExporting();
|
||||
const fpp_t fpp = Engine::mixer()->framesPerPeriod();
|
||||
const bool exporting = Engine::getSong()->isExporting();
|
||||
|
||||
if( m_muted == false )
|
||||
{
|
||||
@@ -177,8 +177,8 @@ void FxChannel::doProcessing()
|
||||
|
||||
m_stillRunning = m_fxChain.processAudioBuffer( m_buffer, fpp, m_hasInput );
|
||||
|
||||
m_peakLeft = qMax( m_peakLeft, engine::mixer()->peakValueLeft( m_buffer, fpp ) * v );
|
||||
m_peakRight = qMax( m_peakRight, engine::mixer()->peakValueRight( m_buffer, fpp ) * v );
|
||||
m_peakLeft = qMax( m_peakLeft, Engine::mixer()->peakValueLeft( m_buffer, fpp ) * v );
|
||||
m_peakRight = qMax( m_peakRight, Engine::mixer()->peakValueRight( m_buffer, fpp ) * v );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -289,8 +289,8 @@ void FxMixer::deleteChannel( int index )
|
||||
|
||||
// go through every instrument and adjust for the channel index change
|
||||
TrackContainer::TrackList tracks;
|
||||
tracks += engine::getSong()->tracks();
|
||||
tracks += engine::getBBTrackContainer()->tracks();
|
||||
tracks += Engine::getSong()->tracks();
|
||||
tracks += Engine::getBBTrackContainer()->tracks();
|
||||
|
||||
foreach( Track* t, tracks )
|
||||
{
|
||||
@@ -345,8 +345,8 @@ void FxMixer::moveChannelLeft( int index )
|
||||
int a = index - 1, b = index;
|
||||
|
||||
// go through every instrument and adjust for the channel index change
|
||||
QVector<Track *> songTrackList = engine::getSong()->tracks();
|
||||
QVector<Track *> bbTrackList = engine::getBBTrackContainer()->tracks();
|
||||
QVector<Track *> songTrackList = Engine::getSong()->tracks();
|
||||
QVector<Track *> bbTrackList = Engine::getBBTrackContainer()->tracks();
|
||||
|
||||
QVector<Track *> trackLists[] = {songTrackList, bbTrackList};
|
||||
for(int tl=0; tl<2; ++tl)
|
||||
@@ -428,7 +428,7 @@ FxRoute * FxMixer::createRoute( FxChannel * from, FxChannel * to, float amount )
|
||||
to->m_receives.append( route );
|
||||
|
||||
// add us to fxmixer's list
|
||||
engine::fxMixer()->m_fxRoutes.append( route );
|
||||
Engine::fxMixer()->m_fxRoutes.append( route );
|
||||
m_sendsMutex.unlock();
|
||||
|
||||
return route;
|
||||
@@ -462,7 +462,7 @@ void FxMixer::deleteChannelSend( FxRoute * route )
|
||||
// remove us from to's receives
|
||||
route->receiver()->m_receives.remove( route->receiver()->m_receives.indexOf( route ) );
|
||||
// remove us from fxmixer's list
|
||||
engine::fxMixer()->m_fxRoutes.remove( engine::fxMixer()->m_fxRoutes.indexOf( route ) );
|
||||
Engine::fxMixer()->m_fxRoutes.remove( Engine::fxMixer()->m_fxRoutes.indexOf( route ) );
|
||||
delete route;
|
||||
m_sendsMutex.unlock();
|
||||
}
|
||||
@@ -534,7 +534,7 @@ void FxMixer::mixToChannel( const sampleFrame * _buf, fx_ch_t _ch )
|
||||
if( m_fxChannels[_ch]->m_muteModel.value() == false )
|
||||
{
|
||||
m_fxChannels[_ch]->m_lock.lock();
|
||||
MixHelpers::add( m_fxChannels[_ch]->m_buffer, _buf, engine::mixer()->framesPerPeriod() );
|
||||
MixHelpers::add( m_fxChannels[_ch]->m_buffer, _buf, Engine::mixer()->framesPerPeriod() );
|
||||
m_fxChannels[_ch]->m_hasInput = true;
|
||||
m_fxChannels[_ch]->m_lock.unlock();
|
||||
}
|
||||
@@ -545,15 +545,15 @@ void FxMixer::mixToChannel( const sampleFrame * _buf, fx_ch_t _ch )
|
||||
|
||||
void FxMixer::prepareMasterMix()
|
||||
{
|
||||
engine::mixer()->clearAudioBuffer( m_fxChannels[0]->m_buffer,
|
||||
engine::mixer()->framesPerPeriod() );
|
||||
Engine::mixer()->clearAudioBuffer( m_fxChannels[0]->m_buffer,
|
||||
Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FxMixer::masterMix( sampleFrame * _buf )
|
||||
{
|
||||
const int fpp = engine::mixer()->framesPerPeriod();
|
||||
const int fpp = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
if( m_sendsMutex.tryLock() )
|
||||
{
|
||||
@@ -601,14 +601,14 @@ void FxMixer::masterMix( sampleFrame * _buf )
|
||||
: m_fxChannels[0]->m_volumeModel.value();
|
||||
MixHelpers::addSanitizedMultiplied( _buf, m_fxChannels[0]->m_buffer, v, fpp );
|
||||
|
||||
m_fxChannels[0]->m_peakLeft *= engine::mixer()->masterGain();
|
||||
m_fxChannels[0]->m_peakRight *= engine::mixer()->masterGain();
|
||||
m_fxChannels[0]->m_peakLeft *= Engine::mixer()->masterGain();
|
||||
m_fxChannels[0]->m_peakRight *= Engine::mixer()->masterGain();
|
||||
|
||||
// clear all channel buffers and
|
||||
// reset channel process state
|
||||
for( int i = 0; i < numChannels(); ++i)
|
||||
{
|
||||
engine::mixer()->clearAudioBuffer( m_fxChannels[i]->m_buffer, engine::mixer()->framesPerPeriod() );
|
||||
Engine::mixer()->clearAudioBuffer( m_fxChannels[i]->m_buffer, Engine::mixer()->framesPerPeriod() );
|
||||
m_fxChannels[i]->reset();
|
||||
m_fxChannels[i]->m_queued = false;
|
||||
// also reset hasInput
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "ImportFilter.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "TrackContainer.h"
|
||||
#include "ProjectJournal.h"
|
||||
|
||||
@@ -60,8 +60,8 @@ void ImportFilter::import( const QString & _file_to_import,
|
||||
char * s = qstrdup( _file_to_import.toUtf8().constData() );
|
||||
|
||||
// do not record changes while importing files
|
||||
const bool j = engine::projectJournal()->isJournalling();
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
const bool j = Engine::projectJournal()->isJournalling();
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
for( Plugin::DescriptorList::ConstIterator it = d.begin();
|
||||
it != d.end(); ++it )
|
||||
@@ -80,7 +80,7 @@ void ImportFilter::import( const QString & _file_to_import,
|
||||
}
|
||||
}
|
||||
|
||||
engine::projectJournal()->setJournalling( j );
|
||||
Engine::projectJournal()->setJournalling( j );
|
||||
|
||||
delete[] s;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "DummyInstrument.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
|
||||
|
||||
Instrument::Instrument( InstrumentTrack * _instrument_track,
|
||||
@@ -100,7 +100,7 @@ bool Instrument::isFromTrack( const Track * _track ) const
|
||||
void Instrument::applyRelease( sampleFrame * buf, const NotePlayHandle * _n )
|
||||
{
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
const fpp_t fpp = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t fpp = Engine::mixer()->framesPerPeriod();
|
||||
const f_cnt_t fl = _n->framesLeft();
|
||||
if( fl <= desiredReleaseFrames()+fpp )
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "InstrumentFunctions.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "PresetPreviewPlayHandle.h"
|
||||
@@ -260,7 +260,7 @@ void InstrumentFunctionNoteStacking::processNote( NotePlayHandle * _n )
|
||||
|
||||
// create sub-note-play-handle, only note is
|
||||
// different
|
||||
engine::mixer()->addPlayHandle(
|
||||
Engine::mixer()->addPlayHandle(
|
||||
NotePlayHandleManager::acquire( _n->instrumentTrack(), _n->offset(), _n->frames(), note_copy,
|
||||
_n, -1, NotePlayHandle::OriginNoteStacking )
|
||||
);
|
||||
@@ -369,7 +369,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
|
||||
const int total_range = range * cnphv.size();
|
||||
|
||||
// number of frames that every note should be played
|
||||
const f_cnt_t arp_frames = (f_cnt_t)( m_arpTimeModel.value() / 1000.0f * engine::mixer()->processingSampleRate() );
|
||||
const f_cnt_t arp_frames = (f_cnt_t)( m_arpTimeModel.value() / 1000.0f * Engine::mixer()->processingSampleRate() );
|
||||
const f_cnt_t gated_frames = (f_cnt_t)( m_arpGateModel.value() * arp_frames / 100.0f );
|
||||
|
||||
// used for calculating remaining frames for arp-note, we have to add
|
||||
@@ -381,11 +381,11 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
|
||||
// used for loop
|
||||
f_cnt_t frames_processed = ( m_arpModeModel.value() != FreeMode ) ? cnphv.first()->noteOffset() : _n->noteOffset();
|
||||
|
||||
while( frames_processed < engine::mixer()->framesPerPeriod() )
|
||||
while( frames_processed < Engine::mixer()->framesPerPeriod() )
|
||||
{
|
||||
const f_cnt_t remaining_frames_for_cur_arp = arp_frames - ( cur_frame % arp_frames );
|
||||
// does current arp-note fill whole audio-buffer?
|
||||
if( remaining_frames_for_cur_arp > engine::mixer()->framesPerPeriod() )
|
||||
if( remaining_frames_for_cur_arp > Engine::mixer()->framesPerPeriod() )
|
||||
{
|
||||
// then we don't have to do something!
|
||||
break;
|
||||
@@ -458,7 +458,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
|
||||
// range-checking
|
||||
if( sub_note_key >= NumKeys ||
|
||||
sub_note_key < 0 ||
|
||||
engine::mixer()->criticalXRuns() )
|
||||
Engine::mixer()->criticalXRuns() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -473,7 +473,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
|
||||
|
||||
// create sub-note-play-handle, only ptr to note is different
|
||||
// and is_arp_note=true
|
||||
engine::mixer()->addPlayHandle(
|
||||
Engine::mixer()->addPlayHandle(
|
||||
NotePlayHandleManager::acquire( _n->instrumentTrack(),
|
||||
frames_processed,
|
||||
gated_frames,
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "InstrumentSoundShaping.h"
|
||||
#include "basic_filters.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "EnvelopeAndLfoParameters.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
@@ -119,7 +119,7 @@ float InstrumentSoundShaping::volumeLevel( NotePlayHandle* n, const f_cnt_t fram
|
||||
|
||||
if( n->isReleased() == false )
|
||||
{
|
||||
envReleaseBegin += engine::mixer()->framesPerPeriod();
|
||||
envReleaseBegin += Engine::mixer()->framesPerPeriod();
|
||||
}
|
||||
|
||||
float level;
|
||||
@@ -161,7 +161,7 @@ void InstrumentSoundShaping::processAudioBuffer( sampleFrame* buffer,
|
||||
|
||||
if( n->m_filter == NULL )
|
||||
{
|
||||
n->m_filter = new basicFilters<>( engine::mixer()->processingSampleRate() );
|
||||
n->m_filter = new basicFilters<>( Engine::mixer()->processingSampleRate() );
|
||||
}
|
||||
n->m_filter->setFilterType( m_filterModel.value() );
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
#include "AutomatableModel.h"
|
||||
#include "ProjectJournal.h"
|
||||
#include "base64.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
|
||||
|
||||
|
||||
JournallingObject::JournallingObject() :
|
||||
SerializingObject(),
|
||||
m_id( engine::projectJournal()->allocID( this ) ),
|
||||
m_id( Engine::projectJournal()->allocID( this ) ),
|
||||
m_journalling( true ),
|
||||
m_journallingStateStack()
|
||||
{
|
||||
@@ -47,9 +47,9 @@ JournallingObject::JournallingObject() :
|
||||
|
||||
JournallingObject::~JournallingObject()
|
||||
{
|
||||
if( engine::projectJournal() )
|
||||
if( Engine::projectJournal() )
|
||||
{
|
||||
engine::projectJournal()->freeID( id() );
|
||||
Engine::projectJournal()->freeID( id() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ void JournallingObject::addJournalCheckPoint()
|
||||
{
|
||||
if( isJournalling() )
|
||||
{
|
||||
engine::projectJournal()->addJournalCheckPoint( this );
|
||||
Engine::projectJournal()->addJournalCheckPoint( this );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ void JournallingObject::changeID( jo_id_t _id )
|
||||
{
|
||||
if( id() != _id )
|
||||
{
|
||||
JournallingObject * jo = engine::projectJournal()->
|
||||
JournallingObject * jo = Engine::projectJournal()->
|
||||
journallingObject( _id );
|
||||
if( jo != NULL )
|
||||
{
|
||||
@@ -131,7 +131,7 @@ void JournallingObject::changeID( jo_id_t _id )
|
||||
return;
|
||||
}
|
||||
|
||||
engine::projectJournal()->reallocID( _id, this );
|
||||
Engine::projectJournal()->reallocID( _id, this );
|
||||
m_id = _id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "LfoController.h"
|
||||
#include "ControllerDialog.h"
|
||||
@@ -60,12 +60,12 @@ LfoController::LfoController( Model * _parent ) :
|
||||
this, SLOT( updateDuration() ) );
|
||||
connect( &m_multiplierModel, SIGNAL( dataChanged() ),
|
||||
this, SLOT( updateDuration() ) );
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ),
|
||||
this, SLOT( updateDuration() ) );
|
||||
|
||||
connect( engine::getSong(), SIGNAL( playbackStateChanged() ),
|
||||
connect( Engine::getSong(), SIGNAL( playbackStateChanged() ),
|
||||
this, SLOT( updatePhase() ) );
|
||||
connect( engine::getSong(), SIGNAL( playbackPositionChanged() ),
|
||||
connect( Engine::getSong(), SIGNAL( playbackPositionChanged() ),
|
||||
this, SLOT( updatePhase() ) );
|
||||
|
||||
updateDuration();
|
||||
@@ -97,7 +97,7 @@ void LfoController::updateValueBuffer()
|
||||
if( m_bufferLastUpdated < s_periods )
|
||||
{
|
||||
int diff = s_periods - m_bufferLastUpdated;
|
||||
phase += static_cast<float>( engine::mixer()->framesPerPeriod() * diff ) / m_duration;
|
||||
phase += static_cast<float>( Engine::mixer()->framesPerPeriod() * diff ) / m_duration;
|
||||
m_bufferLastUpdated += diff;
|
||||
}
|
||||
|
||||
@@ -119,14 +119,14 @@ void LfoController::updateValueBuffer()
|
||||
|
||||
void LfoController::updatePhase()
|
||||
{
|
||||
m_currentPhase = ( engine::getSong()->getFrames() ) / m_duration;
|
||||
m_currentPhase = ( Engine::getSong()->getFrames() ) / m_duration;
|
||||
m_bufferLastUpdated = s_periods - 1;
|
||||
}
|
||||
|
||||
|
||||
void LfoController::updateDuration()
|
||||
{
|
||||
float newDurationF = engine::mixer()->processingSampleRate() * m_speedModel.value();
|
||||
float newDurationF = Engine::mixer()->processingSampleRate() * m_speedModel.value();
|
||||
|
||||
switch(m_multiplierModel.value() )
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "NotePlayHandle.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "PianoRoll.h"
|
||||
@@ -86,7 +86,7 @@ Mixer::Mixer() :
|
||||
}
|
||||
|
||||
// just rendering?
|
||||
if( !engine::hasGUI() )
|
||||
if( !Engine::hasGUI() )
|
||||
{
|
||||
m_framesPerPeriod = DEFAULT_BUFFER_SIZE;
|
||||
m_fifo = new fifo( 1 );
|
||||
@@ -278,7 +278,7 @@ sample_rate_t Mixer::processingSampleRate() const
|
||||
|
||||
bool Mixer::criticalXRuns() const
|
||||
{
|
||||
return cpuLoad() >= 99 && engine::getSong()->isExporting() == false;
|
||||
return cpuLoad() >= 99 && Engine::getSong()->isExporting() == false;
|
||||
}
|
||||
|
||||
|
||||
@@ -320,10 +320,10 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
|
||||
|
||||
static Song::playPos last_metro_pos = -1;
|
||||
|
||||
Song::playPos p = engine::getSong()->getPlayPos(
|
||||
Song::playPos p = Engine::getSong()->getPlayPos(
|
||||
Song::Mode_PlayPattern );
|
||||
if( engine::getSong()->playMode() == Song::Mode_PlayPattern &&
|
||||
engine::pianoRoll()->isRecording() == true &&
|
||||
if( Engine::getSong()->playMode() == Song::Mode_PlayPattern &&
|
||||
Engine::pianoRoll()->isRecording() == true &&
|
||||
p != last_metro_pos )
|
||||
{
|
||||
if ( p.getTicks() % (MidiTime::ticksPerTact() / 1 ) == 0 )
|
||||
@@ -331,7 +331,7 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
|
||||
addPlayHandle( new SamplePlayHandle( "misc/metronome02.ogg" ) );
|
||||
}
|
||||
else if ( p.getTicks() % (MidiTime::ticksPerTact() /
|
||||
engine::getSong()->getTimeSigModel().getNumerator() ) == 0 )
|
||||
Engine::getSong()->getTimeSigModel().getNumerator() ) == 0 )
|
||||
{
|
||||
addPlayHandle( new SamplePlayHandle( "misc/metronome01.ogg" ) );
|
||||
}
|
||||
@@ -385,10 +385,10 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
|
||||
clearAudioBuffer( m_writeBuf, m_framesPerPeriod );
|
||||
|
||||
// prepare master mix (clear internal buffers etc.)
|
||||
engine::fxMixer()->prepareMasterMix();
|
||||
Engine::fxMixer()->prepareMasterMix();
|
||||
|
||||
// create play-handles for new notes, samples etc.
|
||||
engine::getSong()->processNextBuffer();
|
||||
Engine::getSong()->processNextBuffer();
|
||||
|
||||
// add all play-handles that have to be added
|
||||
m_playHandleMutex.lock();
|
||||
@@ -434,7 +434,7 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
|
||||
|
||||
|
||||
// STAGE 3: do master mix in FX mixer
|
||||
engine::fxMixer()->masterMix( m_writeBuf );
|
||||
Engine::fxMixer()->masterMix( m_writeBuf );
|
||||
|
||||
unlock();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "MixerWorkerThread.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
|
||||
|
||||
MixerWorkerThread::JobQueue MixerWorkerThread::globalJobQueue;
|
||||
|
||||
@@ -69,7 +69,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack,
|
||||
m_hadChildren( false ),
|
||||
m_muted( false ),
|
||||
m_bbTrack( NULL ),
|
||||
m_origTempo( engine::getSong()->getTempo() ),
|
||||
m_origTempo( Engine::getSong()->getTempo() ),
|
||||
m_origBaseNote( instrumentTrack->baseNote() ),
|
||||
m_frequency( 0 ),
|
||||
m_unpitchedFrequency( 0 ),
|
||||
@@ -114,7 +114,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack,
|
||||
// send MidiNoteOn event
|
||||
m_instrumentTrack->processOutEvent(
|
||||
MidiEvent( MidiNoteOn, midiChannel(), midiKey(), midiVelocity( baseVelocity ) ),
|
||||
MidiTime::fromFrames( offset(), engine::framesPerTick() ),
|
||||
MidiTime::fromFrames( offset(), Engine::framesPerTick() ),
|
||||
offset() );
|
||||
}
|
||||
|
||||
@@ -207,9 +207,9 @@ void NotePlayHandle::play( sampleFrame * _working_buffer )
|
||||
}
|
||||
|
||||
// if the note offset falls over to next period, then don't start playback yet
|
||||
if( offset() >= engine::mixer()->framesPerPeriod() )
|
||||
if( offset() >= Engine::mixer()->framesPerPeriod() )
|
||||
{
|
||||
setOffset( offset() - engine::mixer()->framesPerPeriod() );
|
||||
setOffset( offset() - Engine::mixer()->framesPerPeriod() );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -221,8 +221,8 @@ void NotePlayHandle::play( sampleFrame * _working_buffer )
|
||||
|
||||
// number of frames that can be played this period
|
||||
f_cnt_t framesThisPeriod = m_totalFramesPlayed == 0
|
||||
? engine::mixer()->framesPerPeriod() - offset()
|
||||
: engine::mixer()->framesPerPeriod();
|
||||
? Engine::mixer()->framesPerPeriod() - offset()
|
||||
: Engine::mixer()->framesPerPeriod();
|
||||
|
||||
// check if we start release during this period
|
||||
if( m_released == false &&
|
||||
@@ -261,7 +261,7 @@ void NotePlayHandle::play( sampleFrame * _working_buffer )
|
||||
// are inserted by arpAndChordsTabWidget::processNote()
|
||||
if( ! m_subNotes.isEmpty() )
|
||||
{
|
||||
m_releaseFramesToDo = m_releaseFramesDone + 2 * engine::mixer()->framesPerPeriod();
|
||||
m_releaseFramesToDo = m_releaseFramesDone + 2 * Engine::mixer()->framesPerPeriod();
|
||||
}
|
||||
// look whether we have frames left to be done before release
|
||||
if( m_framesBeforeRelease )
|
||||
@@ -325,7 +325,7 @@ f_cnt_t NotePlayHandle::framesLeft() const
|
||||
{
|
||||
if( instrumentTrack()->isSustainPedalPressed() )
|
||||
{
|
||||
return 4*engine::mixer()->framesPerPeriod();
|
||||
return 4*Engine::mixer()->framesPerPeriod();
|
||||
}
|
||||
else if( m_released && actualReleaseFramesToDo() == 0 )
|
||||
{
|
||||
@@ -345,9 +345,9 @@ fpp_t NotePlayHandle::framesLeftForCurrentPeriod() const
|
||||
{
|
||||
if( m_totalFramesPlayed == 0 )
|
||||
{
|
||||
return (fpp_t) qMin<f_cnt_t>( framesLeft(), engine::mixer()->framesPerPeriod() - offset() );
|
||||
return (fpp_t) qMin<f_cnt_t>( framesLeft(), Engine::mixer()->framesPerPeriod() - offset() );
|
||||
}
|
||||
return (fpp_t) qMin<f_cnt_t>( framesLeft(), engine::mixer()->framesPerPeriod() );
|
||||
return (fpp_t) qMin<f_cnt_t>( framesLeft(), Engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
|
||||
@@ -386,14 +386,14 @@ void NotePlayHandle::noteOff( const f_cnt_t _s )
|
||||
// send MidiNoteOff event
|
||||
m_instrumentTrack->processOutEvent(
|
||||
MidiEvent( MidiNoteOff, midiChannel(), midiKey(), 0 ),
|
||||
MidiTime::fromFrames( _s, engine::framesPerTick() ),
|
||||
MidiTime::fromFrames( _s, Engine::framesPerTick() ),
|
||||
_s );
|
||||
}
|
||||
|
||||
// inform attached components about MIDI finished (used for recording in Piano Roll)
|
||||
if( m_origin == OriginMidiInput )
|
||||
{
|
||||
setLength( MidiTime( static_cast<f_cnt_t>( totalFramesPlayed() / engine::framesPerTick() ) ) );
|
||||
setLength( MidiTime( static_cast<f_cnt_t>( totalFramesPlayed() / Engine::framesPerTick() ) ) );
|
||||
m_instrumentTrack->midiNoteOff( *this );
|
||||
}
|
||||
}
|
||||
@@ -445,7 +445,7 @@ void NotePlayHandle::mute()
|
||||
|
||||
int NotePlayHandle::index() const
|
||||
{
|
||||
const PlayHandleList & playHandles = engine::mixer()->playHandles();
|
||||
const PlayHandleList & playHandles = Engine::mixer()->playHandles();
|
||||
int idx = 0;
|
||||
for( PlayHandleList::ConstIterator it = playHandles.begin(); it != playHandles.end(); ++it )
|
||||
{
|
||||
@@ -468,7 +468,7 @@ int NotePlayHandle::index() const
|
||||
|
||||
ConstNotePlayHandleList NotePlayHandle::nphsOfInstrumentTrack( const InstrumentTrack * _it, bool _all_ph )
|
||||
{
|
||||
const PlayHandleList & playHandles = engine::mixer()->playHandles();
|
||||
const PlayHandleList & playHandles = Engine::mixer()->playHandles();
|
||||
ConstNotePlayHandleList cnphv;
|
||||
|
||||
for( PlayHandleList::ConstIterator it = playHandles.begin(); it != playHandles.end(); ++it )
|
||||
@@ -512,7 +512,7 @@ void NotePlayHandle::updateFrequency()
|
||||
const float pitch =
|
||||
( key() -
|
||||
m_instrumentTrack->baseNoteModel()->value() +
|
||||
engine::getSong()->masterPitch() +
|
||||
Engine::getSong()->masterPitch() +
|
||||
m_baseDetuning->value() )
|
||||
/ 12.0f;
|
||||
m_frequency = BaseFreq * powf( 2.0f, pitch + m_instrumentTrack->pitchModel()->value() / ( 100 * 12.0f ) );
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "Oscillator.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "AutomatableModel.h"
|
||||
|
||||
@@ -55,7 +55,7 @@ Oscillator::Oscillator( const IntModel * _wave_shape_model,
|
||||
void Oscillator::update( sampleFrame * _ab, const fpp_t _frames,
|
||||
const ch_cnt_t _chnl )
|
||||
{
|
||||
if( m_freq >= engine::mixer()->processingSampleRate() / 2 )
|
||||
if( m_freq >= Engine::mixer()->processingSampleRate() / 2 )
|
||||
{
|
||||
Mixer::clearAudioBuffer( _ab, _frames );
|
||||
return;
|
||||
@@ -456,7 +456,7 @@ void Oscillator::updateFM( sampleFrame * _ab, const fpp_t _frames,
|
||||
recalcPhase();
|
||||
const float osc_coeff = m_freq * m_detuning;
|
||||
const float sampleRateCorrection = 44100.0f /
|
||||
engine::mixer()->processingSampleRate();
|
||||
Engine::mixer()->processingSampleRate();
|
||||
|
||||
for( fpp_t frame = 0; frame < _frames; ++frame )
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "PeakController.h"
|
||||
#include "EffectChain.h"
|
||||
@@ -60,7 +60,7 @@ PeakController::PeakController( Model * _parent,
|
||||
connect( m_peakEffect, SIGNAL( destroyed( ) ),
|
||||
this, SLOT( handleDestroyedEffect( ) ) );
|
||||
}
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateCoeffs() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateCoeffs() ) );
|
||||
connect( m_peakEffect->attackModel(), SIGNAL( dataChanged() ), this, SLOT( updateCoeffs() ) );
|
||||
connect( m_peakEffect->decayModel(), SIGNAL( dataChanged() ), this, SLOT( updateCoeffs() ) );
|
||||
m_coeffNeedsUpdate = true;
|
||||
@@ -86,7 +86,7 @@ void PeakController::updateValueBuffer()
|
||||
{
|
||||
if( m_coeffNeedsUpdate )
|
||||
{
|
||||
const float ratio = 44100.0f / engine::mixer()->processingSampleRate();
|
||||
const float ratio = 44100.0f / Engine::mixer()->processingSampleRate();
|
||||
m_attackCoeff = 1.0f - powf( 2.0f, -0.3f * ( 1.0f - m_peakEffect->attackModel()->value() ) * ratio );
|
||||
m_decayCoeff = 1.0f - powf( 2.0f, -0.3f * ( 1.0f - m_peakEffect->decayModel()->value() ) * ratio );
|
||||
m_coeffNeedsUpdate = false;
|
||||
@@ -97,7 +97,7 @@ void PeakController::updateValueBuffer()
|
||||
float targetSample = m_peakEffect->lastSample();
|
||||
if( m_currentSample != targetSample )
|
||||
{
|
||||
const f_cnt_t frames = engine::mixer()->framesPerPeriod();
|
||||
const f_cnt_t frames = Engine::mixer()->framesPerPeriod();
|
||||
float * values = m_valueBuffer.values();
|
||||
|
||||
for( f_cnt_t f = 0; f < frames; ++f )
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "Plugin.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "DummyPlugin.h"
|
||||
@@ -96,7 +96,7 @@ Plugin * Plugin::instantiate( const QString & pluginName, Model * parent,
|
||||
QLibrary pluginLibrary( ConfigManager::inst()->pluginDir() + pluginName );
|
||||
if( pluginLibrary.load() == false )
|
||||
{
|
||||
if( engine::hasGUI() )
|
||||
if( Engine::hasGUI() )
|
||||
{
|
||||
QMessageBox::information( NULL,
|
||||
tr( "Plugin not found" ),
|
||||
@@ -110,7 +110,7 @@ Plugin * Plugin::instantiate( const QString & pluginName, Model * parent,
|
||||
InstantiationHook instantiationHook = ( InstantiationHook ) pluginLibrary.resolve( "lmms_plugin_main" );
|
||||
if( instantiationHook == NULL )
|
||||
{
|
||||
if( engine::hasGUI() )
|
||||
if( Engine::hasGUI() )
|
||||
{
|
||||
QMessageBox::information( NULL,
|
||||
tr( "Error while loading plugin" ),
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "PresetPreviewPlayHandle.h"
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Instrument.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "MidiPort.h"
|
||||
@@ -123,10 +123,10 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file,
|
||||
}
|
||||
|
||||
|
||||
const bool j = engine::projectJournal()->isJournalling();
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
const bool j = Engine::projectJournal()->isJournalling();
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
engine::setSuppressMessages( true );
|
||||
Engine::setSuppressMessages( true );
|
||||
|
||||
if( _load_by_plugin )
|
||||
{
|
||||
@@ -137,7 +137,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file,
|
||||
{
|
||||
i = s_previewTC->previewInstrumentTrack()->
|
||||
loadInstrument(
|
||||
engine::pluginFileHandling()[ext] );
|
||||
Engine::pluginFileHandling()[ext] );
|
||||
}
|
||||
if( i != NULL )
|
||||
{
|
||||
@@ -152,7 +152,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file,
|
||||
dataFile.content().firstChild().toElement() );
|
||||
}
|
||||
|
||||
engine::setSuppressMessages( false );
|
||||
Engine::setSuppressMessages( false );
|
||||
|
||||
// make sure, our preset-preview-track does not appear in any MIDI-
|
||||
// devices list, so just disable receiving/sending MIDI-events at all
|
||||
@@ -170,7 +170,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file,
|
||||
s_previewTC->setPreviewNote( m_previewNote );
|
||||
|
||||
s_previewTC->unlockData();
|
||||
engine::projectJournal()->setJournalling( j );
|
||||
Engine::projectJournal()->setJournalling( j );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <cstdlib>
|
||||
|
||||
#include "ProjectJournal.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "JournallingObject.h"
|
||||
#include "Song.h"
|
||||
|
||||
@@ -66,7 +66,7 @@ void ProjectJournal::undo()
|
||||
setJournalling( false );
|
||||
jo->restoreState( c.data.content().firstChildElement() );
|
||||
setJournalling( prev );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ void ProjectJournal::redo()
|
||||
setJournalling( false );
|
||||
jo->restoreState( c.data.content().firstChildElement() );
|
||||
setJournalling( prev );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "ProjectRenderer.h"
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
|
||||
#include "AudioFileWave.h"
|
||||
#include "AudioFileOgg.h"
|
||||
@@ -66,10 +66,10 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & _qs,
|
||||
const OutputSettings & _os,
|
||||
ExportFileFormats _file_format,
|
||||
const QString & _out_file ) :
|
||||
QThread( engine::mixer() ),
|
||||
QThread( Engine::mixer() ),
|
||||
m_fileDev( NULL ),
|
||||
m_qualitySettings( _qs ),
|
||||
m_oldQualitySettings( engine::mixer()->currentQualitySettings() ),
|
||||
m_oldQualitySettings( Engine::mixer()->currentQualitySettings() ),
|
||||
m_progress( 0 ),
|
||||
m_abort( false )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & _qs,
|
||||
_out_file, _os.vbr,
|
||||
_os.bitrate, _os.bitrate - 64, _os.bitrate + 64,
|
||||
_os.depth == Depth_32Bit ? 32 : 16,
|
||||
engine::mixer() );
|
||||
Engine::mixer() );
|
||||
if( success_ful == false )
|
||||
{
|
||||
delete m_fileDev;
|
||||
@@ -132,7 +132,7 @@ void ProjectRenderer::startProcessing()
|
||||
// have to do mixer stuff with GUI-thread-affinity in order to
|
||||
// make slots connected to sampleRateChanged()-signals being
|
||||
// called immediately
|
||||
engine::mixer()->setAudioDevice( m_fileDev,
|
||||
Engine::mixer()->setAudioDevice( m_fileDev,
|
||||
m_qualitySettings, false );
|
||||
|
||||
start(
|
||||
@@ -159,15 +159,15 @@ void ProjectRenderer::run()
|
||||
#endif
|
||||
|
||||
|
||||
engine::getSong()->startExport();
|
||||
Engine::getSong()->startExport();
|
||||
|
||||
Song::playPos & pp = engine::getSong()->getPlayPos(
|
||||
Song::playPos & pp = Engine::getSong()->getPlayPos(
|
||||
Song::Mode_PlaySong );
|
||||
m_progress = 0;
|
||||
const int sl = ( engine::getSong()->length() + 1 ) * 192;
|
||||
const int sl = ( Engine::getSong()->length() + 1 ) * 192;
|
||||
|
||||
while( engine::getSong()->isExportDone() == false &&
|
||||
engine::getSong()->isExporting() == true
|
||||
while( Engine::getSong()->isExportDone() == false &&
|
||||
Engine::getSong()->isExporting() == true
|
||||
&& !m_abort )
|
||||
{
|
||||
m_fileDev->processNextBuffer();
|
||||
@@ -179,12 +179,12 @@ void ProjectRenderer::run()
|
||||
}
|
||||
}
|
||||
|
||||
engine::getSong()->stopExport();
|
||||
Engine::getSong()->stopExport();
|
||||
|
||||
const QString f = m_fileDev->outputFile();
|
||||
|
||||
engine::mixer()->restoreAudioDevice(); // also deletes audio-dev
|
||||
engine::mixer()->changeQuality( m_oldQualitySettings );
|
||||
Engine::mixer()->restoreAudioDevice(); // also deletes audio-dev
|
||||
Engine::mixer()->changeQuality( m_oldQualitySettings );
|
||||
|
||||
// if the user aborted export-process, the file has to be deleted
|
||||
if( m_abort )
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "RemotePlugin.h"
|
||||
#include "Mixer.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "ConfigManager.h"
|
||||
|
||||
#include <QDir>
|
||||
@@ -163,13 +163,13 @@ bool RemotePlugin::init( const QString &pluginExecutable,
|
||||
bool RemotePlugin::process( const sampleFrame * _in_buf,
|
||||
sampleFrame * _out_buf )
|
||||
{
|
||||
const fpp_t frames = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t frames = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
if( m_failed || !isRunning() )
|
||||
{
|
||||
if( _out_buf != NULL )
|
||||
{
|
||||
engine::mixer()->clearAudioBuffer( _out_buf,
|
||||
Engine::mixer()->clearAudioBuffer( _out_buf,
|
||||
frames );
|
||||
}
|
||||
return false;
|
||||
@@ -189,7 +189,7 @@ bool RemotePlugin::process( const sampleFrame * _in_buf,
|
||||
}
|
||||
if( _out_buf != NULL )
|
||||
{
|
||||
engine::mixer()->clearAudioBuffer( _out_buf,
|
||||
Engine::mixer()->clearAudioBuffer( _out_buf,
|
||||
frames );
|
||||
}
|
||||
return false;
|
||||
@@ -264,7 +264,7 @@ bool RemotePlugin::process( const sampleFrame * _in_buf,
|
||||
sampleFrame * o = (sampleFrame *) ( m_shm +
|
||||
m_inputCount*frames );
|
||||
// clear buffer, if plugin didn't fill up both channels
|
||||
engine::mixer()->clearAudioBuffer( _out_buf, frames );
|
||||
Engine::mixer()->clearAudioBuffer( _out_buf, frames );
|
||||
|
||||
for( ch_cnt_t ch = 0; ch <
|
||||
qMin<int>( DEFAULT_CHANNELS, outputs ); ++ch )
|
||||
@@ -302,7 +302,7 @@ void RemotePlugin::processMidiEvent( const MidiEvent & _e,
|
||||
void RemotePlugin::resizeSharedProcessingMemory()
|
||||
{
|
||||
const size_t s = ( m_inputCount+m_outputCount ) *
|
||||
engine::mixer()->framesPerPeriod() *
|
||||
Engine::mixer()->framesPerPeriod() *
|
||||
sizeof( float );
|
||||
if( m_shm != NULL )
|
||||
{
|
||||
@@ -355,12 +355,12 @@ bool RemotePlugin::processMessage( const message & _m )
|
||||
|
||||
case IdSampleRateInformation:
|
||||
reply = true;
|
||||
reply_message.addInt( engine::mixer()->processingSampleRate() );
|
||||
reply_message.addInt( Engine::mixer()->processingSampleRate() );
|
||||
break;
|
||||
|
||||
case IdBufferSizeInformation:
|
||||
reply = true;
|
||||
reply_message.addInt( engine::mixer()->framesPerPeriod() );
|
||||
reply_message.addInt( Engine::mixer()->framesPerPeriod() );
|
||||
break;
|
||||
|
||||
case IdChangeInputCount:
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
*/
|
||||
|
||||
#include "RingBuffer.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include <string.h>
|
||||
#include "MixHelpers.h"
|
||||
|
||||
|
||||
RingBuffer::RingBuffer( f_cnt_t size ) :
|
||||
m_fpp( engine::mixer()->framesPerPeriod() ),
|
||||
m_samplerate( engine::mixer()->processingSampleRate() ),
|
||||
m_fpp( Engine::mixer()->framesPerPeriod() ),
|
||||
m_samplerate( Engine::mixer()->processingSampleRate() ),
|
||||
m_size( size + m_fpp )
|
||||
{
|
||||
m_buffer = new sampleFrame[ m_size ];
|
||||
@@ -41,8 +41,8 @@ RingBuffer::RingBuffer( f_cnt_t size ) :
|
||||
|
||||
|
||||
RingBuffer::RingBuffer( float size ) :
|
||||
m_fpp( engine::mixer()->framesPerPeriod() ),
|
||||
m_samplerate( engine::mixer()->processingSampleRate() )
|
||||
m_fpp( Engine::mixer()->framesPerPeriod() ),
|
||||
m_samplerate( Engine::mixer()->processingSampleRate() )
|
||||
{
|
||||
m_size = msToFrames( size ) + m_fpp;
|
||||
m_buffer = new sampleFrame[ m_size ];
|
||||
@@ -93,11 +93,11 @@ void RingBuffer::setSamplerateAware( bool b )
|
||||
{
|
||||
if( b )
|
||||
{
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ), Qt::UniqueConnection );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ), Qt::UniqueConnection );
|
||||
}
|
||||
else
|
||||
{
|
||||
disconnect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
disconnect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,9 +310,9 @@ void RingBuffer::updateSamplerate()
|
||||
{
|
||||
lock();
|
||||
|
||||
float newsize = static_cast<float>( ( m_size - m_fpp ) * engine::mixer()->processingSampleRate() ) / m_samplerate;
|
||||
float newsize = static_cast<float>( ( m_size - m_fpp ) * Engine::mixer()->processingSampleRate() ) / m_samplerate;
|
||||
m_size = static_cast<f_cnt_t>( ceilf( newsize ) ) + m_fpp;
|
||||
m_samplerate = engine::mixer()->processingSampleRate();
|
||||
m_samplerate = Engine::mixer()->processingSampleRate();
|
||||
delete m_buffer;
|
||||
m_buffer = new sampleFrame[ m_size ];
|
||||
memset( m_buffer, 0, m_size * sizeof( sampleFrame ) );
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include "debug.h"
|
||||
#include "DrumSynth.h"
|
||||
#include "endian_handling.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "interpolation.h"
|
||||
#include "templates.h"
|
||||
|
||||
@@ -78,13 +78,13 @@ SampleBuffer::SampleBuffer( const QString & _audio_file,
|
||||
m_amplification( 1.0f ),
|
||||
m_reversed( false ),
|
||||
m_frequency( BaseFreq ),
|
||||
m_sampleRate( engine::mixer()->baseSampleRate() )
|
||||
m_sampleRate( Engine::mixer()->baseSampleRate() )
|
||||
{
|
||||
if( _is_base64_data == true )
|
||||
{
|
||||
loadFromBase64( _audio_file );
|
||||
}
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ SampleBuffer::SampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) :
|
||||
m_amplification( 1.0f ),
|
||||
m_reversed( false ),
|
||||
m_frequency( BaseFreq ),
|
||||
m_sampleRate( engine::mixer()->baseSampleRate() )
|
||||
m_sampleRate( Engine::mixer()->baseSampleRate() )
|
||||
{
|
||||
if( _frames > 0 )
|
||||
{
|
||||
@@ -112,7 +112,7 @@ SampleBuffer::SampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) :
|
||||
memcpy( m_origData, _data, _frames * BYTES_PER_FRAME );
|
||||
m_origFrames = _frames;
|
||||
}
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ SampleBuffer::SampleBuffer( const f_cnt_t _frames ) :
|
||||
m_amplification( 1.0f ),
|
||||
m_reversed( false ),
|
||||
m_frequency( BaseFreq ),
|
||||
m_sampleRate( engine::mixer()->baseSampleRate() )
|
||||
m_sampleRate( Engine::mixer()->baseSampleRate() )
|
||||
{
|
||||
if( _frames > 0 )
|
||||
{
|
||||
@@ -140,7 +140,7 @@ SampleBuffer::SampleBuffer( const f_cnt_t _frames ) :
|
||||
memset( m_origData, 0, _frames * BYTES_PER_FRAME );
|
||||
m_origFrames = _frames;
|
||||
}
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) );
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ void SampleBuffer::update( bool _keep_settings )
|
||||
int_sample_t * buf = NULL;
|
||||
sample_t * fbuf = NULL;
|
||||
ch_cnt_t channels = DEFAULT_CHANNELS;
|
||||
sample_rate_t samplerate = engine::mixer()->baseSampleRate();
|
||||
sample_rate_t samplerate = Engine::mixer()->baseSampleRate();
|
||||
m_frames = 0;
|
||||
|
||||
const QFileInfo fileInfo( file );
|
||||
@@ -359,10 +359,10 @@ void SampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr,
|
||||
bool _keep_settings )
|
||||
{
|
||||
// do samplerate-conversion to our default-samplerate
|
||||
if( _src_sr != engine::mixer()->baseSampleRate() )
|
||||
if( _src_sr != Engine::mixer()->baseSampleRate() )
|
||||
{
|
||||
SampleBuffer * resampled = resample( this, _src_sr,
|
||||
engine::mixer()->baseSampleRate() );
|
||||
Engine::mixer()->baseSampleRate() );
|
||||
MM_FREE( m_data );
|
||||
m_frames = resampled->frames();
|
||||
m_data = MM_ALLOC( sampleFrame, m_frames );
|
||||
@@ -621,7 +621,7 @@ bool SampleBuffer::play( sampleFrame * _ab, handleState * _state,
|
||||
bool is_backwards = _state->isBackwards();
|
||||
|
||||
const double freq_factor = (double) _freq / (double) m_frequency *
|
||||
m_sampleRate / engine::mixer()->processingSampleRate();
|
||||
m_sampleRate / Engine::mixer()->processingSampleRate();
|
||||
|
||||
// calculate how many frames we have in requested pitch
|
||||
const f_cnt_t total_frames_for_current_pitch = static_cast<f_cnt_t>( (
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "AudioPort.h"
|
||||
#include "bb_track.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "Pattern.h"
|
||||
#include "SampleBuffer.h"
|
||||
@@ -105,7 +105,7 @@ void SamplePlayHandle::play( sampleFrame * buffer )
|
||||
}
|
||||
|
||||
sampleFrame * workingBuffer = buffer;
|
||||
const fpp_t fpp = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t fpp = Engine::mixer()->framesPerPeriod();
|
||||
f_cnt_t frames = fpp;
|
||||
|
||||
// apply offset for the first period
|
||||
@@ -153,7 +153,7 @@ bool SamplePlayHandle::isFromTrack( const Track * _track ) const
|
||||
|
||||
f_cnt_t SamplePlayHandle::totalFrames() const
|
||||
{
|
||||
return ( m_sampleBuffer->endFrame() - m_sampleBuffer->startFrame() ) * ( engine::mixer()->processingSampleRate() / engine::mixer()->baseSampleRate() );
|
||||
return ( m_sampleBuffer->endFrame() - m_sampleBuffer->startFrame() ) * ( Engine::mixer()->processingSampleRate() / Engine::mixer()->baseSampleRate() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "SampleRecordHandle.h"
|
||||
#include "bb_track.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "Pattern.h"
|
||||
#include "SampleBuffer.h"
|
||||
@@ -68,12 +68,12 @@ SampleRecordHandle::~SampleRecordHandle()
|
||||
|
||||
void SampleRecordHandle::play( sampleFrame * /*_working_buffer*/ )
|
||||
{
|
||||
const sampleFrame * recbuf = engine::mixer()->inputBuffer();
|
||||
const f_cnt_t frames = engine::mixer()->inputBufferFrames();
|
||||
const sampleFrame * recbuf = Engine::mixer()->inputBuffer();
|
||||
const f_cnt_t frames = Engine::mixer()->inputBufferFrames();
|
||||
writeBuffer( recbuf, frames );
|
||||
m_framesRecorded += frames;
|
||||
|
||||
MidiTime len = (tick_t)( m_framesRecorded / engine::framesPerTick() );
|
||||
MidiTime len = (tick_t)( m_framesRecorded / Engine::framesPerTick() );
|
||||
if( len > m_minLength )
|
||||
{
|
||||
// m_tco->changeLength( len );
|
||||
@@ -129,7 +129,7 @@ void SampleRecordHandle::createSampleBuffer( SampleBuffer** sampleBuf )
|
||||
}
|
||||
// create according sample-buffer out of big buffer
|
||||
*sampleBuf = new SampleBuffer( data, frames );
|
||||
( *sampleBuf)->setSampleRate( engine::mixer()->inputSampleRate() );
|
||||
( *sampleBuf)->setSampleRate( Engine::mixer()->inputSampleRate() );
|
||||
delete[] data;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Song::Song() :
|
||||
this, SLOT( setTimeSignature() ) );
|
||||
|
||||
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this,
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this,
|
||||
SLOT( updateFramesPerTick() ) );
|
||||
|
||||
connect( &m_masterVolumeModel, SIGNAL( dataChanged() ),
|
||||
@@ -129,7 +129,7 @@ Song::~Song()
|
||||
|
||||
void Song::masterVolumeChanged()
|
||||
{
|
||||
engine::mixer()->setMasterGain( m_masterVolumeModel.value() /
|
||||
Engine::mixer()->setMasterGain( m_masterVolumeModel.value() /
|
||||
100.0f );
|
||||
}
|
||||
|
||||
@@ -138,9 +138,9 @@ void Song::masterVolumeChanged()
|
||||
|
||||
void Song::setTempo()
|
||||
{
|
||||
engine::mixer()->lockPlayHandleRemoval();
|
||||
Engine::mixer()->lockPlayHandleRemoval();
|
||||
const bpm_t tempo = (bpm_t) m_tempoModel.value();
|
||||
PlayHandleList & playHandles = engine::mixer()->playHandles();
|
||||
PlayHandleList & playHandles = Engine::mixer()->playHandles();
|
||||
for( PlayHandleList::Iterator it = playHandles.begin();
|
||||
it != playHandles.end(); ++it )
|
||||
{
|
||||
@@ -152,9 +152,9 @@ void Song::setTempo()
|
||||
nph->unlock();
|
||||
}
|
||||
}
|
||||
engine::mixer()->unlockPlayHandleRemoval();
|
||||
Engine::mixer()->unlockPlayHandleRemoval();
|
||||
|
||||
engine::updateFramesPerTick();
|
||||
Engine::updateFramesPerTick();
|
||||
|
||||
m_vstSyncController.setTempo( tempo );
|
||||
|
||||
@@ -216,9 +216,9 @@ void Song::processNextBuffer()
|
||||
break;
|
||||
|
||||
case Mode_PlayBB:
|
||||
if( engine::getBBTrackContainer()->numOfBBs() > 0 )
|
||||
if( Engine::getBBTrackContainer()->numOfBBs() > 0 )
|
||||
{
|
||||
tco_num = engine::getBBTrackContainer()->
|
||||
tco_num = Engine::getBBTrackContainer()->
|
||||
currentBB();
|
||||
track_list.push_back( bbTrack::findBBTrack(
|
||||
tco_num ) );
|
||||
@@ -261,14 +261,14 @@ void Song::processNextBuffer()
|
||||
}
|
||||
|
||||
f_cnt_t total_frames_played = 0;
|
||||
const float frames_per_tick = engine::framesPerTick();
|
||||
const float frames_per_tick = Engine::framesPerTick();
|
||||
|
||||
while( total_frames_played
|
||||
< engine::mixer()->framesPerPeriod() )
|
||||
< Engine::mixer()->framesPerPeriod() )
|
||||
{
|
||||
m_vstSyncController.update();
|
||||
|
||||
f_cnt_t played_frames = engine::mixer()->framesPerPeriod() - total_frames_played;
|
||||
f_cnt_t played_frames = Engine::mixer()->framesPerPeriod() - total_frames_played;
|
||||
|
||||
float current_frame = m_playPos[m_playMode].currentFrame();
|
||||
// did we play a tick?
|
||||
@@ -291,7 +291,7 @@ void Song::processNextBuffer()
|
||||
// or to loop back to first tact
|
||||
if( m_playMode == Mode_PlayBB )
|
||||
{
|
||||
max_tact = engine::getBBTrackContainer()
|
||||
max_tact = Engine::getBBTrackContainer()
|
||||
->lengthOfCurrentBB();
|
||||
}
|
||||
else if( m_playMode == Mode_PlayPattern &&
|
||||
@@ -606,7 +606,7 @@ void Song::stop()
|
||||
m_vstSyncController.setAbsolutePosition( m_playPos[m_playMode].getTicks() );
|
||||
|
||||
// remove all note-play-handles that are active
|
||||
engine::mixer()->clear();
|
||||
Engine::mixer()->clear();
|
||||
|
||||
m_playMode = Mode_None;
|
||||
|
||||
@@ -673,7 +673,7 @@ void Song::removeBar()
|
||||
void Song::addBBTrack()
|
||||
{
|
||||
Track * t = Track::create( Track::BBTrack, this );
|
||||
engine::getBBTrackContainer()->setCurrentBB( dynamic_cast<bbTrack *>( t )->index() );
|
||||
Engine::getBBTrackContainer()->setCurrentBB( dynamic_cast<bbTrack *>( t )->index() );
|
||||
}
|
||||
|
||||
|
||||
@@ -713,7 +713,7 @@ AutomationPattern * Song::tempoAutomationPattern()
|
||||
|
||||
void Song::clearProject()
|
||||
{
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
if( m_playing )
|
||||
{
|
||||
@@ -726,33 +726,33 @@ void Song::clearProject()
|
||||
}
|
||||
|
||||
|
||||
engine::mixer()->lock();
|
||||
if( engine::getBBEditor() )
|
||||
Engine::mixer()->lock();
|
||||
if( Engine::getBBEditor() )
|
||||
{
|
||||
engine::getBBEditor()->clearAllTracks();
|
||||
Engine::getBBEditor()->clearAllTracks();
|
||||
}
|
||||
if( engine::songEditor() )
|
||||
if( Engine::songEditor() )
|
||||
{
|
||||
engine::songEditor()->clearAllTracks();
|
||||
Engine::songEditor()->clearAllTracks();
|
||||
}
|
||||
if( engine::fxMixerView() )
|
||||
if( Engine::fxMixerView() )
|
||||
{
|
||||
engine::fxMixerView()->clear();
|
||||
Engine::fxMixerView()->clear();
|
||||
}
|
||||
QCoreApplication::sendPostedEvents();
|
||||
engine::getBBTrackContainer()->clearAllTracks();
|
||||
Engine::getBBTrackContainer()->clearAllTracks();
|
||||
clearAllTracks();
|
||||
|
||||
engine::fxMixer()->clear();
|
||||
Engine::fxMixer()->clear();
|
||||
|
||||
if( engine::automationEditor() )
|
||||
if( Engine::automationEditor() )
|
||||
{
|
||||
engine::automationEditor()->setCurrentPattern( NULL );
|
||||
Engine::automationEditor()->setCurrentPattern( NULL );
|
||||
}
|
||||
|
||||
if( engine::pianoRoll() )
|
||||
if( Engine::pianoRoll() )
|
||||
{
|
||||
engine::pianoRoll()->reset();
|
||||
Engine::pianoRoll()->reset();
|
||||
}
|
||||
|
||||
m_tempoModel.reset();
|
||||
@@ -766,11 +766,11 @@ void Song::clearProject()
|
||||
AutomationPattern::globalAutomationPattern( &m_masterPitchModel )->
|
||||
clear();
|
||||
|
||||
engine::mixer()->unlock();
|
||||
Engine::mixer()->unlock();
|
||||
|
||||
if( engine::getProjectNotes() )
|
||||
if( Engine::getProjectNotes() )
|
||||
{
|
||||
engine::getProjectNotes()->clear();
|
||||
Engine::getProjectNotes()->clear();
|
||||
}
|
||||
|
||||
// Move to function
|
||||
@@ -781,9 +781,9 @@ void Song::clearProject()
|
||||
|
||||
emit dataChanged();
|
||||
|
||||
engine::projectJournal()->clearJournal();
|
||||
Engine::projectJournal()->clearJournal();
|
||||
|
||||
engine::projectJournal()->setJournalling( true );
|
||||
Engine::projectJournal()->setJournalling( true );
|
||||
|
||||
InstrumentTrackView::cleanupWindowCache();
|
||||
}
|
||||
@@ -816,7 +816,7 @@ void Song::createNewProject()
|
||||
|
||||
clearProject();
|
||||
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
m_fileName = m_oldFileName = "";
|
||||
|
||||
@@ -825,7 +825,7 @@ void Song::createNewProject()
|
||||
dynamic_cast<InstrumentTrack * >( t )->loadInstrument(
|
||||
"tripleoscillator" );
|
||||
t = Track::create( Track::InstrumentTrack,
|
||||
engine::getBBTrackContainer() );
|
||||
Engine::getBBTrackContainer() );
|
||||
dynamic_cast<InstrumentTrack * >( t )->loadInstrument(
|
||||
"kicker" );
|
||||
Track::create( Track::SampleTrack, this );
|
||||
@@ -841,17 +841,17 @@ void Song::createNewProject()
|
||||
|
||||
m_loadingProject = false;
|
||||
|
||||
engine::getBBTrackContainer()->updateAfterTrackAdd();
|
||||
Engine::getBBTrackContainer()->updateAfterTrackAdd();
|
||||
|
||||
engine::projectJournal()->setJournalling( true );
|
||||
Engine::projectJournal()->setJournalling( true );
|
||||
|
||||
QCoreApplication::sendPostedEvents();
|
||||
|
||||
m_modified = false;
|
||||
|
||||
if( engine::mainWindow() )
|
||||
if( Engine::mainWindow() )
|
||||
{
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
Engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -865,9 +865,9 @@ void Song::createNewProjectFromTemplate( const QString & _template )
|
||||
// saving...
|
||||
m_fileName = m_oldFileName = "";
|
||||
// update window title
|
||||
if( engine::mainWindow() )
|
||||
if( Engine::mainWindow() )
|
||||
{
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
Engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -882,7 +882,7 @@ void Song::loadProject( const QString & _file_name )
|
||||
|
||||
m_loadingProject = true;
|
||||
|
||||
engine::projectJournal()->setJournalling( false );
|
||||
Engine::projectJournal()->setJournalling( false );
|
||||
|
||||
m_fileName = _file_name;
|
||||
m_oldFileName = _file_name;
|
||||
@@ -899,7 +899,7 @@ void Song::loadProject( const QString & _file_name )
|
||||
|
||||
DataFile::LocaleHelper localeHelper( DataFile::LocaleHelper::ModeLoad );
|
||||
|
||||
engine::mixer()->lock();
|
||||
Engine::mixer()->lock();
|
||||
|
||||
// get the header information from the DOM
|
||||
m_tempoModel.loadSettings( dataFile.head(), "bpm" );
|
||||
@@ -923,14 +923,14 @@ void Song::loadProject( const QString & _file_name )
|
||||
PeakController::initGetControllerBySetting();
|
||||
|
||||
// Load mixer first to be able to set the correct range for FX channels
|
||||
node = dataFile.content().firstChildElement( engine::fxMixer()->nodeName() );
|
||||
node = dataFile.content().firstChildElement( Engine::fxMixer()->nodeName() );
|
||||
if( !node.isNull() )
|
||||
{
|
||||
engine::fxMixer()->restoreState( node.toElement() );
|
||||
if( engine::hasGUI() )
|
||||
Engine::fxMixer()->restoreState( node.toElement() );
|
||||
if( Engine::hasGUI() )
|
||||
{
|
||||
// refresh FxMixerView
|
||||
engine::fxMixerView()->refreshDisplay();
|
||||
Engine::fxMixerView()->refreshDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -947,23 +947,23 @@ void Song::loadProject( const QString & _file_name )
|
||||
{
|
||||
restoreControllerStates( node.toElement() );
|
||||
}
|
||||
else if( engine::hasGUI() )
|
||||
else if( Engine::hasGUI() )
|
||||
{
|
||||
if( node.nodeName() == engine::getControllerRackView()->nodeName() )
|
||||
if( node.nodeName() == Engine::getControllerRackView()->nodeName() )
|
||||
{
|
||||
engine::getControllerRackView()->restoreState( node.toElement() );
|
||||
Engine::getControllerRackView()->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() == engine::pianoRoll()->nodeName() )
|
||||
else if( node.nodeName() == Engine::pianoRoll()->nodeName() )
|
||||
{
|
||||
engine::pianoRoll()->restoreState( node.toElement() );
|
||||
Engine::pianoRoll()->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() == engine::automationEditor()->nodeName() )
|
||||
else if( node.nodeName() == Engine::automationEditor()->nodeName() )
|
||||
{
|
||||
engine::automationEditor()->restoreState( node.toElement() );
|
||||
Engine::automationEditor()->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() == engine::getProjectNotes()->nodeName() )
|
||||
else if( node.nodeName() == Engine::getProjectNotes()->nodeName() )
|
||||
{
|
||||
engine::getProjectNotes()->SerializingObject::restoreState( node.toElement() );
|
||||
Engine::getProjectNotes()->SerializingObject::restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() == m_playPos[Mode_PlaySong].m_timeLine->nodeName() )
|
||||
{
|
||||
@@ -976,7 +976,7 @@ void Song::loadProject( const QString & _file_name )
|
||||
|
||||
// quirk for fixing projects with broken positions of TCOs inside
|
||||
// BB-tracks
|
||||
engine::getBBTrackContainer()->fixIncorrectPositions();
|
||||
Engine::getBBTrackContainer()->fixIncorrectPositions();
|
||||
|
||||
// Connect controller links to their controllers
|
||||
// now that everything is loaded
|
||||
@@ -986,20 +986,20 @@ void Song::loadProject( const QString & _file_name )
|
||||
AutomationPattern::resolveAllIDs();
|
||||
|
||||
|
||||
engine::mixer()->unlock();
|
||||
Engine::mixer()->unlock();
|
||||
|
||||
ConfigManager::inst()->addRecentlyOpenedProject( _file_name );
|
||||
|
||||
engine::projectJournal()->setJournalling( true );
|
||||
Engine::projectJournal()->setJournalling( true );
|
||||
|
||||
emit projectLoaded();
|
||||
|
||||
m_loadingProject = false;
|
||||
m_modified = false;
|
||||
|
||||
if( engine::mainWindow() )
|
||||
if( Engine::mainWindow() )
|
||||
{
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
Engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1019,13 +1019,13 @@ bool Song::saveProjectFile( const QString & _filename )
|
||||
saveState( dataFile, dataFile.content() );
|
||||
|
||||
m_globalAutomationTrack->saveState( dataFile, dataFile.content() );
|
||||
engine::fxMixer()->saveState( dataFile, dataFile.content() );
|
||||
if( engine::hasGUI() )
|
||||
Engine::fxMixer()->saveState( dataFile, dataFile.content() );
|
||||
if( Engine::hasGUI() )
|
||||
{
|
||||
engine::getControllerRackView()->saveState( dataFile, dataFile.content() );
|
||||
engine::pianoRoll()->saveState( dataFile, dataFile.content() );
|
||||
engine::automationEditor()->saveState( dataFile, dataFile.content() );
|
||||
engine::getProjectNotes()->SerializingObject::saveState( dataFile, dataFile.content() );
|
||||
Engine::getControllerRackView()->saveState( dataFile, dataFile.content() );
|
||||
Engine::pianoRoll()->saveState( dataFile, dataFile.content() );
|
||||
Engine::automationEditor()->saveState( dataFile, dataFile.content() );
|
||||
Engine::getProjectNotes()->SerializingObject::saveState( dataFile, dataFile.content() );
|
||||
m_playPos[Mode_PlaySong].m_timeLine->saveState( dataFile, dataFile.content() );
|
||||
}
|
||||
|
||||
@@ -1041,7 +1041,7 @@ bool Song::guiSaveProject()
|
||||
{
|
||||
DataFile dataFile( DataFile::SongProject );
|
||||
m_fileName = dataFile.nameWithExtension( m_fileName );
|
||||
if( saveProjectFile( m_fileName ) && engine::hasGUI() )
|
||||
if( saveProjectFile( m_fileName ) && Engine::hasGUI() )
|
||||
{
|
||||
textFloat::displayMessage( tr( "Project saved" ),
|
||||
tr( "The project %1 is now saved."
|
||||
@@ -1050,9 +1050,9 @@ bool Song::guiSaveProject()
|
||||
2000 );
|
||||
ConfigManager::inst()->addRecentlyOpenedProject( m_fileName );
|
||||
m_modified = false;
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
Engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
else if( engine::hasGUI() )
|
||||
else if( Engine::hasGUI() )
|
||||
{
|
||||
textFloat::displayMessage( tr( "Project NOT saved." ),
|
||||
tr( "The project %1 was not saved!" ).arg(
|
||||
@@ -1136,7 +1136,7 @@ void Song::restoreControllerStates( const QDomElement & _this )
|
||||
* This line removes the previously added controller for PeakController
|
||||
* without affecting the order of controllers in Controller Rack
|
||||
*/
|
||||
engine::getSong()->removeController( c );
|
||||
Engine::getSong()->removeController( c );
|
||||
addController( c );
|
||||
|
||||
node = node.nextSibling();
|
||||
@@ -1153,7 +1153,7 @@ void Song::exportProject(bool multiExport)
|
||||
{
|
||||
if( isEmpty() )
|
||||
{
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
QMessageBox::information( Engine::mainWindow(),
|
||||
tr( "Empty project" ),
|
||||
tr( "This project is empty so exporting makes "
|
||||
"no sense. Please put some items into "
|
||||
@@ -1161,7 +1161,7 @@ void Song::exportProject(bool multiExport)
|
||||
return;
|
||||
}
|
||||
|
||||
FileDialog efd( engine::mainWindow() );
|
||||
FileDialog efd( Engine::mainWindow() );
|
||||
if (multiExport)
|
||||
{
|
||||
efd.setFileMode( FileDialog::Directory);
|
||||
@@ -1221,7 +1221,7 @@ void Song::exportProject(bool multiExport)
|
||||
}
|
||||
|
||||
const QString export_file_name = efd.selectedFiles()[0] + suffix;
|
||||
exportProjectDialog epd( export_file_name, engine::mainWindow(), multiExport );
|
||||
exportProjectDialog epd( export_file_name, Engine::mainWindow(), multiExport );
|
||||
epd.exec();
|
||||
}
|
||||
}
|
||||
@@ -1231,7 +1231,7 @@ void Song::exportProject(bool multiExport)
|
||||
|
||||
void Song::updateFramesPerTick()
|
||||
{
|
||||
engine::updateFramesPerTick();
|
||||
Engine::updateFramesPerTick();
|
||||
}
|
||||
|
||||
|
||||
@@ -1242,10 +1242,10 @@ void Song::setModified()
|
||||
if( !m_loadingProject )
|
||||
{
|
||||
m_modified = true;
|
||||
if( engine::mainWindow() &&
|
||||
QThread::currentThread() == engine::mainWindow()->thread() )
|
||||
if( Engine::mainWindow() &&
|
||||
QThread::currentThread() == Engine::mainWindow()->thread() )
|
||||
{
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
Engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1272,9 +1272,9 @@ void Song::removeController( Controller * _controller )
|
||||
{
|
||||
m_controllers.remove( index );
|
||||
|
||||
if( engine::getSong() )
|
||||
if( Engine::getSong() )
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
emit dataChanged();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <QDomElement>
|
||||
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Song.h"
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min,
|
||||
m_scale( _scale ),
|
||||
m_custom( _parent )
|
||||
{
|
||||
connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
this, SLOT( calculateTempoSyncTime( bpm_t ) ) );
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ void TempoSyncKnobModel::setTempoSync( QAction * _item )
|
||||
void TempoSyncKnobModel::setTempoSync( int _note_type )
|
||||
{
|
||||
setSyncMode( ( TempoSyncMode ) _note_type );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ void TempoSyncKnobModel::setSyncMode( TempoSyncMode _new_mode )
|
||||
this, SLOT( updateCustom() ) );
|
||||
}
|
||||
}
|
||||
calculateTempoSyncTime( engine::getSong()->getTempo() );
|
||||
calculateTempoSyncTime( Engine::getSong()->getTempo() );
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ void TempoSyncKnobModel::setSyncMode( TempoSyncMode _new_mode )
|
||||
void TempoSyncKnobModel::setScale( float _new_scale )
|
||||
{
|
||||
m_scale = _new_scale;
|
||||
calculateTempoSyncTime( engine::getSong()->getTempo() );
|
||||
calculateTempoSyncTime( Engine::getSong()->getTempo() );
|
||||
emit scaleChanged( _new_scale );
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "Clipboard.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -151,7 +151,7 @@ void trackContentObject::movePosition( const MidiTime & _pos )
|
||||
if( m_startPosition != _pos )
|
||||
{
|
||||
m_startPosition = _pos;
|
||||
engine::getSong()->updateLength();
|
||||
Engine::getSong()->updateLength();
|
||||
}
|
||||
emit positionChanged();
|
||||
}
|
||||
@@ -171,7 +171,7 @@ void trackContentObject::changeLength( const MidiTime & _length )
|
||||
if( m_length != _length )
|
||||
{
|
||||
m_length = _length;
|
||||
engine::getSong()->updateLength();
|
||||
Engine::getSong()->updateLength();
|
||||
}
|
||||
emit lengthChanged();
|
||||
}
|
||||
@@ -1102,7 +1102,7 @@ void trackContentWidget::removeTCOView( trackContentObjectView * _tcov )
|
||||
if( it != m_tcoViews.end() )
|
||||
{
|
||||
m_tcoViews.erase( it );
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1134,9 +1134,9 @@ void trackContentWidget::update()
|
||||
*/
|
||||
void trackContentWidget::changePosition( const MidiTime & _new_pos )
|
||||
{
|
||||
if( m_trackView->trackContainerView() == engine::getBBEditor() )
|
||||
if( m_trackView->trackContainerView() == Engine::getBBEditor() )
|
||||
{
|
||||
const int cur_bb = engine::getBBTrackContainer()->currentBB();
|
||||
const int cur_bb = Engine::getBBTrackContainer()->currentBB();
|
||||
setUpdatesEnabled( false );
|
||||
|
||||
// first show TCO for current BB...
|
||||
@@ -1466,7 +1466,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe )
|
||||
int ppt = static_cast<int>( tcv->pixelsPerTact() );
|
||||
QPainter p( this );
|
||||
// Don't draw background on BB-Editor
|
||||
if( m_trackView->trackContainerView() != engine::getBBEditor() )
|
||||
if( m_trackView->trackContainerView() != Engine::getBBEditor() )
|
||||
{
|
||||
p.drawTiledPixmap( rect(), m_background, QPoint(
|
||||
tcv->currentPosition().getTact() * ppt, 0 ) );
|
||||
@@ -2076,10 +2076,10 @@ void Track::removeTCO( trackContentObject * _tco )
|
||||
if( it != m_trackContentObjects.end() )
|
||||
{
|
||||
m_trackContentObjects.erase( it );
|
||||
if( engine::getSong() )
|
||||
if( Engine::getSong() )
|
||||
{
|
||||
engine::getSong()->updateLength();
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->updateLength();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "TrackContainer.h"
|
||||
#include "InstrumentTrack.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Song.h"
|
||||
|
||||
@@ -82,14 +82,14 @@ void TrackContainer::loadSettings( const QDomElement & _this )
|
||||
static QProgressDialog * pd = NULL;
|
||||
bool was_null = ( pd == NULL );
|
||||
int start_val = 0;
|
||||
if( !journalRestore && engine::hasGUI() )
|
||||
if( !journalRestore && Engine::hasGUI() )
|
||||
{
|
||||
if( pd == NULL )
|
||||
{
|
||||
pd = new QProgressDialog( tr( "Loading project..." ),
|
||||
tr( "Cancel" ), 0,
|
||||
_this.childNodes().count(),
|
||||
engine::mainWindow() );
|
||||
Engine::mainWindow() );
|
||||
pd->setWindowModality( Qt::ApplicationModal );
|
||||
pd->setWindowTitle( tr( "Please wait..." ) );
|
||||
pd->show();
|
||||
@@ -185,9 +185,9 @@ void TrackContainer::removeTrack( Track * _track )
|
||||
m_tracks.remove( index );
|
||||
m_tracksMutex.unlock();
|
||||
|
||||
if( engine::getSong() )
|
||||
if( Engine::getSong() )
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "lmmsconfig.h"
|
||||
#include "Mixer.h"
|
||||
#include "VstSyncController.h"
|
||||
@@ -54,7 +54,7 @@ VstSyncController::VstSyncController() :
|
||||
{
|
||||
if( ConfigManager::inst()->value( "ui", "syncvstplugins" ).toInt() )
|
||||
{
|
||||
connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) );
|
||||
|
||||
#ifdef USE_QT_SHMEM
|
||||
if ( m_shm.create( sizeof( VstSyncData ) ) )
|
||||
@@ -104,7 +104,7 @@ VstSyncController::VstSyncController() :
|
||||
}
|
||||
|
||||
m_syncData->isPlaying = false;
|
||||
m_syncData->m_bufferSize = engine::mixer()->framesPerPeriod();
|
||||
m_syncData->m_bufferSize = Engine::mixer()->framesPerPeriod();
|
||||
m_syncData->timeSigNumer = 4;
|
||||
m_syncData->timeSigDenom = 4;
|
||||
|
||||
@@ -176,7 +176,7 @@ void VstSyncController::startCycle( int startTick, int endTick )
|
||||
|
||||
void VstSyncController::update()
|
||||
{
|
||||
m_syncData->m_bufferSize = engine::mixer()->framesPerPeriod();
|
||||
m_syncData->m_bufferSize = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
#ifdef VST_SNC_LATENCY
|
||||
m_syncData->m_latency = m_syncData->m_bufferSize * m_syncData->m_bpm / ( (float) m_syncData->m_sampleRate * 60 );
|
||||
@@ -187,7 +187,7 @@ void VstSyncController::update()
|
||||
|
||||
void VstSyncController::updateSampleRate()
|
||||
{
|
||||
m_syncData->m_sampleRate = engine::mixer()->processingSampleRate();
|
||||
m_syncData->m_sampleRate = Engine::mixer()->processingSampleRate();
|
||||
|
||||
#ifdef VST_SNC_LATENCY
|
||||
m_syncData->m_latency = m_syncData->m_bufferSize * m_syncData->m_bpm / ( (float) m_syncData->m_sampleRate * 60 );
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "endian_handling.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "LcdSpinBox.h"
|
||||
#include "gui_templates.h"
|
||||
#include "templates.h"
|
||||
@@ -202,7 +202,7 @@ void AudioAlsa::applyQualitySettings()
|
||||
{
|
||||
if( hqAudio() )
|
||||
{
|
||||
setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
if( m_handle != NULL )
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "templates.h"
|
||||
#include "gui_templates.h"
|
||||
#include "ConfigManager.h"
|
||||
@@ -106,7 +106,7 @@ void AudioJack::restartAfterZombified()
|
||||
{
|
||||
m_active = false;
|
||||
startProcessing();
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
QMessageBox::information( Engine::mainWindow(),
|
||||
tr( "JACK client restarted" ),
|
||||
tr( "LMMS was kicked by JACK for some reason. "
|
||||
"Therefore the JACK backend of LMMS has been "
|
||||
@@ -115,7 +115,7 @@ void AudioJack::restartAfterZombified()
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information( engine::mainWindow(),
|
||||
QMessageBox::information( Engine::mainWindow(),
|
||||
tr( "JACK server down" ),
|
||||
tr( "The JACK server seems to have been shutdown "
|
||||
"and starting a new instance failed. "
|
||||
@@ -259,7 +259,7 @@ void AudioJack::applyQualitySettings()
|
||||
{
|
||||
if( hqAudio() )
|
||||
{
|
||||
setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
if( jack_get_sample_rate( m_client ) != sampleRate() )
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "endian_handling.h"
|
||||
#include "LcdSpinBox.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "templates.h"
|
||||
|
||||
@@ -268,7 +268,7 @@ void AudioOss::applyQualitySettings()
|
||||
{
|
||||
if( hqAudio() )
|
||||
{
|
||||
setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
unsigned int value = sampleRate();
|
||||
if ( ioctl( m_audioFD, SNDCTL_DSP_SPEED, &value ) < 0 )
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "AudioDevice.h"
|
||||
#include "EffectChain.h"
|
||||
#include "FxMixer.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "MixHelpers.h"
|
||||
#include "BufferManager.h"
|
||||
#include "ValueBuffer.h"
|
||||
@@ -44,7 +44,7 @@ AudioPort::AudioPort( const QString & _name, bool _has_effect_chain,
|
||||
m_volumeModel( volumeModel ),
|
||||
m_panningModel( panningModel )
|
||||
{
|
||||
engine::mixer()->addAudioPort( this );
|
||||
Engine::mixer()->addAudioPort( this );
|
||||
setExtOutputEnabled( true );
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ AudioPort::AudioPort( const QString & _name, bool _has_effect_chain,
|
||||
AudioPort::~AudioPort()
|
||||
{
|
||||
setExtOutputEnabled( false );
|
||||
engine::mixer()->removeAudioPort( this );
|
||||
Engine::mixer()->removeAudioPort( this );
|
||||
delete m_effects;
|
||||
}
|
||||
|
||||
@@ -68,11 +68,11 @@ void AudioPort::setExtOutputEnabled( bool _enabled )
|
||||
m_extOutputEnabled = _enabled;
|
||||
if( m_extOutputEnabled )
|
||||
{
|
||||
engine::mixer()->audioDev()->registerPort( this );
|
||||
Engine::mixer()->audioDev()->registerPort( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::mixer()->audioDev()->unregisterPort( this );
|
||||
Engine::mixer()->audioDev()->unregisterPort( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,7 +83,7 @@ void AudioPort::setExtOutputEnabled( bool _enabled )
|
||||
void AudioPort::setName( const QString & _name )
|
||||
{
|
||||
m_name = _name;
|
||||
engine::mixer()->audioDev()->renamePort( this );
|
||||
Engine::mixer()->audioDev()->renamePort( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ bool AudioPort::processEffects()
|
||||
{
|
||||
if( m_effects )
|
||||
{
|
||||
bool more = m_effects->processAudioBuffer( m_portBuffer, engine::mixer()->framesPerPeriod(), m_bufferUsage );
|
||||
bool more = m_effects->processAudioBuffer( m_portBuffer, Engine::mixer()->framesPerPeriod(), m_bufferUsage );
|
||||
return more;
|
||||
}
|
||||
return false;
|
||||
@@ -102,11 +102,11 @@ bool AudioPort::processEffects()
|
||||
|
||||
void AudioPort::doProcessing()
|
||||
{
|
||||
const fpp_t fpp = engine::mixer()->framesPerPeriod();
|
||||
const fpp_t fpp = Engine::mixer()->framesPerPeriod();
|
||||
|
||||
m_portBuffer = BufferManager::acquire(); // get buffer for processing
|
||||
|
||||
engine::mixer()->clearAudioBuffer( m_portBuffer, fpp ); // clear the audioport buffer so we can use it
|
||||
Engine::mixer()->clearAudioBuffer( m_portBuffer, fpp ); // clear the audioport buffer so we can use it
|
||||
|
||||
//qDebug( "Playhandles: %d", m_playHandles.size() );
|
||||
foreach( PlayHandle * ph, m_playHandles ) // now we mix all playhandle buffers into the audioport buffer
|
||||
@@ -215,7 +215,7 @@ void AudioPort::doProcessing()
|
||||
const bool me = processEffects();
|
||||
if( me || m_bufferUsage )
|
||||
{
|
||||
engine::fxMixer()->mixToChannel( m_portBuffer, m_nextFxChannel ); // send output to fx mixer
|
||||
Engine::fxMixer()->mixToChannel( m_portBuffer, m_nextFxChannel ); // send output to fx mixer
|
||||
// TODO: improve the flow here - convert to pull model
|
||||
m_bufferUsage = false;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void AudioPortAudioSetupUtil::updateChannels()
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "debug.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "gui_templates.h"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "LcdSpinBox.h"
|
||||
#include "gui_templates.h"
|
||||
#include "templates.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
|
||||
|
||||
static void stream_write_callback(pa_stream *s, size_t length, void *userdata)
|
||||
@@ -179,7 +179,7 @@ static void context_state_callback(pa_context *c, void *userdata)
|
||||
buffer_attr.minreq = (uint32_t)(-1);
|
||||
buffer_attr.fragsize = (uint32_t)(-1);
|
||||
|
||||
double latency = (double)( engine::mixer()->framesPerPeriod() ) /
|
||||
double latency = (double)( Engine::mixer()->framesPerPeriod() ) /
|
||||
(double)_this->sampleRate();
|
||||
|
||||
// ask PulseAudio for the desired latency (which might not be approved)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "debug.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "gui_templates.h"
|
||||
@@ -131,7 +131,7 @@ void AudioSdl::applyQualitySettings()
|
||||
{
|
||||
SDL_CloseAudio();
|
||||
|
||||
setSampleRate( engine::mixer()->processingSampleRate() );
|
||||
setSampleRate( Engine::mixer()->processingSampleRate() );
|
||||
|
||||
m_audioHandle.freq = sampleRate();
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "LmmsStyle.h"
|
||||
#include "ImportFilter.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -437,7 +437,7 @@ int main( int argc, char * * argv )
|
||||
qApp->processEvents();
|
||||
|
||||
// init central engine which handles all components of LMMS
|
||||
engine::init();
|
||||
Engine::init();
|
||||
|
||||
splashScreen.hide();
|
||||
|
||||
@@ -449,7 +449,7 @@ int main( int argc, char * * argv )
|
||||
QString recoveryFile = ConfigManager::inst()->recoveryFile();
|
||||
|
||||
if( QFileInfo(recoveryFile).exists() &&
|
||||
QMessageBox::question( engine::mainWindow(), MainWindow::tr( "Project recovery" ),
|
||||
QMessageBox::question( Engine::mainWindow(), MainWindow::tr( "Project recovery" ),
|
||||
MainWindow::tr( "It looks like the last session did not end properly. "
|
||||
"Do you want to recover the project of this session?" ),
|
||||
QMessageBox::Yes | QMessageBox::No ) == QMessageBox::Yes )
|
||||
@@ -460,54 +460,54 @@ int main( int argc, char * * argv )
|
||||
// we try to load given file
|
||||
if( !file_to_load.isEmpty() )
|
||||
{
|
||||
engine::mainWindow()->show();
|
||||
Engine::mainWindow()->show();
|
||||
if( fullscreen )
|
||||
{
|
||||
engine::mainWindow()->showMaximized();
|
||||
Engine::mainWindow()->showMaximized();
|
||||
}
|
||||
if( file_to_load == recoveryFile )
|
||||
{
|
||||
engine::getSong()->createNewProjectFromTemplate( file_to_load );
|
||||
Engine::getSong()->createNewProjectFromTemplate( file_to_load );
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getSong()->loadProject( file_to_load );
|
||||
Engine::getSong()->loadProject( file_to_load );
|
||||
}
|
||||
}
|
||||
else if( !file_to_import.isEmpty() )
|
||||
{
|
||||
ImportFilter::import( file_to_import, engine::getSong() );
|
||||
ImportFilter::import( file_to_import, Engine::getSong() );
|
||||
if( exit_after_import )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
engine::mainWindow()->show();
|
||||
Engine::mainWindow()->show();
|
||||
if( fullscreen )
|
||||
{
|
||||
engine::mainWindow()->showMaximized();
|
||||
Engine::mainWindow()->showMaximized();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getSong()->createNewProject();
|
||||
Engine::getSong()->createNewProject();
|
||||
|
||||
// [Settel] workaround: showMaximized() doesn't work with
|
||||
// FVWM2 unless the window is already visible -> show() first
|
||||
engine::mainWindow()->show();
|
||||
Engine::mainWindow()->show();
|
||||
if( fullscreen )
|
||||
{
|
||||
engine::mainWindow()->showMaximized();
|
||||
Engine::mainWindow()->showMaximized();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// we're going to render our song
|
||||
engine::init( false );
|
||||
Engine::init( false );
|
||||
|
||||
printf( "loading project...\n" );
|
||||
engine::getSong()->loadProject( file_to_load );
|
||||
Engine::getSong()->loadProject( file_to_load );
|
||||
printf( "done\n" );
|
||||
|
||||
// create renderer
|
||||
@@ -527,7 +527,7 @@ int main( int argc, char * * argv )
|
||||
|
||||
if( profilerOutputFile.isEmpty() == false )
|
||||
{
|
||||
engine::mixer()->profiler().setOutputFile( profilerOutputFile );
|
||||
Engine::mixer()->profiler().setOutputFile( profilerOutputFile );
|
||||
}
|
||||
|
||||
// start now!
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "MidiAlsaSeq.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "Song.h"
|
||||
#include "MidiPort.h"
|
||||
@@ -96,14 +96,14 @@ MidiAlsaSeq::MidiAlsaSeq() :
|
||||
snd_seq_queue_tempo_t * tempo;
|
||||
snd_seq_queue_tempo_malloc( &tempo );
|
||||
snd_seq_queue_tempo_set_tempo( tempo, 6000000 /
|
||||
engine::getSong()->getTempo() );
|
||||
Engine::getSong()->getTempo() );
|
||||
snd_seq_queue_tempo_set_ppq( tempo, 16 );
|
||||
snd_seq_set_queue_tempo( m_seqHandle, m_queueID, tempo );
|
||||
snd_seq_queue_tempo_free( tempo );
|
||||
|
||||
snd_seq_start_queue( m_seqHandle, m_queueID, NULL );
|
||||
changeQueueTempo( engine::getSong()->getTempo() );
|
||||
connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
changeQueueTempo( Engine::getSong()->getTempo() );
|
||||
connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ),
|
||||
this, SLOT( changeQueueTempo( bpm_t ) ) );
|
||||
|
||||
// initial list-update
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QVector>
|
||||
|
||||
#include "Song.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "Mixer.h"
|
||||
#include "MidiClient.h"
|
||||
#include "MidiController.h"
|
||||
@@ -38,7 +38,7 @@ MidiController::MidiController( Model * _parent ) :
|
||||
Controller( Controller::MidiController, _parent, tr( "MIDI Controller" ) ),
|
||||
MidiEventProcessor(),
|
||||
m_midiPort( tr( "unnamed_midi_controller" ),
|
||||
engine::mixer()->midiClient(), this, this, MidiPort::Input ),
|
||||
Engine::mixer()->midiClient(), this, this, MidiPort::Input ),
|
||||
m_lastValue( 0.0f )
|
||||
{
|
||||
setSampleExact( true );
|
||||
|
||||
@@ -340,7 +340,7 @@ void MidiPort::updateMidiPortMode()
|
||||
emit writablePortsChanged();
|
||||
emit modeChanged();
|
||||
|
||||
engine::getSong()->setModified();
|
||||
Engine::getSong()->setModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "MidiWinMM.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "engine.h"
|
||||
#include "Engine.h"
|
||||
#include "gui_templates.h"
|
||||
#include "MidiPort.h"
|
||||
#include "note.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user