From e04603bb7dfcdcc59f7cb14a4122b5c22c966716 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 9 Mar 2019 23:13:17 -1000 Subject: [PATCH] Fix SoundMacro generation for SampleView --- Editor/SampleEditor.cpp | 7 +++- .../apps/{amuse.png => amuse-gui.png} | Bin .../128x128/apps/{amuse.png => amuse-gui.png} | Bin .../16x16/apps/{amuse.png => amuse-gui.png} | Bin .../256x256/apps/{amuse.png => amuse-gui.png} | Bin .../32x32/apps/{amuse.png => amuse-gui.png} | Bin .../48x48/apps/{amuse.png => amuse-gui.png} | Bin .../512x512/apps/{amuse.png => amuse-gui.png} | Bin .../64x64/apps/{amuse.png => amuse-gui.png} | Bin Editor/platforms/freedesktop/CMakeLists.txt | 10 +++--- .../{amuse.desktop => amuse-gui.desktop} | 3 +- Editor/platforms/freedesktop/mkqticon.c | 2 +- Editor/resources/lang_de.ts | 32 +++++++++--------- 13 files changed, 30 insertions(+), 24 deletions(-) rename Editor/platforms/freedesktop/1024x1024/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/128x128/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/16x16/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/256x256/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/32x32/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/48x48/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/512x512/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/64x64/apps/{amuse.png => amuse-gui.png} (100%) rename Editor/platforms/freedesktop/{amuse.desktop => amuse-gui.desktop} (81%) mode change 100644 => 100755 diff --git a/Editor/SampleEditor.cpp b/Editor/SampleEditor.cpp index 68d86cf..b10709e 100644 --- a/Editor/SampleEditor.cpp +++ b/Editor/SampleEditor.cpp @@ -340,7 +340,12 @@ bool SampleView::loadData(ProjectModel::SampleNode* node) { amuse::SoundMacro::CmdStartSample* startSample = static_cast( m_playbackMacro->insertNewCmd(0, amuse::SoundMacro::CmdOp::StartSample)); startSample->sample.id = m_node->id(); - m_playbackMacro->insertNewCmd(1, amuse::SoundMacro::CmdOp::End); + amuse::SoundMacro::CmdWaitMs* waitMillisec = static_cast( + m_playbackMacro->insertNewCmd(1, amuse::SoundMacro::CmdOp::WaitMs)); + waitMillisec->keyOff = true; + waitMillisec->ms = 65535; + m_playbackMacro->insertNewCmd(2, amuse::SoundMacro::CmdOp::StopSample); + m_playbackMacro->insertNewCmd(3, amuse::SoundMacro::CmdOp::End); update(); diff --git a/Editor/platforms/freedesktop/1024x1024/apps/amuse.png b/Editor/platforms/freedesktop/1024x1024/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/1024x1024/apps/amuse.png rename to Editor/platforms/freedesktop/1024x1024/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/128x128/apps/amuse.png b/Editor/platforms/freedesktop/128x128/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/128x128/apps/amuse.png rename to Editor/platforms/freedesktop/128x128/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/16x16/apps/amuse.png b/Editor/platforms/freedesktop/16x16/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/16x16/apps/amuse.png rename to Editor/platforms/freedesktop/16x16/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/256x256/apps/amuse.png b/Editor/platforms/freedesktop/256x256/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/256x256/apps/amuse.png rename to Editor/platforms/freedesktop/256x256/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/32x32/apps/amuse.png b/Editor/platforms/freedesktop/32x32/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/32x32/apps/amuse.png rename to Editor/platforms/freedesktop/32x32/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/48x48/apps/amuse.png b/Editor/platforms/freedesktop/48x48/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/48x48/apps/amuse.png rename to Editor/platforms/freedesktop/48x48/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/512x512/apps/amuse.png b/Editor/platforms/freedesktop/512x512/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/512x512/apps/amuse.png rename to Editor/platforms/freedesktop/512x512/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/64x64/apps/amuse.png b/Editor/platforms/freedesktop/64x64/apps/amuse-gui.png similarity index 100% rename from Editor/platforms/freedesktop/64x64/apps/amuse.png rename to Editor/platforms/freedesktop/64x64/apps/amuse-gui.png diff --git a/Editor/platforms/freedesktop/CMakeLists.txt b/Editor/platforms/freedesktop/CMakeLists.txt index f9f5321..5bb5674 100644 --- a/Editor/platforms/freedesktop/CMakeLists.txt +++ b/Editor/platforms/freedesktop/CMakeLists.txt @@ -7,11 +7,11 @@ add_custom_command(OUTPUT ${amuse_BINARY_DIR}/Editor/platforms/freedesktop/maini COMMAND $ ARGS ${amuse_BINARY_DIR}/Editor/platforms/freedesktop/mainicon_qt.bin DEPENDS - ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/128x128/apps/amuse.png - ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/64x64/apps/amuse.png - ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/48x48/apps/amuse.png - ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/32x32/apps/amuse.png - ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/16x16/apps/amuse.png + ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/128x128/apps/amuse-gui.png + ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/64x64/apps/amuse-gui.png + ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/48x48/apps/amuse-gui.png + ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/32x32/apps/amuse-gui.png + ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop/16x16/apps/amuse-gui.png WORKING_DIRECTORY ${amuse_SOURCE_DIR}/Editor/platforms/freedesktop COMMENT "Generating mainicon_qt.bin") bintoc(mainicon_qt.cpp ${amuse_BINARY_DIR}/Editor/platforms/freedesktop/mainicon_qt.bin MAINICON_QT) diff --git a/Editor/platforms/freedesktop/amuse.desktop b/Editor/platforms/freedesktop/amuse-gui.desktop old mode 100644 new mode 100755 similarity index 81% rename from Editor/platforms/freedesktop/amuse.desktop rename to Editor/platforms/freedesktop/amuse-gui.desktop index 41768cb..a08b11b --- a/Editor/platforms/freedesktop/amuse.desktop +++ b/Editor/platforms/freedesktop/amuse-gui.desktop @@ -1,9 +1,10 @@ +#!/usr/bin/env xdg-open [Desktop Entry] Name=Amuse GenericName=MusyX Game Audio Editor Comment=Edit Audio Data of MusyX Sound Groups Exec=amuse-gui -Icon=amuse +Icon=amuse-gui Terminal=false Type=Application Categories=Audio diff --git a/Editor/platforms/freedesktop/mkqticon.c b/Editor/platforms/freedesktop/mkqticon.c index 18e69e0..bc45813 100644 --- a/Editor/platforms/freedesktop/mkqticon.c +++ b/Editor/platforms/freedesktop/mkqticon.c @@ -36,7 +36,7 @@ int main(int argc, char* argv[]) printf("Rendering main icon @%dx%d\n", *d, *d); fflush(stdout); - snprintf(command, 2048, "%dx%d/apps/amuse.png", *d, *d); + snprintf(command, 2048, "%dx%d/apps/amuse-gui.png", *d, *d); FILE* fp = fopen(command, "rb"); if (!fp) { diff --git a/Editor/resources/lang_de.ts b/Editor/resources/lang_de.ts index 9ee4009..ef6519d 100644 --- a/Editor/resources/lang_de.ts +++ b/Editor/resources/lang_de.ts @@ -1687,70 +1687,70 @@ SampleControls - + Change %1 - - - + + + Loop - + Loop Start - + Loop End - + Change Base Pitch - + Make WAV Version - + Make Compressed Version - + Up To Date - - + + Nothing Loaded - + Zoom - + Start - + End - + Base Pitch