diff options
author | Werner Schweer <ws.seh.de> | 2007-04-19 16:00:28 +0000 |
---|---|---|
committer | Werner Schweer <ws.seh.de> | 2007-04-19 16:00:28 +0000 |
commit | a328390d794b66a2c47b72b7dc0a3c8b7bff82ca (patch) | |
tree | 9a43d16210a8411761707494c5cb52a72085033d | |
parent | 6966b30f75f329cef03baa6554a667895864b8c0 (diff) |
updates
-rw-r--r-- | muse/ChangeLog | 2 | ||||
-rw-r--r-- | muse/al/dsp.cpp | 10 | ||||
-rw-r--r-- | muse/al/dsp.h | 9 | ||||
-rw-r--r-- | muse/muse/audiotrack.cpp | 4 | ||||
-rw-r--r-- | muse/muse/fifo.cpp | 3 | ||||
-rw-r--r-- | muse/muse/mixer/astrip.cpp | 7 | ||||
-rw-r--r-- | muse/muse/mixer/mixer.cpp | 13 | ||||
-rw-r--r-- | muse/muse/mixer/strip.cpp | 12 | ||||
-rw-r--r-- | muse/muse/mixer/strip.h | 3 | ||||
-rw-r--r-- | muse/muse/pipeline.cpp | 3 | ||||
-rw-r--r-- | muse/muse/songfile.cpp | 95 | ||||
-rw-r--r-- | muse/muse/wavetrack.cpp | 3 | ||||
-rw-r--r-- | muse/muse/xpm/mono.svg | 27 | ||||
-rw-r--r-- | muse/muse/xpm/mono.xpm | 16 | ||||
-rw-r--r-- | muse/muse/xpm/stereo.svg | 86 | ||||
-rw-r--r-- | muse/muse/xpm/stereo.xpm | 14 |
16 files changed, 155 insertions, 152 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog index f6be4d38..389cff53 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,4 +1,6 @@ 19.04 (ws) + - disable routing buttons in mixer strip when in off state + - fixed crash when removing track from mixer - framework for importing muse0.9 projectfiles - align buffer in dummy audio driver so that the sse routines do not choke; same for AuxPluginF, Pipeline, Fifo diff --git a/muse/al/dsp.cpp b/muse/al/dsp.cpp index b9032443..7fb41fe7 100644 --- a/muse/al/dsp.cpp +++ b/muse/al/dsp.cpp @@ -93,15 +93,7 @@ void initDsp() unsigned long useSSE = 0; #ifdef __x86_64__ - asm ( - "pushq %%rbx\n" - "movq $1, %%rax\n" - "cpuid\n" - "movq %%rdx, %0\n" - "popq %%rbx\n" - : "=r" (useSSE) - : - : "%rax", "%rcx", "%rdx", "memory"); + useSSE = 1 << 25; // we know the platform has SSE #else asm ( "mov $1, %%eax\n" diff --git a/muse/al/dsp.h b/muse/al/dsp.h index d8da11dc..6c7123ac 100644 --- a/muse/al/dsp.h +++ b/muse/al/dsp.h @@ -23,7 +23,6 @@ namespace AL { - //--------------------------------------------------------- // f_max //--------------------------------------------------------- @@ -65,6 +64,14 @@ class Dsp { for (unsigned i = 0; i < n; ++i) dst[i] += src[i]; } + virtual void cpy(float* dst, float* src, unsigned n) { +#if defined(ARCH_X86) || defined(ARCH_X86_64) + register unsinged long int dummy; + __asm__ __volatile__ "rep; movsl" :"=&D"(dst), "=&S"(src), "=&c"(dummy) :"0" (to), "1" (from),"2" (n) : "memory"); +#else + memcpy(dst, src, sizeof(float) * n); +#endif + } }; extern void initDsp(); diff --git a/muse/muse/audiotrack.cpp b/muse/muse/audiotrack.cpp index 1d0940fd..7ef63f1b 100644 --- a/muse/muse/audiotrack.cpp +++ b/muse/muse/audiotrack.cpp @@ -20,12 +20,12 @@ #include "al/al.h" #include "al/dsp.h" +#include "al/xml.h" #include "track.h" #include "event.h" #include "song.h" #include "audio.h" #include "wave.h" -#include "al/xml.h" #include "auxplugin.h" #include "pipeline.h" #include "driver/audiodev.h" @@ -514,7 +514,7 @@ bool AudioTrack::copy(int srcChannels, float** srcBuffer) if (srcChannels == dstChannels) { for (int c = 0; c < dstChannels; ++c) - memcpy(buffer[c], srcBuffer[c], sizeof(float) * segmentSize); + AL::dsp->cpy(buffer[c], srcBuffer[c], segmentSize); } else if (srcChannels == 1 && dstChannels == 2) { float* sp = srcBuffer[0]; diff --git a/muse/muse/fifo.cpp b/muse/muse/fifo.cpp index 5b6e43cf..32300f92 100644 --- a/muse/muse/fifo.cpp +++ b/muse/muse/fifo.cpp @@ -20,6 +20,7 @@ #include "fifo.h" #include "globals.h" +#include "al/dsp.h" //--------------------------------------------------------- // clear @@ -95,7 +96,7 @@ bool Fifo::put(int segs, unsigned long samples, float** src, unsigned pos) b->segs = segs; b->pos = pos; for (int i = 0; i < segs; ++i) - memcpy(b->buffer + i * samples, src[i], samples * sizeof(float)); + AL::dsp->cpy(b->buffer + i * samples, src[i], samples); push(); return false; } diff --git a/muse/muse/mixer/astrip.cpp b/muse/muse/mixer/astrip.cpp index 1f1326e2..11b6833e 100644 --- a/muse/muse/mixer/astrip.cpp +++ b/muse/muse/mixer/astrip.cpp @@ -275,9 +275,12 @@ void AudioStrip::updateOffState() iR->setEnabled(val); if (oR) oR->setEnabled(val); - if (off) { + if (off) off->setChecked(track->off()); - } + if (ar) + ar->setEnabled(val); + if (aw) + aw->setEnabled(val); } //--------------------------------------------------------- diff --git a/muse/muse/mixer/mixer.cpp b/muse/muse/mixer/mixer.cpp index d2e04aea..b3e5ce06 100644 --- a/muse/muse/mixer/mixer.cpp +++ b/muse/muse/mixer/mixer.cpp @@ -171,16 +171,13 @@ void Mixer::updateMixer(int action) showSyntiTracksId->setChecked(cfg->showSyntiTracks); if (action == STRIP_REMOVED) { - StripList::iterator si = stripList.begin(); - for (; si != stripList.end();) { - Track* track = (*si)->getTrack(); - StripList::iterator ssi = si; - ++si; + foreach(Strip* strip, stripList) { + Track* track = strip->getTrack(); if (song->trackExists(track)) continue; - layout->removeWidget(*ssi); - delete *ssi; - stripList.erase(ssi); + layout->removeWidget(strip); + delete strip; + stripList.removeAt(stripList.indexOf(strip)); } int idx = stripList.size(); setMaximumWidth(STRIP_WIDTH * idx + 4); diff --git a/muse/muse/mixer/strip.cpp b/muse/muse/mixer/strip.cpp index da73c00c..c02dabe8 100644 --- a/muse/muse/mixer/strip.cpp +++ b/muse/muse/mixer/strip.cpp @@ -57,6 +57,8 @@ void Strip::updateLabel() Strip::Strip(Mixer* m, Track* t, bool align) : QFrame() { + ar = 0; + aw = 0; setAttribute(Qt::WA_DeleteOnClose, true); mixer = m; _align = align; @@ -108,16 +110,14 @@ void Strip::configChanged() void Strip::addAutomationButtons(int row) { - QHBoxLayout* aBox = new QHBoxLayout; - SimpleButton* ar = newAutoReadButton(); + ar = newAutoReadButton(); ar->setFixedHeight(BUTTON_HEIGHT); ar->setChecked(track->autoRead()); - aBox->addWidget(ar); - SimpleButton* aw = newAutoWriteButton(); + grid->addWidget(ar, row, 0); + aw = newAutoWriteButton(); aw->setFixedHeight(BUTTON_HEIGHT); aw->setChecked(track->autoWrite()); - aBox->addWidget(aw); - grid->addLayout(aBox, row, 0, 1, 2); + grid->addWidget(aw, row, 1); connect(ar, SIGNAL(clicked(bool)), SLOT(autoReadToggled(bool))); connect(aw, SIGNAL(clicked(bool)), SLOT(autoWriteToggled(bool))); connect(track, SIGNAL(autoReadChanged(bool)), ar, SLOT(setChecked(bool))); diff --git a/muse/muse/mixer/strip.h b/muse/muse/mixer/strip.h index c4ef3604..f9bc06ea 100644 --- a/muse/muse/mixer/strip.h +++ b/muse/muse/mixer/strip.h @@ -47,6 +47,9 @@ class Strip : public QFrame { SimpleButton* solo; SimpleButton* mute; + SimpleButton* ar; + SimpleButton* aw; + void updateLabel(); bool _align; // align elements for mixer app diff --git a/muse/muse/pipeline.cpp b/muse/muse/pipeline.cpp index de42c867..ae5b9d25 100644 --- a/muse/muse/pipeline.cpp +++ b/muse/muse/pipeline.cpp @@ -21,6 +21,7 @@ #include "pipeline.h" #include "plugin.h" #include "plugingui.h" +#include "al/dsp.h" //--------------------------------------------------------- // Pipeline @@ -214,7 +215,7 @@ void Pipeline::apply(int ports, unsigned long nframes, float** buffer1) } if (swap) { for (int i = 0; i < ports; ++i) - memcpy(buffer1[i], buffer[i], sizeof(float) * nframes); + AL::dsp->cpy(buffer1[i], buffer[i], nframes); } } diff --git a/muse/muse/songfile.cpp b/muse/muse/songfile.cpp index f40ace80..5aa19206 100644 --- a/muse/muse/songfile.cpp +++ b/muse/muse/songfile.cpp @@ -390,62 +390,93 @@ void Song::read20(QDomNode node) if (e.isNull()) continue; QString t(e.tagName()); + int i = e.text().toInt(); if (t == "automation") ; - else if (t == "cpos") - ; - else if (t == "rpos") - ; - else if (t == "lpos") - ; + else if (t == "cpos") { + int pos = i; + Pos p(pos, AL::TICKS); + setPos(Song::CPOS, p, false, false, false); + } + else if (t == "rpos") { + int pos = i; + Pos p(pos, AL::TICKS); + setPos(Song::RPOS, p, false, false, false); + } + else if (t == "lpos") { + int pos = i; + Pos p(pos, AL::TICKS); + setPos(Song::LPOS, p, false, false, false); + } else if (t == "master") - ; + setMasterFlag(i); else if (t == "loop") - ; + setLoop(i); else if (t == "punchin") - ; + setPunchin(i); else if (t == "punchout") - ; + setPunchout(i); else if (t == "record") ; else if (t == "solo") - ; + soloFlag = i; else if (t == "type") ; else if (t == "recmode") - ; + _recMode = i; else if (t == "cycle") - ; + _cycleMode = i; else if (t == "click") - ; + setClick(i); else if (t == "quantize") - ; + _quantize = i; else if (t == "len") - ; + _len = i; else if (t == "follow") ; else if (t == "drummap") ; else if (t == "siglist") - ; + AL::sigmap.read(node.firstChild()); else if (t == "tempolist") - ; + AL::tempomap.read(node); else if (t == "Route") ; - else if (t == "AudioAux") - ; - else if (t == "AudioInput") - ; - else if (t == "AudioGroup") - ; - else if (t == "AudioOutput") - ; - else if (t == "wavetrack") - ; - else if (t == "drumtrack") - ; - else if (t == "miditrack") - ; + else if (t == "AudioAux") { + AudioGroup* track = new AudioGroup(); + track->read(node.firstChild()); + insertTrack0(track,-1); + } + else if (t == "AudioInput") { + AudioInput* track = new AudioInput(); + track->read(node.firstChild()); + insertTrack0(track,-1); + } + else if (t == "AudioGroup") { + AudioGroup* track = new AudioGroup(); + track->read(node.firstChild()); + insertTrack0(track,-1); + } + else if (t == "AudioOutput") { + AudioOutput* track = new AudioOutput(); + track->read(node.firstChild()); + insertTrack0(track,-1); + } + else if (t == "wavetrack") { + MidiTrack* track = new MidiTrack(); + track->read(node.firstChild()); + insertTrack0(track, -1); + } + else if (t == "drumtrack") { + MidiTrack* track = new MidiTrack(); + track->read(node.firstChild()); + insertTrack0(track, -1); + } + else if (t == "miditrack") { + MidiTrack* track = new MidiTrack(); + track->read(node.firstChild()); + insertTrack0(track, -1); + } else domError(n1); } diff --git a/muse/muse/wavetrack.cpp b/muse/muse/wavetrack.cpp index 77ddc046..38df1158 100644 --- a/muse/muse/wavetrack.cpp +++ b/muse/muse/wavetrack.cpp @@ -23,6 +23,7 @@ #include "audio.h" #include "wave.h" #include "al/xml.h" +#include "al/dsp.h" #include "song.h" #include "globals.h" #include "part.h" @@ -346,7 +347,7 @@ void WaveTrack::collectInputData() else { float** bpp = readBuffer[idx]; for (int i = 0; i < channels(); ++i) - memcpy(buffer[i], bpp[i], sizeof(float) * segmentSize); + AL::dsp->cpy(buffer[i], bpp[i], sizeof(float)); } } } diff --git a/muse/muse/xpm/mono.svg b/muse/muse/xpm/mono.svg index 850fcfe9..ac764181 100644 --- a/muse/muse/xpm/mono.svg +++ b/muse/muse/xpm/mono.svg @@ -6,16 +6,18 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="33" - height="20" + width="16" + height="16" id="svg1307" sodipodi:version="0.32" - inkscape:version="0.43" + inkscape:version="0.45" version="1.0" sodipodi:docbase="/home/ws/projects/muse/muse/trunk/muse/muse/xpm" - sodipodi:docname="mono.svg"> + sodipodi:docname="mono.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + sodipodi:modified="true"> <defs id="defs1309" /> <sodipodi:namedview @@ -32,10 +34,12 @@ showgrid="true" inkscape:grid-bbox="true" inkscape:document-units="px" - inkscape:window-width="749" - inkscape:window-height="540" - inkscape:window-x="882" - inkscape:window-y="80" /> + inkscape:window-width="907" + inkscape:window-height="591" + inkscape:window-x="608" + inkscape:window-y="401" + width="16px" + height="16px" /> <metadata id="metadata1312"> <rdf:RDF> @@ -50,7 +54,8 @@ <g id="layer1" inkscape:label="Layer 1" - inkscape:groupmode="layer"> + inkscape:groupmode="layer" + transform="translate(-7.6895154,-1)"> <path sodipodi:type="arc" style="fill:#ff0000;fill-opacity:0;stroke:#3e3e3e;stroke-width:2.26799989;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" @@ -60,6 +65,6 @@ sodipodi:rx="7.4331551" sodipodi:ry="6.3547478" d="M 19.679144 10.374331 A 7.4331551 6.3547478 0 1 1 4.8128338,10.374331 A 7.4331551 6.3547478 0 1 1 19.679144 10.374331 z" - transform="matrix(1,0,0,1.161391,4.098769,-2.446221)" /> + transform="matrix(0.7216721,0,0,0.8227871,6.6137967,0.5665679)" /> </g> </svg> diff --git a/muse/muse/xpm/mono.xpm b/muse/muse/xpm/mono.xpm deleted file mode 100644 index 9acebb58..00000000 --- a/muse/muse/xpm/mono.xpm +++ /dev/null @@ -1,16 +0,0 @@ -/* XPM */ -static const char *mono_xpm[] = { -"15 9 2 1", -" c #303030", -". c none", -/* pixels */ -"..... .....", -".... ....", -"... ... ...", -"... ..... ...", -"... ..... ...", -"... ..... ...", -"... ... ...", -".... ....", -"..... ....." -}; diff --git a/muse/muse/xpm/stereo.svg b/muse/muse/xpm/stereo.svg index 1d7bc30a..2d222f61 100644 --- a/muse/muse/xpm/stereo.svg +++ b/muse/muse/xpm/stereo.svg @@ -6,38 +6,20 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="33" - height="20" + version="1.0" + width="16" + height="16" id="svg1307" sodipodi:version="0.32" - inkscape:version="0.43" - version="1.0" + inkscape:version="0.45" + sodipodi:docname="stereo.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" sodipodi:docbase="/home/ws/projects/muse/muse/trunk/muse/muse/xpm" - sodipodi:docname="Stereo.svg"> - <defs - id="defs1309" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="18.7" - inkscape:cx="16.5" - inkscape:cy="10" - inkscape:current-layer="layer1" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="749" - inkscape:window-height="540" - inkscape:window-x="882" - inkscape:window-y="80" /> + sodipodi:modified="true"> <metadata - id="metadata1312"> + id="metadata8"> <rdf:RDF> <cc:Work rdf:about=""> @@ -47,32 +29,40 @@ </cc:Work> </rdf:RDF> </metadata> + <sodipodi:namedview + inkscape:window-height="591" + inkscape:window-width="907" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + guidetolerance="10.0" + gridtolerance="10.0" + objecttolerance="10.0" + borderopacity="1.0" + bordercolor="#666666" + pagecolor="#ffffff" + id="base" + width="16px" + height="16px" + inkscape:zoom="18.9" + inkscape:cx="16.5" + inkscape:cy="10" + inkscape:window-x="20" + inkscape:window-y="266" + inkscape:current-layer="svg1307" /> + <defs + id="defs1309" /> <g id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> + transform="matrix(0.6319982,0,0,0.6402952,-2.3836027,1.951611)"> <path - sodipodi:type="arc" - style="fill:#ff0000;fill-opacity:0;stroke:#3e3e3e;stroke-width:2.26799989;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="path1317" - sodipodi:cx="12.245989" - sodipodi:cy="10.374331" - sodipodi:rx="7.4331551" - sodipodi:ry="6.3547478" - d="M 16.797341,15.398537 A 7.4331551,6.3547478 0 1 1 16.546025,5.1908488" + d="M 16.797341,15.398537 C 13.77507,17.399581 9.4702685,17.114643 6.8442934,14.739737 C 4.2183184,12.364831 4.1274584,8.6743768 6.6342179,6.2071094 C 9.1409773,3.739842 13.427942,3.3002982 16.546025,5.1908488" transform="matrix(1,0,0,1.161391,9.876871e-2,-2.446221)" - sodipodi:start="0.91182462" - sodipodi:end="5.3292702" - sodipodi:open="true" /> + style="fill:#ff0000;fill-opacity:0;stroke:#3e3e3e;stroke-width:2.26799989;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path1317" /> <path - sodipodi:type="arc" + d="M 19.679144,10.374331 C 19.679144,13.883961 16.351207,16.729079 12.245989,16.729079 C 8.1407707,16.729079 4.8128338,13.883961 4.8128338,10.374331 C 4.8128338,6.8647007 8.1407707,4.0195832 12.245989,4.0195832 C 16.351207,4.0195832 19.679144,6.8647007 19.679144,10.374331 z " + transform="matrix(1,0,0,1.161391,8.098769,-2.446221)" style="fill:#ff0000;fill-opacity:0;stroke:#3e3e3e;stroke-width:2.26799989;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="path2192" - sodipodi:cx="12.245989" - sodipodi:cy="10.374331" - sodipodi:rx="7.4331551" - sodipodi:ry="6.3547478" - d="M 19.679144 10.374331 A 7.4331551 6.3547478 0 1 1 4.8128338,10.374331 A 7.4331551 6.3547478 0 1 1 19.679144 10.374331 z" - transform="matrix(1,0,0,1.161391,8.098769,-2.446221)" /> + id="path2192" /> </g> </svg> diff --git a/muse/muse/xpm/stereo.xpm b/muse/muse/xpm/stereo.xpm deleted file mode 100644 index c2787780..00000000 --- a/muse/muse/xpm/stereo.xpm +++ /dev/null @@ -1,14 +0,0 @@ -/* XPM */ -static const char* stereo_xpm[] = { -"15 9 2 1", -" c none", -". c #303030", -" ..... ..... ", -" ............. ", -"... ... ...", -".. ... ..", -".. .... ..", -".. ... ..", -"... ... ...", -" ............. ", -" ..... ..... "}; |