Merge branch 'stable-1.2' into fix/qt5-vst
This commit is contained in:
@@ -80,7 +80,7 @@ public:
|
||||
MidiTime putValue( const MidiTime & time,
|
||||
const float value,
|
||||
const bool quantPos = true,
|
||||
const bool ignoreSurroundingPoints = false );
|
||||
const bool ignoreSurroundingPoints = true );
|
||||
|
||||
void removeValue( const MidiTime & time );
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ const QString TEMPLATE_PATH = "templates/";
|
||||
const QString PRESETS_PATH = "presets/";
|
||||
const QString SAMPLES_PATH = "samples/";
|
||||
const QString GIG_PATH = "samples/gig/";
|
||||
const QString SF2_PATH = "samples/sf2/";
|
||||
const QString SF2_PATH = "samples/soundfonts/";
|
||||
const QString LADSPA_PATH ="plugins/ladspa/";
|
||||
const QString DEFAULT_THEME_PATH = "themes/default/";
|
||||
const QString TRACK_ICON_PATH = "track_icons/";
|
||||
|
||||
@@ -31,15 +31,26 @@
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <windows.h>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000
|
||||
class MainApplication : public QApplication, public QAbstractNativeEventFilter
|
||||
#else
|
||||
class MainApplication : public QApplication
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
MainApplication(int& argc, char** argv);
|
||||
bool event(QEvent* event);
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
bool winEventFilter(MSG* msg, long* result);
|
||||
#if QT_VERSION >= 0x050000
|
||||
bool nativeEventFilter(const QByteArray& eventType, void* message,
|
||||
long* result);
|
||||
#endif
|
||||
#endif
|
||||
inline QString& queuedFile()
|
||||
{
|
||||
|
||||
@@ -155,6 +155,7 @@ public:
|
||||
|
||||
void initDevices();
|
||||
void clear();
|
||||
void clearNewPlayHandles();
|
||||
|
||||
|
||||
// audio-device-stuff
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "TrackContainer.h"
|
||||
#include "Controller.h"
|
||||
#include "MeterModel.h"
|
||||
#include "Mixer.h"
|
||||
#include "VstSyncController.h"
|
||||
|
||||
|
||||
@@ -229,6 +230,17 @@ public:
|
||||
return m_loadingProject;
|
||||
}
|
||||
|
||||
void loadingCancelled()
|
||||
{
|
||||
m_isCancelled = true;
|
||||
Engine::mixer()->clearNewPlayHandles();
|
||||
}
|
||||
|
||||
bool isCancelled()
|
||||
{
|
||||
return m_isCancelled;
|
||||
}
|
||||
|
||||
bool isModified() const
|
||||
{
|
||||
return m_modified;
|
||||
@@ -358,6 +370,7 @@ private:
|
||||
volatile bool m_paused;
|
||||
|
||||
bool m_loadingProject;
|
||||
bool m_isCancelled;
|
||||
|
||||
QStringList m_errors;
|
||||
|
||||
|
||||
@@ -229,11 +229,12 @@ static inline float logToLinearScale( float min, float max, float value )
|
||||
static inline float linearToLogScale( float min, float max, float value )
|
||||
{
|
||||
static const float EXP = 1.0f / F_E;
|
||||
const float val = ( value - min ) / ( max - min );
|
||||
const float valueLimited = qBound( min, value, max);
|
||||
const float val = ( valueLimited - min ) / ( max - min );
|
||||
if( min < 0 )
|
||||
{
|
||||
const float mmax = qMax( qAbs( min ), qAbs( max ) );
|
||||
float result = signedPowf( value / mmax, EXP ) * mmax;
|
||||
float result = signedPowf( valueLimited / mmax, EXP ) * mmax;
|
||||
return isnan( result ) ? 0 : result;
|
||||
}
|
||||
float result = powf( val, EXP ) * ( max - min ) + min;
|
||||
|
||||
Reference in New Issue
Block a user