diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index 34e404420..b0ca74785 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -37,12 +37,12 @@ #include "FileDialog.h" #include "GigPlayer.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "InstrumentPlayHandle.h" #include "NotePlayHandle.h" #include "knob.h" -#include "song.h" +#include "Song.h" #include "ConfigManager.h" #include "endian_handling.h" @@ -87,13 +87,13 @@ GigInstrument::GigInstrument( InstrumentTrack * _instrument_track ) : m_currentKeyDimension( 0 ) { InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); updateSampleRate(); 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() ) ); } @@ -101,7 +101,7 @@ GigInstrument::GigInstrument( InstrumentTrack * _instrument_track ) : GigInstrument::~GigInstrument() { - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); freeInstance(); } @@ -316,8 +316,8 @@ void GigInstrument::playNote( NotePlayHandle * _n, sampleFrame * ) // the preferences) void GigInstrument::play( sampleFrame * _working_buffer ) { - const fpp_t frames = engine::mixer()->framesPerPeriod(); - const int rate = engine::mixer()->processingSampleRate(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); + const int rate = Engine::mixer()->processingSampleRate(); // Initialize to zeros std::memset( &_working_buffer[0][0], 0, DEFAULT_CHANNELS * frames * sizeof( float ) ); @@ -753,7 +753,7 @@ void GigInstrument::addSamples( GigNote & gignote, bool wantReleaseSample ) if( gignote.midiNote >= keyLow && gignote.midiNote <= keyHigh ) { float attenuation = pDimRegion->GetVelocityAttenuation( gignote.velocity ); - float length = (float) pSample->SamplesTotal / engine::mixer()->processingSampleRate(); + float length = (float) pSample->SamplesTotal / Engine::mixer()->processingSampleRate(); // TODO: sample panning? crossfade different layers? @@ -1094,7 +1094,7 @@ void GigInstrumentView::showFileDialog() if( f != "" ) { k->openFile( f ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index 215e79523..853decb32 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -109,9 +109,9 @@ bool MidiImport::tryImport( TrackContainer* tc ) "settings dialog and try again." ) ); } #else - if( engine::hasGUI() ) + if( Engine::hasGUI() ) { - QMessageBox::information( engine::mainWindow(), + QMessageBox::information( Engine::mainWindow(), tr( "Setup incomplete" ), tr( "You did not compile LMMS with support for " "SoundFont2 player, which is used to add default " diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index ec6bf6eed..93a14bbda 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -521,7 +521,7 @@ void bitInvaderView::usrWaveClicked() Engine::getSong()->setModified(); /* m_graph->model()->setWaveToNoise(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); // zero sample_shape for (int i = 0; i < sample_length; i++) { diff --git a/plugins/carlabase/carla.cpp b/plugins/carlabase/carla.cpp index 167a476d2..14c388a08 100644 --- a/plugins/carlabase/carla.cpp +++ b/plugins/carlabase/carla.cpp @@ -27,8 +27,8 @@ #define REAL_BUILD // FIXME this shouldn't be needed #include "CarlaHost.h" -#include "engine.h" -#include "song.h" +#include "Engine.h" +#include "Song.h" #include "gui_templates.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" @@ -181,14 +181,14 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D // 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()), this, SLOT(sampleRateChanged())); + connect(Engine::mixer(), SIGNAL(sampleRateChanged()), this, SLOT(sampleRateChanged())); } CarlaInstrument::~CarlaInstrument() { - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); if (fHost.resourceDir != NULL) { @@ -218,12 +218,12 @@ CarlaInstrument::~CarlaInstrument() uint32_t CarlaInstrument::handleGetBufferSize() const { - return engine::mixer()->framesPerPeriod(); + return Engine::mixer()->framesPerPeriod(); } double CarlaInstrument::handleGetSampleRate() const { - return engine::mixer()->processingSampleRate(); + return Engine::mixer()->processingSampleRate(); } bool CarlaInstrument::handleIsOffline() const @@ -317,7 +317,7 @@ void CarlaInstrument::loadSettings(const QDomElement& elem) void CarlaInstrument::play(sampleFrame* workingBuffer) { - const uint bufsize = engine::mixer()->framesPerPeriod(); + const uint bufsize = Engine::mixer()->framesPerPeriod(); std::memset(workingBuffer, 0, sizeof(sample_t)*bufsize*DEFAULT_CHANNELS); @@ -328,9 +328,9 @@ void CarlaInstrument::play(sampleFrame* workingBuffer) } // set time info - song* const s = engine::getSong(); + song* const s = Engine::getSong(); fTimeInfo.playing = s->isPlaying(); - fTimeInfo.frame = s->getPlayPos(s->playMode()).frames(engine::framesPerTick()); + fTimeInfo.frame = s->getPlayPos(s->playMode()).frames(Engine::framesPerTick()); fTimeInfo.usecs = s->getMilliseconds()*1000; fTimeInfo.bbt.bar = s->getTacts() + 1; fTimeInfo.bbt.beat = s->getBeat() + 1; diff --git a/plugins/papu/papu_instrument.cpp b/plugins/papu/papu_instrument.cpp index fc5ff38b7..9b4ad4bde 100644 --- a/plugins/papu/papu_instrument.cpp +++ b/plugins/papu/papu_instrument.cpp @@ -215,7 +215,7 @@ QString papuInstrument::nodeName() const /*f_cnt_t papuInstrument::desiredReleaseFrames() const { - const float samplerate = engine::mixer()->processingSampleRate(); + const float samplerate = Engine::mixer()->processingSampleRate(); int maxrel = 0; for( int i = 0 ; i < 3 ; ++i ) { diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index d3ada3829..d34bde876 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -32,7 +32,7 @@ #include "ModalBar.h" #include "TubeBell.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "InstrumentTrack.h" @@ -82,7 +82,7 @@ malletsInstrument::malletsInstrument( InstrumentTrack * _instrument_track ): + "sinewave.raw" ).exists() ) { // try to inform user about missing Stk-installation - if( m_filesMissing && engine::hasGUI() ) + if( m_filesMissing && Engine::hasGUI() ) { QMessageBox::information( 0, tr( "Missing files" ), tr( "Your Stk-installation seems to be " @@ -233,7 +233,7 @@ void malletsInstrument::playNote( NotePlayHandle * _n, m_vibratoFreqModel.value(), p, (uint8_t) m_spreadModel.value(), - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate() ); } else if( p == 9 ) { @@ -246,7 +246,7 @@ void malletsInstrument::playNote( NotePlayHandle * _n, m_lfoSpeedModel.value(), m_adsrModel.value(), (uint8_t) m_spreadModel.value(), - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate() ); } else { @@ -259,7 +259,7 @@ void malletsInstrument::playNote( NotePlayHandle * _n, m_strikeModel.value() * 128.0, m_velocityModel.value(), (uint8_t) m_spreadModel.value(), - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate() ); } m.unlock(); } diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index f6a38adc8..0cc604d63 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -188,7 +188,7 @@ void VstPlugin::tryLoad( const QString &remoteVstPluginExecutable ) { target->setFixedSize( m_pluginGeometry ); vstSubWin * sw = new vstSubWin( - engine::mainWindow()->workspace() ); + Engine::mainWindow()->workspace() ); sw->setWidget( helper ); helper->setWindowTitle( name() ); m_pluginWidget = helper; diff --git a/src/core/BufferManager.cpp b/src/core/BufferManager.cpp index b82b94e8f..cb38d45e9 100644 --- a/src/core/BufferManager.cpp +++ b/src/core/BufferManager.cpp @@ -99,12 +99,12 @@ void BufferManager::extend( int c ) MM_FREE( s_available ); s_available = tmp; - int cc = c * engine::mixer()->framesPerPeriod(); + int cc = c * Engine::mixer()->framesPerPeriod(); sampleFrame * b = MM_ALLOC( sampleFrame, cc ); for( int i = 0; i < c; ++i ) { s_available[ s_availableIndex.fetchAndAddOrdered( 1 ) + 1 ] = b; - b += engine::mixer()->framesPerPeriod(); + b += Engine::mixer()->framesPerPeriod(); } }*/ diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index 8ebbd9716..c685fd1cf 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -1111,7 +1111,7 @@ QString & SampleBuffer::toBase64( QString & _dst ) const /* FLAC__stream_encoder_set_do_exhaustive_model_search( flac_enc, true ); FLAC__stream_encoder_set_do_mid_side_stereo( flac_enc, true );*/ FLAC__stream_encoder_set_sample_rate( flac_enc, - engine::mixer()->sampleRate() ); + Engine::mixer()->sampleRate() ); QBuffer ba_writer; ba_writer.open( QBuffer::WriteOnly ); diff --git a/src/core/audio/AudioPortAudio.cpp b/src/core/audio/AudioPortAudio.cpp index 05edcbd87..b67ddab0c 100644 --- a/src/core/audio/AudioPortAudio.cpp +++ b/src/core/audio/AudioPortAudio.cpp @@ -232,7 +232,7 @@ void AudioPortAudio::applyQualitySettings() if( hqAudio() ) { - setSampleRate( engine::mixer()->processingSampleRate() ); + setSampleRate( Engine::mixer()->processingSampleRate() ); int samples = mixer()->framesPerPeriod(); PaError err = Pa_OpenStream( diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index 9135cec1f..26db6beac 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -137,7 +137,7 @@ SongEditor::SongEditor( Song * _song ) : connect( hq_btn, SIGNAL( toggled( bool ) ), this, SLOT( setHighQuality( bool ) ) ); hq_btn->setFixedWidth( 42 ); - engine::mainWindow()->addWidgetToToolBar( hq_btn, 1, col ); + Engine::mainWindow()->addWidgetToToolBar( hq_btn, 1, col ); #endif Engine::mainWindow()->addWidgetToToolBar( new TimeDisplayWidget, 1, tempoSpinBoxCol ); diff --git a/src/gui/widgets/led_checkbox.cpp b/src/gui/widgets/led_checkbox.cpp index 43ddb20bb..ec97c447f 100644 --- a/src/gui/widgets/led_checkbox.cpp +++ b/src/gui/widgets/led_checkbox.cpp @@ -41,7 +41,7 @@ static const QString names[ledCheckBox::NumColors] = //! @todo: in C++11, we can use delegating ctors #define DEFAULT_LEDCHECKBOX_INITIALIZER_LIST \ - automatableButton( _parent, _name ) + AutomatableButton( _parent, _name ) ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent, const QString & _name, LedColors _color ) :