Mercurial > hg > sonic-visualiser
changeset 926:96c51b43d882 cxx11
Merge
author | Chris Cannam |
---|---|
date | Tue, 10 Mar 2015 20:03:08 +0000 |
parents | 2ff5a6c543c9 (current diff) b33c5c685b3e (diff) |
children | 20f840a6dbbb |
files | .hgsubstate |
diffstat | 8 files changed, 28 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Tue Mar 10 20:02:06 2015 +0000 +++ b/.hgsubstate Tue Mar 10 20:03:08 2015 +0000 @@ -1,5 +1,5 @@ d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay 879bdc878826bebec67130326f99397c430419b1 sv-dependency-builds -dee4aceb131c3edb0d18d82db9db01287d0919ca svapp -10055a284716ca793c9ccba2e92ae1cce3316a4e svcore -1757933ce5a79cf77d13f8b5453bae399c354578 svgui +7fa74786dec5423978a746288feccbb7127396d3 svapp +5ad98be7f635c3abe7b8f577fe1a5ee237052988 svcore +6e2a034f7117d196152bc2647d1f1cc84585d5e0 svgui
--- a/configure Tue Mar 10 20:02:06 2015 +0000 +++ b/configure Tue Mar 10 20:03:08 2015 +0000 @@ -4364,9 +4364,10 @@ CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS" if test "x$GCC" = "xyes"; then - CXXFLAGS_DEBUG="-std=c++11 -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe" - CXXFLAGS_RELEASE="-std=c++11 -g0 -O2 -Wall -pipe" - CXXFLAGS_MINIMAL="-std=c++11 -g0 -O0" + CXXFLAGS_ANY="-std=c++11 -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe" + CXXFLAGS_DEBUG="$CXXFLAGS_ANY -g" + CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0 -O2" + CXXFLAGS_MINIMAL="$CXXFLAGS_ANY -g0 -O0" fi CXXFLAGS_BUILD="$CXXFLAGS_RELEASE"
--- a/configure.ac Tue Mar 10 20:02:06 2015 +0000 +++ b/configure.ac Tue Mar 10 20:03:08 2015 +0000 @@ -53,9 +53,10 @@ CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS" if test "x$GCC" = "xyes"; then - CXXFLAGS_DEBUG="-std=c++11 -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe" - CXXFLAGS_RELEASE="-std=c++11 -g0 -O2 -Wall -pipe" - CXXFLAGS_MINIMAL="-std=c++11 -g0 -O0" + CXXFLAGS_ANY="-std=c++11 -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe" + CXXFLAGS_DEBUG="$CXXFLAGS_ANY -g" + CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0 -O2" + CXXFLAGS_MINIMAL="$CXXFLAGS_ANY -g0 -O0" fi CXXFLAGS_BUILD="$CXXFLAGS_RELEASE"
--- a/main/MainWindow.cpp Tue Mar 10 20:02:06 2015 +0000 +++ b/main/MainWindow.cpp Tue Mar 10 20:03:08 2015 +0000 @@ -2342,8 +2342,8 @@ QString description; - int ssr = getMainModel()->getSampleRate(); - int tsr = ssr; + sv_samplerate_t ssr = getMainModel()->getSampleRate(); + sv_samplerate_t tsr = ssr; if (m_playSource) tsr = m_playSource->getTargetSampleRate(); if (ssr != tsr) { @@ -2808,7 +2808,7 @@ visible = pane->getImageSize(pane->getFirstVisibleFrame(), pane->getLastVisibleFrame()); - int sf0 = 0, sf1 = 0; + sv_frame_t sf0 = 0, sf1 = 0; if (haveSelection) { MultiSelection::SelectionList selections = m_viewManager->getSelections(); @@ -3874,14 +3874,14 @@ { PlaySpeedRangeMapper mapper(0, 200); - float percent = m_playSpeed->mappedValue(); - float factor = mapper.getFactorForValue(percent); + double percent = m_playSpeed->mappedValue(); + double factor = mapper.getFactorForValue(percent); // cerr << "speed = " << position << " percent = " << percent << " factor = " << factor << endl; bool something = (position != 100); - int pc = lrintf(percent); + int pc = int(lrint(percent)); if (!something) { contextHelpChanged(tr("Playback speed: Normal")); @@ -3972,7 +3972,7 @@ } bool haveSelection = false; - int startFrame = 0, endFrame = 0; + sv_frame_t startFrame = 0, endFrame = 0; if (m_viewManager && m_viewManager->haveInProgressSelection()) { @@ -4025,7 +4025,7 @@ if (!statusBar()->isVisible()) return; Pane *pane = 0; - int frame = m_viewManager->getPlaybackFrame(); + sv_frame_t frame = m_viewManager->getPlaybackFrame(); if (m_paneStack) pane = m_paneStack->getCurrentPane(); if (!pane) return; @@ -4052,7 +4052,8 @@ } void -MainWindow::sampleRateMismatch(int requested, int actual, +MainWindow::sampleRateMismatch(sv_samplerate_t requested, + sv_samplerate_t actual, bool willResample) { if (!willResample) { @@ -4118,7 +4119,7 @@ MIDIEvent ev(m_midiInput->readEvent()); - int frame = currentPane->alignFromReference(ev.getTime()); + sv_frame_t frame = currentPane->alignFromReference(ev.getTime()); bool noteOn = (ev.getMessageType() == MIDIConstants::MIDI_NOTE_ON && ev.getVelocity() > 0);
--- a/main/MainWindow.h Tue Mar 10 20:02:06 2015 +0000 +++ b/main/MainWindow.h Tue Mar 10 20:03:08 2015 +0000 @@ -66,7 +66,7 @@ virtual void closeSession(); virtual void preferences(); - virtual void sampleRateMismatch(int, int, bool); + virtual void sampleRateMismatch(sv_samplerate_t, sv_samplerate_t, bool); virtual void audioOverloadPluginDisabled(); virtual void audioTimeStretchMultiChannelDisabled();
--- a/main/OSCHandler.cpp Tue Mar 10 20:02:06 2015 +0000 +++ b/main/OSCHandler.cpp Tue Mar 10 20:03:08 2015 +0000 @@ -123,7 +123,7 @@ if (getMainModel()) { - int frame = m_viewManager->getPlaybackFrame(); + sv_frame_t frame = m_viewManager->getPlaybackFrame(); bool selection = false; bool play = (message.getMethod() == "play"); @@ -233,8 +233,8 @@ if (getMainModel()) { - int f0 = getMainModel()->getStartFrame(); - int f1 = getMainModel()->getEndFrame(); + sv_frame_t f0 = getMainModel()->getStartFrame(); + sv_frame_t f1 = getMainModel()->getEndFrame(); bool done = false; @@ -452,7 +452,7 @@ double level = message.getArg(0).toDouble(); Pane *currentPane = m_paneStack->getCurrentPane(); if (level < 1.0) level = 1.0; - if (currentPane) currentPane->setZoomLevel(lrint(level)); + if (currentPane) currentPane->setZoomLevel(int(lrint(level))); } }
--- a/main/PreferencesDialog.cpp Tue Mar 10 20:02:06 2015 +0000 +++ b/main/PreferencesDialog.cpp Tue Mar 10 20:03:08 2015 +0000 @@ -122,7 +122,6 @@ connect(propertyLayout, SIGNAL(currentIndexChanged(int)), this, SLOT(propertyLayoutChanged(int))); - m_tuningFrequency = prefs->getTuningFrequency();
--- a/main/PreferencesDialog.h Tue Mar 10 20:02:06 2015 +0000 +++ b/main/PreferencesDialog.h Tue Mar 10 20:03:08 2015 +0000 @@ -90,7 +90,7 @@ int m_spectrogramSmoothing; int m_spectrogramXSmoothing; int m_propertyLayout; - float m_tuningFrequency; + double m_tuningFrequency; int m_audioDevice; int m_resampleQuality; bool m_resampleOnLoad;