Merge branch 'stable-1.2'

# Conflicts:
#	include/MixerWorkerThread.h
#	src/core/MixerWorkerThread.cpp
This commit is contained in:
Hyunin Song
2018-05-26 16:02:31 +09:00
15 changed files with 60 additions and 23 deletions

View File

@@ -43,6 +43,7 @@ FlangerControls::FlangerControls( FlangerEffect *effect ) :
{
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changedSampleRate() ) );
connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), this, SLOT( changedPlaybackState() ) );
}
@@ -81,3 +82,9 @@ void FlangerControls::changedSampleRate()
}
void FlangerControls::changedPlaybackState()
{
m_effect->restartLFO();
}

View File

@@ -57,6 +57,7 @@ public:
private slots:
void changedSampleRate();
void changedPlaybackState();
private:
FlangerEffect* m_effect;

View File

@@ -68,7 +68,7 @@ FlangerEffect::~FlangerEffect()
{
delete m_rDelay;
}
if(m_lfo )
if( m_lfo )
{
delete m_lfo;
}
@@ -139,6 +139,15 @@ void FlangerEffect::changeSampleRate()
void FlangerEffect::restartLFO()
{
m_lfo->restart();
}
extern "C"
{

View File

@@ -44,6 +44,7 @@ public:
return &m_flangerControls;
}
void changeSampleRate();
void restartLFO();
private:
FlangerControls m_flangerControls;

View File

@@ -53,6 +53,14 @@ public:
inline void restart()
{
m_phase = 0;
}
inline void setSampleRate ( int samplerate )
{
m_samplerate = samplerate;