diff options
author | Werner Schweer <ws.seh.de> | 2007-04-17 14:14:54 +0000 |
---|---|---|
committer | Werner Schweer <ws.seh.de> | 2007-04-17 14:14:54 +0000 |
commit | 5cb6baa63ddc339a2136957966ba20734c03ada6 (patch) | |
tree | a441ef4ddf522a60189326c28ada638a7719e690 | |
parent | db3fbd2faa043a1f14b1ec80486673cc169e8dcd (diff) |
optimizations
-rw-r--r-- | muse/CMakeLists.txt | 24 | ||||
-rw-r--r-- | muse/ChangeLog | 8 | ||||
-rw-r--r-- | muse/al/CMakeLists.txt | 16 | ||||
-rw-r--r-- | muse/awl/mslider.cpp | 2 | ||||
-rw-r--r-- | muse/config.h.in | 2 | ||||
-rw-r--r-- | muse/muse/arranger/arranger.cpp | 9 | ||||
-rw-r--r-- | muse/muse/arranger/arranger.h | 1 | ||||
-rw-r--r-- | muse/muse/audiotrack.cpp | 59 | ||||
-rw-r--r-- | muse/muse/mixer/astrip.cpp | 1 | ||||
-rw-r--r-- | muse/muse/mixer/astrip.h | 4 | ||||
-rw-r--r-- | muse/muse/mixer/mixer.cpp | 5 | ||||
-rw-r--r-- | muse/muse/mixer/mixer.h | 4 | ||||
-rw-r--r-- | muse/muse/mixer/mstrip.cpp | 8 | ||||
-rw-r--r-- | muse/muse/mixer/mstrip.h | 16 | ||||
-rw-r--r-- | muse/muse/mixer/strip.h | 1 | ||||
-rw-r--r-- | muse/muse/muse.cpp | 24 | ||||
-rw-r--r-- | muse/muse/muse.h | 1 | ||||
-rw-r--r-- | muse/muse/pipeline.cpp | 1 | ||||
-rw-r--r-- | muse/muse/song.h | 4 | ||||
-rw-r--r-- | muse/muse/wavetrack.cpp | 2 | ||||
-rw-r--r-- | muse/plugins/freeverb/denormals.h | 10 |
21 files changed, 108 insertions, 94 deletions
diff --git a/muse/CMakeLists.txt b/muse/CMakeLists.txt index e414d48b..7e48ce5c 100644 --- a/muse/CMakeLists.txt +++ b/muse/CMakeLists.txt @@ -131,7 +131,7 @@ if (ENABLE_ZYNADDSUBFX) # set (FLTK_LIBRARIES $FLTK_CONFIG_PATH) # FLTK_INCLUDE_DIR # FLTK_FOUND -# +# # if (NOT FLTK_FOUND) # message(FATAL_ERROR "fltk toolkit not found, zynaddsubfx not build") # set(ENABLE_ZYNADDSUBFX OFF) @@ -204,6 +204,14 @@ if ( ENABLE_DSSI ) endif ( ENABLE_DSSI ) ## +## TODO +## +## Optimizations +## + +SET (USE_SSE true) + +## ## vst ## ## TODO @@ -254,7 +262,7 @@ add_custom_target(all-pic-debug.h add_custom_target(all.h.pch ALL - ${CMAKE_CXX_COMPILER} + ${CMAKE_CXX_COMPILER} -g -Wextra -fno-exceptions -Wall -I${QT_INCLUDE_DIR} -I${QT_QTCORE_INCLUDE_DIR} @@ -267,9 +275,9 @@ add_custom_target(all.h.pch add_custom_target(all-pic.h.pch ALL - ${CMAKE_CXX_COMPILER} + ${CMAKE_CXX_COMPILER} -fPIC - -Dawlplugin_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB + -Dawlplugin_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_PLUGIN -DQT_SHARED -DQT_NO_DEBUG -g -Wextra -fno-exceptions -Wall -I${QT_INCLUDE_DIR} @@ -283,9 +291,9 @@ add_custom_target(all-pic.h.pch add_custom_target(all-pic-debug.h.pch ALL - ${CMAKE_CXX_COMPILER} + ${CMAKE_CXX_COMPILER} -fPIC - -Dawlplugin_debug_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB + -Dawlplugin_debug_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_PLUGIN -DQT_SHARED -DQT_DEBUG -g -Wextra -fno-exceptions -Wall -I${QT_INCLUDE_DIR} @@ -300,8 +308,8 @@ add_custom_target(all-pic-debug.h.pch subdirs(al awl grepmidi plugins midiplugins synti muse share doc) include_directories( - . - ${PROJECT_SOURCE_DIR} + . + ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/muse ${PROJECT_SOURCE_DIR}/muse/widgets ${PROJECT_BINARY_DIR} diff --git a/muse/ChangeLog b/muse/ChangeLog index 61c70b63..a42e800c 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,5 +1,13 @@ +17.04 (ws) + - replace some heartBeat signal/slot connections with + direct calls for better performance +16.04 (ws) + - added some sse routines to optimize mixing 15.03 (ng) - update IV miditracker +06.03 (ws) + - did some optimizations to meter display; mixer still uses + a lot of cpu cycles 04.03 (ng) - update III miditracker 02.02 (ng) diff --git a/muse/al/CMakeLists.txt b/muse/al/CMakeLists.txt index be8b83ba..ae3b6b6a 100644 --- a/muse/al/CMakeLists.txt +++ b/muse/al/CMakeLists.txt @@ -5,9 +5,21 @@ add_library(al STATIC al.cpp marker.cpp pos.cpp sig.cpp tempo.cpp xml.cpp + dsp.cpp + dspSSE.cpp + dspXMM.cpp ) -set_target_properties( al - PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_SOURCE_DIR}/all.h" + +set_source_files_properties( + al.cpp marker.cpp pos.cpp sig.cpp tempo.cpp xml.cpp + dsp.cpp + dspXMM.cpp + PROPERTIES COMPILE_FLAGS "-msse2 -fPIC -include ${PROJECT_SOURCE_DIR}/all.h" + ) + + +set_source_files_properties( dspSSE.cpp + PROPERTIES COMPILE_FLAGS "-x assembler" ) add_dependencies(al ${PROJECT_SOURCE_DIR}/all.h.pch) diff --git a/muse/awl/mslider.cpp b/muse/awl/mslider.cpp index 67bfa3c9..c04e8475 100644 --- a/muse/awl/mslider.cpp +++ b/muse/awl/mslider.cpp @@ -32,6 +32,7 @@ MeterSlider::MeterSlider(QWidget* parent) : VolSlider(parent) { setAttribute(Qt::WA_NoSystemBackground, true); +// setAutoFillBackground(true); _channel = 0; yellowScale = -16; //-10; redScale = 0; @@ -185,6 +186,7 @@ void MeterSlider::paintEvent(QPaintEvent* ev) int mh = h - kh; p.setPen(QPen(Qt::white, 2)); + for (int i = 0; i < _channel; ++i) { int h = mh - (lrint(fast_log10(meterval[i]) * -20.0f * mh / range)); if (h < 0) diff --git a/muse/config.h.in b/muse/config.h.in index 23d2162c..5ac51f8a 100644 --- a/muse/config.h.in +++ b/muse/config.h.in @@ -20,8 +20,8 @@ #cmakedefine DSSI_SUPPORT #cmakedefine VST_SUPPORT +#cmakedefine USE_SSE #define INSTALL_NAME "${MusE_INSTALL_NAME}" #define INSTPREFIX "${CMAKE_INSTALL_PREFIX}" #define VERSION "${MusE_VERSION_FULL}" - diff --git a/muse/muse/arranger/arranger.cpp b/muse/muse/arranger/arranger.cpp index 7ca4bb1e..56ecc2c4 100644 --- a/muse/muse/arranger/arranger.cpp +++ b/muse/muse/arranger/arranger.cpp @@ -79,7 +79,7 @@ extern void populateAddTrack(QMenu*); // sizeHint //--------------------------------------------------------- -QSize InfoStack::sizeHint() const +QSize InfoStack::sizeHint() const { return QSize(infoWidth, height()); } @@ -298,15 +298,10 @@ Arranger::Arranger(QMainWindow* parent) infoDock = new QDockWidget(tr("TrackInfo")); infoDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); infoDock->setMinimumWidth(infoWidth); - infoDock->layout()->setMargin(1); - infoDock->layout()->setSpacing(0); infoDockAction = infoDock->toggleViewAction(); mixerDock = new QDockWidget(tr("Mix")); mixerDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); -mixerDock->setMaximumWidth(STRIP_WIDTH); - mixerDock->layout()->setMargin(1); - mixerDock->layout()->setSpacing(0); mixerDockAction = mixerDock->toggleViewAction(); parent->setDockNestingEnabled(true); @@ -844,7 +839,7 @@ void Arranger::toggleTrackInfo(bool val) trackInfo->addWidget(zeroTrackInfo); } trackInfo->setCurrentWidget(zeroTrackInfo); - + return; } Track::TrackType t = _curTrack->type(); diff --git a/muse/muse/arranger/arranger.h b/muse/muse/arranger/arranger.h index b025a919..1644c041 100644 --- a/muse/muse/arranger/arranger.h +++ b/muse/muse/arranger/arranger.h @@ -166,6 +166,7 @@ class Arranger : public QWidget { Track* curTrack() const { return _curTrack; } void endLoadSong(); static int trackNameWidth; + Strip* getStrip() const { return strip; } protected: virtual void keyPressEvent(QKeyEvent* e); diff --git a/muse/muse/audiotrack.cpp b/muse/muse/audiotrack.cpp index 4e2ee2c1..358d4f1f 100644 --- a/muse/muse/audiotrack.cpp +++ b/muse/muse/audiotrack.cpp @@ -19,6 +19,7 @@ //============================================================================= #include "al/al.h" +#include "al/dsp.h" #include "track.h" #include "event.h" #include "song.h" @@ -440,16 +441,8 @@ void AudioTrack::process() _prePipe->apply(channels(), segmentSize, buffer); if (_prefader) { - for (int i = 0; i < channels(); ++i) { - float* p = buffer[i]; - float meter = 0.0; - for (unsigned k = 0; k < segmentSize; ++k) { - double f = fabs(*p++); - if (f > meter) - meter = f; - } - setMeter(i, meter); - } + for (int i = 0; i < channels(); ++i) + setMeter(i, AL::dsp->peak(buffer[i], segmentSize, 0.0)); } // @@ -461,25 +454,14 @@ void AudioTrack::process() vol[0] = _volume * (1.0 - _pan); vol[1] = _volume * (1.0 + _pan); - for (int i = 0; i < channels(); ++i) { - float* p = buffer[i]; - for (unsigned k = 0; k < segmentSize; ++k) - *p++ *= vol[i]; - } + for (int i = 0; i < channels(); ++i) + AL::dsp->applyGainToBuffer(buffer[i], segmentSize, vol[i]); + _postPipe->apply(channels(), segmentSize, buffer); if (!_prefader) { - for (int i = 0; i < channels(); ++i) { - float* p = buffer[i]; - float meter = 0.0; - for (unsigned k = 0; k < segmentSize; ++k) { - double f = fabs(*p); - if (f > meter) - meter = f; - ++p; - } - setMeter(i, meter); - } + for (int i = 0; i < channels(); ++i) + setMeter(i, AL::dsp->peak(buffer[i], segmentSize, 0.0)); } } @@ -494,12 +476,8 @@ void AudioTrack::add(int srcChannels, float** srcBuffer) float** dstBuffer = buffer; if (srcChannels == dstChannels) { - for (int c = 0; c < dstChannels; ++c) { - float* sp = srcBuffer[c]; - float* dp = dstBuffer[c]; - for (unsigned k = 0; k < segmentSize; ++k) - dp[k] += sp[k]; - } + for (int c = 0; c < dstChannels; ++c) + AL::dsp->mix(dstBuffer[c], srcBuffer[c], segmentSize); } // // mix mono to stereo @@ -532,29 +510,24 @@ void AudioTrack::add(int srcChannels, float** srcBuffer) bool AudioTrack::copy(int srcChannels, float** srcBuffer) { - int dstChannels = channels(); - float** dstBuffer = buffer; + int dstChannels = channels(); if (srcChannels == dstChannels) { - for (int c = 0; c < dstChannels; ++c) { - float* sp = srcBuffer[c]; - float* dp = dstBuffer[c]; - for (unsigned k = 0; k < segmentSize; ++k) - *dp++ = *sp++; - } + for (int c = 0; c < dstChannels; ++c) + memcpy(buffer[c], srcBuffer[c], sizeof(float) * segmentSize); } else if (srcChannels == 1 && dstChannels == 2) { float* sp = srcBuffer[0]; for (unsigned k = 0; k < segmentSize; ++k) { float val = *sp++; - *(dstBuffer[0] + k) = val; - *(dstBuffer[1] + k) = val; + *(buffer[0] + k) = val; + *(buffer[1] + k) = val; } } else if (srcChannels == 2 && dstChannels == 1) { float* sp1 = srcBuffer[0]; float* sp2 = srcBuffer[1]; - float* dp = dstBuffer[0]; + float* dp = buffer[0]; for (unsigned k = 0; k < segmentSize; ++k) dp[k] = sp1[k] + sp2[k]; } diff --git a/muse/muse/mixer/astrip.cpp b/muse/muse/mixer/astrip.cpp index 6f2720d1..301f69de 100644 --- a/muse/muse/mixer/astrip.cpp +++ b/muse/muse/mixer/astrip.cpp @@ -210,7 +210,6 @@ AudioStrip::AudioStrip(Mixer* m, AudioTrack* t, bool align) if (off) { updateOffState(); // init state } - connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat())); connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); connect(track, SIGNAL(controllerChanged(int)), SLOT(controllerChanged(int))); connect(track, SIGNAL(autoReadChanged(bool)), SLOT(autoChanged())); diff --git a/muse/muse/mixer/astrip.h b/muse/muse/mixer/astrip.h index 5fd73200..c7f59dcc 100644 --- a/muse/muse/mixer/astrip.h +++ b/muse/muse/mixer/astrip.h @@ -90,11 +90,9 @@ class AudioStrip : public Strip { void autoWriteToggled(bool); void updateOffState(); - protected slots: - virtual void heartBeat(); - public: AudioStrip(Mixer*, AudioTrack*, bool align); + virtual void heartBeat(); }; #endif diff --git a/muse/muse/mixer/mixer.cpp b/muse/muse/mixer/mixer.cpp index d4835bba..d2e04aea 100644 --- a/muse/muse/mixer/mixer.cpp +++ b/muse/muse/mixer/mixer.cpp @@ -89,7 +89,6 @@ Mixer::Mixer(QWidget* parent, MixerConfig* c) connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); connect(muse, SIGNAL(configChanged()), SLOT(configChanged())); - connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat())); song->update(); // calls update mixer } @@ -107,7 +106,7 @@ void Mixer::addStrip(Track* t, int idx) if (si != stripList.end() && (*si)->getTrack() == t) return; - std::list<Strip*>::iterator nsi = si; + StripList::iterator nsi = si; ++nsi; if (si != stripList.end() && nsi != stripList.end() @@ -395,5 +394,7 @@ void Mixer::heartBeat() updateMixer(STRIP_INSERTED | STRIP_REMOVED); mustUpdateMixer = false; } + foreach(Strip* s, stripList) + s->heartBeat(); } diff --git a/muse/muse/mixer/mixer.h b/muse/muse/mixer/mixer.h index 68ccf2d1..62c526a6 100644 --- a/muse/muse/mixer/mixer.h +++ b/muse/muse/mixer/mixer.h @@ -30,7 +30,7 @@ class Knob; class RouteDialog; class Strip; -typedef std::list<Strip*> StripList; +typedef QList<Strip*> StripList; //--------------------------------------------------------- // Mixer @@ -82,13 +82,13 @@ class Mixer : public QMainWindow { void toggleRouteDialog(); void routingDialogClosed(); void showTracksChanged(QAction*); - void heartBeat(); public: Mixer(QWidget* parent, MixerConfig*); void clear(); void write(Xml&, const char* name); void setUpdateMixer() { mustUpdateMixer = true; } + void heartBeat(); }; #endif diff --git a/muse/muse/mixer/mstrip.cpp b/muse/muse/mixer/mstrip.cpp index 829877e1..e7efbc77 100644 --- a/muse/muse/mixer/mstrip.cpp +++ b/muse/muse/mixer/mstrip.cpp @@ -311,7 +311,6 @@ MidiStrip::MidiStrip(Mixer* m, MidiTrack* t, bool align) layout->addLayout(rBox); - connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat())); connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); connect(track, SIGNAL(muteChanged(bool)), mute, SLOT(setChecked(bool))); connect(track, SIGNAL(soloChanged(bool)), solo, SLOT(setChecked(bool))); @@ -638,7 +637,6 @@ MidiOutPortStrip::MidiOutPortStrip(Mixer* m, MidiOutPort* t, bool align) layout->addLayout(rBox); - connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat())); connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); connect(track, SIGNAL(muteChanged(bool)), mute, SLOT(setChecked(bool))); connect(track, SIGNAL(soloChanged(bool)), solo, SLOT(setChecked(bool))); @@ -873,7 +871,7 @@ MidiInPortStrip::MidiInPortStrip(Mixer* m, MidiInPort* t, bool align) painter.begin(activityOn); sr.render(&painter); painter.end(); - + sr.load(QString(":/xpm/activeoff.svg")); activityOff = new QPixmap(aSize); activityOff->fill(Qt::transparent); @@ -939,7 +937,6 @@ MidiInPortStrip::MidiInPortStrip(Mixer* m, MidiInPort* t, bool align) rBox->addWidget(oR); layout->addLayout(rBox); - connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat())); connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); connect(track, SIGNAL(muteChanged(bool)), mute, SLOT(setChecked(bool))); connect(track, SIGNAL(soloChanged(bool)), solo, SLOT(setChecked(bool))); @@ -1129,7 +1126,6 @@ MidiSyntiStrip::MidiSyntiStrip(Mixer* m, MidiSynti* t, bool align) layout->addLayout(rBox); - connect(heartBeatTimer, SIGNAL(timeout()), SLOT(heartBeat())); connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); connect(track, SIGNAL(muteChanged(bool)), mute, SLOT(setChecked(bool))); connect(track, SIGNAL(soloChanged(bool)), solo, SLOT(setChecked(bool))); @@ -1288,7 +1284,7 @@ void MidiSyntiStrip::oRouteShow() Route r(mc, -1, Route::TRACK); action->setData(QVariant::fromValue(r)); action->setCheckable(true); - + for (iRoute ir = orl->begin(); ir != orl->end(); ++ir) { if (r == *ir) { action->setChecked(true); diff --git a/muse/muse/mixer/mstrip.h b/muse/muse/mixer/mstrip.h index ed3b5255..61c3ea62 100644 --- a/muse/muse/mixer/mstrip.h +++ b/muse/muse/mixer/mstrip.h @@ -78,14 +78,12 @@ class MidiStrip : public Strip { void recordToggled(bool); void monitorToggled(bool); - protected slots: - virtual void heartBeat(); - public slots: virtual void songChanged(int); public: MidiStrip(Mixer*, MidiTrack*, bool align = true); + virtual void heartBeat(); }; //--------------------------------------------------------- @@ -117,14 +115,12 @@ class MidiOutPortStrip : public Strip { void oRouteShow(); void syncToggled(bool) const; - protected slots: - virtual void heartBeat(); - public slots: virtual void songChanged(int); public: MidiOutPortStrip(Mixer*, MidiOutPort*, bool align = true); + virtual void heartBeat(); }; //--------------------------------------------------------- @@ -154,14 +150,12 @@ class MidiSyntiStrip : public Strip { void iRouteShow(); void oRouteShow(); - protected slots: - virtual void heartBeat(); - public slots: virtual void songChanged(int); public: MidiSyntiStrip(Mixer*, MidiSynti*, bool align = true); + virtual void heartBeat(); }; //--------------------------------------------------------- @@ -185,14 +179,12 @@ class MidiInPortStrip : public Strip { void iRouteShow(); void oRouteShow(); - protected slots: - virtual void heartBeat(); - public slots: virtual void songChanged(int); public: MidiInPortStrip(Mixer*, MidiInPort*, bool align = true); + virtual void heartBeat(); }; #endif diff --git a/muse/muse/mixer/strip.h b/muse/muse/mixer/strip.h index 8c89f40e..71f243c5 100644 --- a/muse/muse/mixer/strip.h +++ b/muse/muse/mixer/strip.h @@ -63,6 +63,7 @@ class Strip : public QFrame { Strip(Mixer* m, Track* t, bool align); ~Strip(); Track* getTrack() const { return track; } + virtual void heartBeat() = 0; }; #endif diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index b7a7f36e..94f6b298 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -26,6 +26,8 @@ #include "arranger/arranger.h" #include "midiedit/pianoroll.h" #include "al/xml.h" +#include "al/dsp.h" +#include "al/tempo.h" #include "conf.h" #include "liste/listedit.h" #include "master/masteredit.h" @@ -50,7 +52,6 @@ #include "ticksynth.h" #include "song.h" #include "awl/poslabel.h" -#include "al/tempo.h" #include "shortcuts.h" #ifdef __APPLE__ #include "driver/coremidi.h" @@ -67,6 +68,7 @@ #include "midiedit/miditracker.h" #include "projectpropsdialog.h" #include "liste/listedit.h" +#include "mixer/strip.h" extern void initMidiInstruments(); @@ -515,7 +517,7 @@ MusE::MusE() song->blockSignals(true); heartBeatTimer = new QTimer(this); - connect(heartBeatTimer, SIGNAL(timeout()), song, SLOT(beat())); + connect(heartBeatTimer, SIGNAL(timeout()), SLOT(beat())); //--------------------------------------------------- // undo/redo @@ -2803,6 +2805,8 @@ void MusE::setGlobalTempo(int val) int main(int argc, char* argv[]) { + AL::initDsp(); + char c; QString opts("mvdDiosP:p"); @@ -3115,3 +3119,19 @@ int main(int argc, char* argv[]) return n; } +//--------------------------------------------------------- +// beat +// heart beat +//--------------------------------------------------------- + +void MusE::beat() + { + song->beat(); + if (mixer1 && mixer1->isVisible()) + mixer1->heartBeat(); + if (mixer2 && mixer2->isVisible()) + mixer2->heartBeat(); + if (arranger && arranger->getStrip() && arranger->getStrip()->isVisible()) + arranger->getStrip()->heartBeat(); + } + diff --git a/muse/muse/muse.h b/muse/muse/muse.h index 3cdb14c8..9bb05db6 100644 --- a/muse/muse/muse.h +++ b/muse/muse/muse.h @@ -163,6 +163,7 @@ class MusE : public QMainWindow // , public Ui::MuseBase void startLoadSong(); private slots: + void beat(); void loadProject(); void quitDoc(); void about(); diff --git a/muse/muse/pipeline.cpp b/muse/muse/pipeline.cpp index ff078ced..2c48d014 100644 --- a/muse/muse/pipeline.cpp +++ b/muse/muse/pipeline.cpp @@ -196,4 +196,3 @@ void Pipeline::apply(int ports, unsigned long nframes, float** buffer1) } } - diff --git a/muse/muse/song.h b/muse/muse/song.h index ac2c3c60..f18eaba9 100644 --- a/muse/muse/song.h +++ b/muse/muse/song.h @@ -134,7 +134,6 @@ class Song : public QObject { void undoPartModify(Part* oPart, Part* nPart, bool undo); public slots: - void beat(); void undo(); void redo(); @@ -200,6 +199,7 @@ class Song : public QObject { Song(); ~Song(); + void beat(); void putEvent(const MidiEvent&); void endMsgCmd(); void processMsg(AudioMsg* msg); @@ -328,7 +328,7 @@ class Song : public QObject { void moveTrack(Track*, Track*); void cmdInsertTrack(Track*, int idx); void insertTrack(Track*, int idx); - + void insertTrack0(Track*, int idx); void insertTrack1(Track*, int idx); void insertTrack2(Track*); diff --git a/muse/muse/wavetrack.cpp b/muse/muse/wavetrack.cpp index 4dede840..77ddc046 100644 --- a/muse/muse/wavetrack.cpp +++ b/muse/muse/wavetrack.cpp @@ -85,7 +85,6 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, int widx) if (part->mute()) continue; unsigned p_spos = part->frame(); -// if (pos + samples < p_spos) if (pos + samples <= p_spos) break; unsigned p_epos = p_spos + part->lenFrame(); @@ -97,7 +96,6 @@ void WaveTrack::fetchData(unsigned pos, unsigned samples, int widx) Event& event = ie->second; unsigned e_spos = event.frame() + p_spos; - // if (pos + samples < e_spos) if (pos + samples <= e_spos) break; unsigned nn = event.lenFrame(); diff --git a/muse/plugins/freeverb/denormals.h b/muse/plugins/freeverb/denormals.h index d18412b4..37d3ed27 100644 --- a/muse/plugins/freeverb/denormals.h +++ b/muse/plugins/freeverb/denormals.h @@ -15,12 +15,22 @@ // signal processing applications // (ws) +#if 0 #define undenormalise(sample) \ { \ float anti_denormal = 1e-18; \ sample += anti_denormal; \ sample -= anti_denormal; \ } +#endif + +// from beast-0.7.2 (Tim Janik/Stefan Westerfeld): + +#define undenormalise(sample) \ + do { \ + volatile float __forced_float = 1e-29 + sample; \ + sample = __forced_float - 1e-29; \ + } while (0) #endif//_denormals_ |