# HG changeset patch # User Chris Cannam # Date 1396425111 -3600 # Node ID c11701af6bb4a558800ecdbafe92bbea16fcd30e # Parent b2ca08d16293805f4e4b6e135a659efe8fd1fe95# Parent dd07d48d7d4f7d033299a9142e04718b86c0ef1d Merge from branch tonioni diff -r dd07d48d7d4f -r c11701af6bb4 audioio/PlaySpeedRangeMapper.cpp --- a/audioio/PlaySpeedRangeMapper.cpp Tue Apr 01 13:27:44 2014 +0100 +++ b/audioio/PlaySpeedRangeMapper.cpp Wed Apr 02 08:51:51 2014 +0100 @@ -34,6 +34,13 @@ } int +PlaySpeedRangeMapper::getPositionForValueUnclamped(float value) const +{ + // We don't really provide this + return getPositionForValue(value); +} + +int PlaySpeedRangeMapper::getPositionForFactor(float factor) const { bool slow = (factor > 1.0); @@ -65,6 +72,13 @@ } float +PlaySpeedRangeMapper::getValueForPositionUnclamped(int position) const +{ + // We don't really provide this + return getValueForPosition(position); +} + +float PlaySpeedRangeMapper::getValueForFactor(float factor) const { float pc; diff -r dd07d48d7d4f -r c11701af6bb4 audioio/PlaySpeedRangeMapper.h --- a/audioio/PlaySpeedRangeMapper.h Tue Apr 01 13:27:44 2014 +0100 +++ b/audioio/PlaySpeedRangeMapper.h Wed Apr 02 08:51:51 2014 +0100 @@ -24,7 +24,10 @@ PlaySpeedRangeMapper(int minpos, int maxpos); virtual int getPositionForValue(float value) const; + virtual int getPositionForValueUnclamped(float value) const; + virtual float getValueForPosition(int position) const; + virtual float getValueForPositionUnclamped(int position) const; int getPositionForFactor(float factor) const; float getValueForFactor(float factor) const; diff -r dd07d48d7d4f -r c11701af6bb4 framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Tue Apr 01 13:27:44 2014 +0100 +++ b/framework/MainWindowBase.cpp Wed Apr 02 08:51:51 2014 +0100 @@ -133,7 +133,6 @@ #endif MainWindowBase::MainWindowBase(bool withAudioOutput, - bool withOSCSupport, bool withMIDIInput) : m_document(0), m_paneStack(0), @@ -254,12 +253,6 @@ if (withMIDIInput) { m_midiInput = new MIDIInput(QApplication::applicationName(), this); } - - if (withOSCSupport) { - m_oscQueueStarter = new OSCQueueStarter(this); - connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady())); - m_oscQueueStarter->start(); - } } MainWindowBase::~MainWindowBase() @@ -270,6 +263,7 @@ delete m_playSource; delete m_viewManager; delete m_oscQueue; + delete m_oscQueueStarter; delete m_midiInput; Profiles::getInstance()->dump(); } @@ -285,6 +279,14 @@ } void +MainWindowBase::startOSCQueue() +{ + m_oscQueueStarter = new OSCQueueStarter(this); + connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady())); + m_oscQueueStarter->start(); +} + +void MainWindowBase::oscReady() { if (m_oscQueue && m_oscQueue->isOK()) { diff -r dd07d48d7d4f -r c11701af6bb4 framework/MainWindowBase.h --- a/framework/MainWindowBase.h Tue Apr 01 13:27:44 2014 +0100 +++ b/framework/MainWindowBase.h Wed Apr 02 08:51:51 2014 +0100 @@ -75,7 +75,7 @@ Q_OBJECT public: - MainWindowBase(bool withAudioOutput, bool withOSCSupport, bool withMIDIInput); + MainWindowBase(bool withAudioOutput, bool withMIDIInput); virtual ~MainWindowBase(); enum AudioFileOpenMode { @@ -309,6 +309,7 @@ OSCQueue *m_oscQueue; OSCQueueStarter *m_oscQueueStarter; + void startOSCQueue(); MIDIInput *m_midiInput;