diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61ca5a66a..696a1e341 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "0")
-SET(VERSION_PATCH "98")
+SET(VERSION_PATCH "99")
#SET(VERSION_SUFFIX "")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
IF(VERSION_SUFFIX)
diff --git a/data/presets/Kicker/TR909-RimShot.xpf b/data/presets/Kicker/TR909-RimShot.xpf
new file mode 100644
index 000000000..e8626db29
--- /dev/null
+++ b/data/presets/Kicker/TR909-RimShot.xpf
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/include/ProjectJournal.h b/include/ProjectJournal.h
index 20ff70959..5cb7920f6 100644
--- a/include/ProjectJournal.h
+++ b/include/ProjectJournal.h
@@ -74,7 +74,7 @@ public:
}
void clearJournal();
-
+ void stopAllJournalling();
JournallingObject * journallingObject( const jo_id_t _id )
{
if( m_joIDs.contains( _id ) )
diff --git a/include/interpolation.h b/include/interpolation.h
index 113058e4f..cbe274d42 100644
--- a/include/interpolation.h
+++ b/include/interpolation.h
@@ -32,6 +32,7 @@
#include
#include "lmms_constants.h"
+#include "lmms_math.h"
inline float hermiteInterpolate( float x0, float x1, float x2, float x3,
float frac_pos )
@@ -80,24 +81,13 @@ inline float cubicInterpolate( float v0, float v1, float v2, float v3, float x )
inline float cosinusInterpolate( float v0, float v1, float x )
{
const float f = ( 1.0f - cosf( x * F_PI ) ) * 0.5f;
-#ifdef FP_FAST_FMAF
- return fmaf( f, v1-v0, v0 );
-#else
- return f * (v1-v0) + v0;
-#endif
-// return( v0*f + v1*( 1.0f-f ) );
+ return fastFmaf( f, v1-v0, v0 );
}
inline float linearInterpolate( float v0, float v1, float x )
{
-// take advantage of fma function if present in hardware
-
-#ifdef FP_FAST_FMAF
- return fmaf( x, v1-v0, v0 );
-#else
- return x * (v1-v0) + v0;
-#endif
+ return fastFmaf( x, v1-v0, v0 );
}
diff --git a/include/lmms_math.h b/include/lmms_math.h
index 96e6fdcd2..157ab70b7 100644
--- a/include/lmms_math.h
+++ b/include/lmms_math.h
@@ -140,6 +140,43 @@ static inline float fastRandf( float range )
{
static const float fast_rand_ratio = 1.0f / FAST_RAND_MAX;
return fast_rand() * range * fast_rand_ratio;
+
+//! @brief Takes advantage of fmal() function if present in hardware
+static inline long double fastFmal( long double a, long double b, long double c )
+{
+#ifdef FP_FAST_FMAL
+ #ifdef __clang__
+ return fma( a, b, c );
+ #else
+ return fmal( a, b, c );
+ #endif
+#else
+ return a * b + c;
+#endif
+}
+
+//! @brief Takes advantage of fmaf() function if present in hardware
+static inline float fastFmaf( float a, float b, float c )
+{
+#ifdef FP_FAST_FMAF
+ #ifdef __clang__
+ return fma( a, b, c );
+ #else
+ return fmaf( a, b, c );
+ #endif
+#else
+ return a * b + c;
+#endif
+}
+
+//! @brief Takes advantage of fma() function if present in hardware
+static inline double fastFma( double a, double b, double c )
+{
+#ifdef FP_FAST_FMA
+ return fma( a, b, c );
+#else
+ return a * b + c;
+#endif
}
// source: http://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/
diff --git a/plugins/delay/delaycontrols.cpp b/plugins/delay/delaycontrols.cpp
index f819de810..cde18048b 100644
--- a/plugins/delay/delaycontrols.cpp
+++ b/plugins/delay/delaycontrols.cpp
@@ -32,7 +32,7 @@
DelayControls::DelayControls( DelayEffect* effect ):
EffectControls( effect ),
m_effect ( effect ),
- m_delayTimeModel( 2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Delay Samples" )) ,
+ m_delayTimeModel( 0.5, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Delay Samples" )) ,
m_feedbackModel(0.0f,0.0f,1.0f,0.01f,this,tr( "Feedback" ) ),
m_lfoTimeModel(2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Lfo Frequency" ) ),
m_lfoAmountModel(0.0, 0.0, 2.0, 0.0001, 2000.0, this, tr ( "Lfo Amount" ) )
diff --git a/plugins/delay/delaycontrolsdialog.cpp b/plugins/delay/delaycontrolsdialog.cpp
index 832c01ca4..adb5f3420 100644
--- a/plugins/delay/delaycontrolsdialog.cpp
+++ b/plugins/delay/delaycontrolsdialog.cpp
@@ -39,32 +39,33 @@ DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) :
setPalette( pal );
setFixedSize( 200, 75 );
- TempoSyncKnob* sampleDelayKnob = new TempoSyncKnob( knobBright_26, this );
- sampleDelayKnob->move( 20,10 );
- sampleDelayKnob->setVolumeKnob( false );
- sampleDelayKnob->setModel( &controls->m_delayTimeModel );
- sampleDelayKnob->setLabel( tr( "Delay" ) );
- sampleDelayKnob->setHintText( tr( "Delay Time Seconds:" ) + " ", "" );
+ TempoSyncKnob* sampleDelayKnob = new TempoSyncKnob( knobBright_26, this );
+ sampleDelayKnob->move( 20,10 );
+ sampleDelayKnob->setVolumeKnob( false );
+ sampleDelayKnob->setModel( &controls->m_delayTimeModel );
+ sampleDelayKnob->setLabel( tr( "Delay" ) );
+ sampleDelayKnob->setHintText( tr( "Delay Time" ) + " ", " s" );
- Knob * feedbackKnob = new Knob( knobBright_26, this );
- feedbackKnob->move( 63,10 );
- feedbackKnob->setVolumeKnob( true) ;
- feedbackKnob->setModel( &controls->m_feedbackModel);
- feedbackKnob->setLabel( tr( "Regen" ) );
- feedbackKnob->setHintText( tr ( "Feedback Amount:" ) + " ", "" );
+ knob * feedbackKnob = new knob( knobBright_26, this );
+ feedbackKnob->move( 63,10 );
+ feedbackKnob->setVolumeKnob( true) ;
+ feedbackKnob->setModel( &controls->m_feedbackModel);
+ feedbackKnob->setLabel( tr( "Regen" ) );
+ feedbackKnob->setHintText( tr ( "Feedback Amount" ) + " " , "" );
- TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
- lfoFreqKnob->move( 106,10 );
- lfoFreqKnob->setVolumeKnob( false );
- lfoFreqKnob->setModel( &controls->m_lfoTimeModel );
- lfoFreqKnob->setLabel( tr( "Rate" ) );
- lfoFreqKnob->setHintText( tr ( "Lfo Seconds:" ) + " ", "" );
+ TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
+ lfoFreqKnob->move( 106,10 );
+ lfoFreqKnob->setVolumeKnob( false );
+ lfoFreqKnob->setModel( &controls->m_lfoTimeModel );
+ lfoFreqKnob->setLabel( tr( "Rate" ) );
+ lfoFreqKnob->setHintText( tr ( "Lfo") + " ", " s" );
+
+ TempoSyncKnob * lfoAmtKnob = new TempoSyncKnob( knobBright_26, this );
+ lfoAmtKnob->move( 150,10 );
+ lfoAmtKnob->setVolumeKnob( false );
+ lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
+ lfoAmtKnob->setLabel( tr( "Lfo" ) );
+ lfoAmtKnob->setHintText( tr ( "Lfo Amt" ) + " " , " s" );
- TempoSyncKnob * lfoAmtKnob = new TempoSyncKnob( knobBright_26, this );
- lfoAmtKnob->move( 150,10 );
- lfoAmtKnob->setVolumeKnob( false );
- lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
- lfoAmtKnob->setLabel( tr( "Lfo" ) );
- lfoAmtKnob->setHintText( tr ( "Lfo Amt:" ) + " ", "" );
}
diff --git a/src/core/Engine.cpp b/src/core/Engine.cpp
index 67a6a669f..d744af1c7 100644
--- a/src/core/Engine.cpp
+++ b/src/core/Engine.cpp
@@ -115,6 +115,7 @@ void Engine::init( const bool _has_gui )
void Engine::destroy()
{
+ s_projectJournal->stopAllJournalling();
s_mixer->stopProcessing();
deleteHelper( &s_projectNotes );
diff --git a/src/core/JournallingObject.cpp b/src/core/JournallingObject.cpp
index b2eea2d6d..804483580 100644
--- a/src/core/JournallingObject.cpp
+++ b/src/core/JournallingObject.cpp
@@ -70,14 +70,19 @@ void JournallingObject::addJournalCheckPoint()
QDomElement JournallingObject::saveState( QDomDocument & _doc,
QDomElement & _parent )
{
- QDomElement _this = SerializingObject::saveState( _doc, _parent );
+ if( isJournalling() )
+ {
+ QDomElement _this = SerializingObject::saveState( _doc, _parent );
- QDomElement journalNode = _doc.createElement( "journallingObject" );
- journalNode.setAttribute( "id", id() );
- journalNode.setAttribute( "metadata", true );
- _this.appendChild( journalNode );
+ QDomElement journalNode = _doc.createElement( "journallingObject" );
+ journalNode.setAttribute( "id", id() );
+ journalNode.setAttribute( "metadata", true );
+ _this.appendChild( journalNode );
- return _this;
+ return _this;
+ } else {
+ return QDomElement();
+ }
}
diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp
index 8a8d8c466..77c5c461f 100644
--- a/src/core/ProjectJournal.cpp
+++ b/src/core/ProjectJournal.cpp
@@ -168,5 +168,17 @@ void ProjectJournal::clearJournal()
}
}
+void ProjectJournal::stopAllJournalling()
+{
+ for( JoIdMap::Iterator it = m_joIDs.begin(); it != m_joIDs.end(); ++it)
+ {
+ if( it.value() != NULL )
+ {
+ it.value()->setJournalling(false);
+ }
+ }
+ setJournalling(false);
+}
+