Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename fixes
  • Loading branch information
lukas-w committed Nov 26, 2014
commit 5b77abd9a5418bdc0a56ee9e1a963ec6ba7ee27a
18 changes: 9 additions & 9 deletions plugins/GigPlayer/GigPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -87,21 +87,21 @@ 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() ) );
}




GigInstrument::~GigInstrument()
{
engine::mixer()->removePlayHandles( instrumentTrack() );
Engine::mixer()->removePlayHandles( instrumentTrack() );
freeInstance();
}

Expand Down Expand Up @@ -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 ) );
Expand Down Expand Up @@ -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?

Expand Down Expand Up @@ -1094,7 +1094,7 @@ void GigInstrumentView::showFileDialog()
if( f != "" )
{
k->openFile( f );
engine::getSong()->setModified();
Engine::getSong()->setModified();
}
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/MidiImport/MidiImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion plugins/bit_invader/bit_invader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down
20 changes: 10 additions & 10 deletions plugins/carlabase/carla.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion plugins/papu/papu_instrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
10 changes: 5 additions & 5 deletions plugins/stk/mallets/mallets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "ModalBar.h"
#include "TubeBell.h"

#include "engine.h"
#include "Engine.h"
#include "gui_templates.h"
#include "InstrumentTrack.h"

Expand Down Expand Up @@ -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 "
Expand Down Expand Up @@ -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 )
{
Expand All @@ -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
{
Expand All @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/vst_base/VstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/core/BufferManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}*/
2 changes: 1 addition & 1 deletion src/core/SampleBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion src/core/audio/AudioPortAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/gui/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/led_checkbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) :
Expand Down