├── dev ├── default.m3u8 ├── bundled-STIL.txt ├── bundled-Songs.zip ├── icon_src │ ├── icon.ico │ ├── sidplaywx_icon.png │ ├── sidplaywx_icon.xcfbz2 │ ├── sidplaywx_icon_prepared.xcfbz2 │ └── sidplaywx_icon_template.xcfbz2 ├── resources.rc ├── theme │ ├── default │ │ ├── svg │ │ │ ├── subtract-line.svg │ │ │ ├── add-line.svg │ │ │ ├── pause-fill.svg │ │ │ ├── music-fill.svg │ │ │ ├── arrow-up-s-line.svg │ │ │ ├── arrow-down-s-line.svg │ │ │ ├── stop-fill.svg │ │ │ ├── user-3-fill.svg │ │ │ ├── repeat-line.svg │ │ │ ├── timer-fill.svg │ │ │ ├── order-play-line.svg │ │ │ ├── play-fill.svg │ │ │ ├── origin.txt │ │ │ ├── skip-back-fill.svg │ │ │ ├── skip-forward-fill.svg │ │ │ ├── folder-open-fill.svg │ │ │ ├── lock-line.svg │ │ │ ├── close-line.svg │ │ │ ├── rewind-fill.svg │ │ │ ├── speed-fill.svg │ │ │ ├── home-line.svg │ │ │ ├── equalizer-fill.svg │ │ │ ├── repeat-one-line.svg │ │ │ ├── album-fill.svg │ │ │ ├── dislike-fill.svg │ │ │ ├── copyright-line.svg │ │ │ ├── vip-crown-2-line.svg │ │ │ ├── mic-fill.svg │ │ │ ├── information-2-line.svg │ │ │ ├── dislike-line.svg │ │ │ ├── chat-quote-fill.svg │ │ │ ├── infinity-line.svg │ │ │ └── chip-memory.svg │ │ └── theme.xml │ └── readme.txt ├── org.bytespiller.sidplaywx.appdata.xml └── SystemColorViewer.pyw ├── deps ├── lib │ ├── linux │ │ ├── portaudio │ │ │ └── placeholder.txt │ │ ├── libsidplayfp │ │ │ └── placeholder.txt │ │ ├── wxWidgets │ │ │ └── placeholder.txt │ │ ├── CMakeLists_portaudio.txt │ │ ├── CMakeLists_libsidplayfp.txt │ │ └── CMakeLists_wxWidgets.txt │ └── msw │ │ ├── portaudio │ │ ├── placeholder.txt │ │ └── portaudio.url │ │ ├── wxWidgets │ │ └── placeholder.txt │ │ ├── CMakeLists_libsidplayfp.txt │ │ ├── CMakeLists_portaudio.txt │ │ └── CMakeLists_wxWidgets.txt └── include │ ├── msw │ ├── libsidplayfp │ │ └── CMakeLists.txt │ ├── portaudio │ │ └── placeholder.txt │ └── wxWidgets │ │ └── placeholder.txt │ └── linux │ ├── portaudio │ └── placeholder.txt │ ├── wxWidgets │ └── placeholder.txt │ └── libsidplayfp │ └── sidplayfp │ └── placeholder.txt ├── org.bytespiller.sidplaywx.desktop ├── .vscode ├── tasks.json └── launch.json ├── .gitignore ├── linuxdeploy-appimage.sh ├── src ├── main.cpp ├── Util │ ├── Const.h │ ├── BufferHolder.cpp │ ├── BufferHolder.h │ ├── SimpleSignal │ │ ├── SimpleSignalListener.h │ │ └── SimpleSignalProvider.h │ ├── SimpleTimer.h │ ├── HelpersGeneral.h │ └── SimpleTimer.cpp ├── wxApplication │ ├── Helpers │ │ ├── DpiSize.h │ │ └── DpiSize.cpp │ ├── Theme │ │ ├── ThemeLoader.h │ │ ├── XmlSequenceParsers │ │ │ ├── ThemeColorsParser.h │ │ │ ├── ThemedElementsParser.h │ │ │ ├── ThemeImagesParser.h │ │ │ ├── ThemeColorsParser.cpp │ │ │ ├── ThemedElementsParser.cpp │ │ │ └── ThemeImagesParser.cpp │ │ ├── ThemeColor.h │ │ ├── ThemeData │ │ │ ├── ThemedElementData.cpp │ │ │ ├── ThemeImage.h │ │ │ ├── ThemedElementData.h │ │ │ ├── ThemeData.h │ │ │ └── ThemeData.cpp │ │ ├── ThemeManager.h │ │ ├── ThemeManager.cpp │ │ ├── ThemeLoader.cpp │ │ ├── ThemeXml.h │ │ └── ThemeColor.cpp │ ├── SingleInstanceManager │ │ ├── MyClient.h │ │ ├── MyClient.cpp │ │ ├── IpcSetup.h │ │ ├── MyServer.h │ │ ├── MyServer.cpp │ │ └── SingleInstanceManager.h │ ├── UIElements │ │ ├── ElementsUtil.h │ │ ├── PlayPauseButton.h │ │ ├── MultiImageButton.h │ │ ├── MultiImageButton.cpp │ │ ├── Playlist │ │ │ └── Components │ │ │ │ ├── PlaylistIcons.cpp │ │ │ │ └── PlaylistIcons.h │ │ ├── PlayPauseButton.cpp │ │ ├── WaveformVisualization.h │ │ ├── ElementsUtil.cpp │ │ ├── SearchBar.h │ │ ├── ScrollingLabel.h │ │ ├── WaveformVisualization.cpp │ │ ├── CompositeSeekBar.h │ │ ├── RepeatModeButton.h │ │ └── SearchBar.cpp │ ├── FrameChildren │ │ ├── FramePrefs │ │ │ ├── ElementsPrefs.h │ │ │ ├── ElementsPrefs.cpp │ │ │ └── FramePrefs.h │ │ ├── FrameTuneInfo │ │ │ ├── ElementsTuneInfo.h │ │ │ └── FrameTuneInfo.h │ │ └── FramePlaybackMods │ │ │ ├── FramePlaybackMods.h │ │ │ └── ElementsPlaybackMods.h │ ├── Settings │ │ ├── SettingsBase.h │ │ ├── Option.h │ │ └── Option.cpp │ └── MyApp.h ├── PlaybackController │ ├── PlaybackWrappers │ │ ├── IBufferWriter.h │ │ ├── Output │ │ │ ├── extra │ │ │ │ ├── VirtualStereo │ │ │ │ │ ├── LinearBuffer.h │ │ │ │ │ ├── VirtualStereo.h │ │ │ │ │ ├── CircularBuffer.h │ │ │ │ │ ├── LinearBuffer.cpp │ │ │ │ │ └── CircularBuffer.cpp │ │ │ │ ├── VisualizationBuffer.h │ │ │ │ └── VisualizationBuffer.cpp │ │ │ └── PortAudioOutput.h │ │ └── Input │ │ │ └── SidDecoder │ │ │ ├── SidMixer.h │ │ │ └── SidMixer.cpp │ ├── Util │ │ ├── RomUtil.h │ │ └── RomUtil.cpp │ └── PreRender.h └── HvscSupport │ ├── Stil │ ├── Common.h │ ├── PreIndex.h │ ├── Stil.h │ └── PreIndex.cpp │ └── Songlengths.h ├── CMakeLists_linux.txt └── CMakeLists.txt /dev/default.m3u8: -------------------------------------------------------------------------------- 1 | # 2 | bundled-Songs.zip 3 | -------------------------------------------------------------------------------- /deps/lib/linux/portaudio/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the libportaudio.a here -------------------------------------------------------------------------------- /deps/lib/msw/portaudio/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the libportaudio.a here -------------------------------------------------------------------------------- /deps/lib/linux/libsidplayfp/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the libsidplayfp.a here -------------------------------------------------------------------------------- /dev/bundled-STIL.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytespiller/sidplaywx/HEAD/dev/bundled-STIL.txt -------------------------------------------------------------------------------- /deps/include/msw/libsidplayfp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(C:/msys64/ucrt64/include/sidplayfp) -------------------------------------------------------------------------------- /deps/lib/msw/portaudio/portaudio.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=http://www.portaudio.com/download.html -------------------------------------------------------------------------------- /dev/bundled-Songs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytespiller/sidplaywx/HEAD/dev/bundled-Songs.zip -------------------------------------------------------------------------------- /dev/icon_src/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytespiller/sidplaywx/HEAD/dev/icon_src/icon.ico -------------------------------------------------------------------------------- /deps/include/linux/portaudio/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the includes here from the source of the lib you are compiling. -------------------------------------------------------------------------------- /deps/include/linux/wxWidgets/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the includes here from the source of the lib you are compiling. -------------------------------------------------------------------------------- /deps/include/msw/portaudio/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the includes here from the source of the lib you are compiling. -------------------------------------------------------------------------------- /deps/include/msw/wxWidgets/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the includes here from the source of the lib you are compiling. -------------------------------------------------------------------------------- /deps/lib/linux/wxWidgets/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the wx /lib/* files here (including the wx/ directory from /lib/). -------------------------------------------------------------------------------- /deps/lib/msw/wxWidgets/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the wx /lib/* files here (including the wx/ directory from /lib/). -------------------------------------------------------------------------------- /dev/icon_src/sidplaywx_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytespiller/sidplaywx/HEAD/dev/icon_src/sidplaywx_icon.png -------------------------------------------------------------------------------- /deps/include/linux/libsidplayfp/sidplayfp/placeholder.txt: -------------------------------------------------------------------------------- 1 | Copy the includes here from the source of the lib you are compiling. -------------------------------------------------------------------------------- /dev/icon_src/sidplaywx_icon.xcfbz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytespiller/sidplaywx/HEAD/dev/icon_src/sidplaywx_icon.xcfbz2 -------------------------------------------------------------------------------- /dev/icon_src/sidplaywx_icon_prepared.xcfbz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytespiller/sidplaywx/HEAD/dev/icon_src/sidplaywx_icon_prepared.xcfbz2 -------------------------------------------------------------------------------- /dev/icon_src/sidplaywx_icon_template.xcfbz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytespiller/sidplaywx/HEAD/dev/icon_src/sidplaywx_icon_template.xcfbz2 -------------------------------------------------------------------------------- /dev/resources.rc: -------------------------------------------------------------------------------- 1 | #define wxUSE_DPI_AWARE_MANIFEST 1 2 | 3 | #ifdef WIN32 4 | #include 5 | #endif 6 | 7 | appicon ICON "icon_src/icon.ico" 8 | -------------------------------------------------------------------------------- /dev/theme/default/svg/subtract-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/add-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deps/lib/msw/CMakeLists_libsidplayfp.txt: -------------------------------------------------------------------------------- 1 | add_library(libsidplayfp STATIC IMPORTED) 2 | set_target_properties(libsidplayfp PROPERTIES IMPORTED_LOCATION C:/msys64/ucrt64/lib/libsidplayfp.a) -------------------------------------------------------------------------------- /dev/theme/readme.txt: -------------------------------------------------------------------------------- 1 | - SVG files must have fill="#000" or fill="currentColor" for their colors to be dynamically set (e.g., dark theme). 2 | - Full "theming" support not yet implemented. 3 | -------------------------------------------------------------------------------- /deps/lib/linux/CMakeLists_portaudio.txt: -------------------------------------------------------------------------------- 1 | add_library(libportaudio STATIC IMPORTED) 2 | set_target_properties(libportaudio PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/portaudio/libportaudio.a") -------------------------------------------------------------------------------- /deps/lib/msw/CMakeLists_portaudio.txt: -------------------------------------------------------------------------------- 1 | add_library(libportaudio STATIC IMPORTED) 2 | set_target_properties(libportaudio PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/portaudio/libportaudio.a") -------------------------------------------------------------------------------- /deps/lib/linux/CMakeLists_libsidplayfp.txt: -------------------------------------------------------------------------------- 1 | add_library(libsidplayfp STATIC IMPORTED) 2 | set_target_properties(libsidplayfp PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libsidplayfp/libsidplayfp.a) -------------------------------------------------------------------------------- /dev/theme/default/svg/pause-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/music-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/arrow-up-s-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/arrow-down-s-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/stop-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/user-3-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /org.bytespiller.sidplaywx.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | X-AppImage-Arch=x86_64 3 | Name=sidplaywx 4 | Comment=A GUI player for Commodore 64 SID music files 5 | Exec=sidplaywx 6 | Terminal=false 7 | Icon=sidplaywx_icon 8 | Type=Application 9 | Categories=Audio;Player;GTK; -------------------------------------------------------------------------------- /dev/theme/default/svg/repeat-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/timer-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/order-play-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/play-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/origin.txt: -------------------------------------------------------------------------------- 1 | Icon from: https://uxwing.com 2 | - chip-memory.svg 3 | 4 | All other icons are from: https://remixicon.com/ 5 | 6 | Some icons are modified with added color specification like: fill="#000" in order for auto-coloring (dark vs. light system themes) to work. 7 | -------------------------------------------------------------------------------- /dev/theme/default/svg/skip-back-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/skip-forward-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/folder-open-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/lock-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/close-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/rewind-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/speed-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/home-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/equalizer-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/repeat-one-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/album-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/dislike-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/copyright-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/vip-crown-2-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/mic-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/theme/default/svg/information-2-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "shell", 6 | "label": "C/C++: mingw32-make", 7 | "command": "mingw32-make", 8 | "args": [], 9 | "options": { 10 | "cwd": "${workspaceFolder}//build" 11 | }, 12 | "group": "build" 13 | }, 14 | { 15 | "type": "shell", 16 | "label": "C/C++: Linux make", 17 | "command": "make", 18 | "args": [], 19 | "options": { 20 | "cwd": "${workspaceFolder}//build" 21 | }, 22 | "group": { 23 | "kind": "build", 24 | "isDefault": true 25 | }, 26 | "problemMatcher": [] 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | # Local dirs 35 | /build/* 36 | /src/build/* 37 | /src/.vscode/* 38 | 39 | # Built dependencies 40 | /deps/include/** 41 | !/deps/include/**/ 42 | !deps/include/**/*.txt 43 | 44 | /deps/lib/** 45 | !/deps/lib/**/ 46 | !/deps/lib/**/*.txt 47 | 48 | # Misc. generated stuff 49 | *.log 50 | *.pdb 51 | *.code-workspace 52 | .vscode/settings.json 53 | -------------------------------------------------------------------------------- /dev/theme/default/svg/dislike-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dev/org.bytespiller.sidplaywx.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.bytespiller.sidplaywx 4 | sidplaywx 5 | A GUI player for Commodore 64 SID music files 6 | FSFAP 7 | https://github.com/bytespiller/sidplaywx 8 | 9 | Jasmin Rutić 10 | 11 | 12 | 13 | Audio 14 | Player 15 | GTK 16 | 17 | 18 | 19 | 20 | offline-only 21 | 22 | -------------------------------------------------------------------------------- /linuxdeploy-appimage.sh: -------------------------------------------------------------------------------- 1 | rm -rf ./build/AppDir 2 | mkdir -p build/AppDir 3 | 4 | mkdir -p build/AppDir/usr/share/metainfo 5 | cp ./dev/org.bytespiller.sidplaywx.appdata.xml ./build/AppDir/usr/share/metainfo 6 | 7 | mkdir -p build/AppDir/usr/bin 8 | #cp ./build/stil.index ./build/AppDir/usr/bin # Don't copy this on Linux, sidplaywx itself will generate new one where needed. 9 | cp -r ./dev/theme ./build/AppDir/usr/bin 10 | cp ./dev/default.m3u8 ./build/AppDir/usr/bin 11 | cp ./dev/bundled-STIL.txt ./build/AppDir/usr/bin 12 | cp ./dev/bundled-Songs.zip ./build/AppDir/usr/bin 13 | cp ./dev/bundled-Songlengths.md5 ./build/AppDir/usr/bin 14 | 15 | ./build/linuxdeploy-x86_64.AppImage -e ./build/sidplaywx -d ./org.bytespiller.sidplaywx.desktop --icon-file ./dev/icon_src/sidplaywx_icon.png --appdir ./build/AppDir --output appimage 16 | echo -e "\nAll done!" 17 | -------------------------------------------------------------------------------- /dev/theme/default/svg/chat-quote-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #include "wxApplication/MyApp.h" 20 | 21 | wxIMPLEMENT_APP(MyApp); 22 | -------------------------------------------------------------------------------- /dev/theme/default/svg/infinity-line.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Util/Const.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | namespace Const 22 | { 23 | constexpr int MILLISECONDS_IN_MINUTE = 60000; 24 | constexpr int MILLISECONDS_IN_SECOND = 1000; 25 | } 26 | -------------------------------------------------------------------------------- /src/wxApplication/Helpers/DpiSize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2024 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | wxSize DpiSize(const wxSize& size); 27 | wxSize DpiSize(int xx, int yy); 28 | wxSize DpiSize(int size); 29 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/ThemeLoader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace ThemeData 24 | { 25 | class ThemeData; 26 | } 27 | 28 | namespace ThemeLoader 29 | { 30 | [[nodiscard]] ThemeData::ThemeData LoadTheme(const std::string& path); 31 | } 32 | -------------------------------------------------------------------------------- /src/Util/BufferHolder.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #include "BufferHolder.h" 20 | 21 | BufferHolder::BufferHolder(size_t bufferSize) 22 | { 23 | size = bufferSize; 24 | buffer = new uint_least8_t[size]; 25 | } 26 | 27 | BufferHolder::~BufferHolder() 28 | { 29 | delete[] buffer; 30 | buffer = nullptr; 31 | size = 0; 32 | } 33 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/XmlSequenceParsers/ThemeColorsParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "../ThemeData/ThemedElementData.h" 22 | 23 | class wxXmlNode; 24 | 25 | namespace ThemeLoader 26 | { 27 | bool TryParseColors(const wxXmlNode& node, ThemeData::ThemedElementData::ColoredProperties& out); 28 | } 29 | -------------------------------------------------------------------------------- /src/PlaybackController/PlaybackWrappers/IBufferWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2023 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class IBufferWriter 24 | { 25 | public: 26 | using SeekStatusCallback = std::function; 27 | 28 | public: 29 | virtual bool TryFillBuffer(void* buffer, unsigned long framesPerBuffer) = 0; 30 | }; 31 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/ThemeColor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | 28 | namespace ThemeColor 29 | { 30 | enum class Type 31 | { 32 | wxSYS, 33 | Val 34 | }; 35 | 36 | wxColor AsWxColor(Type type, const std::string& value); 37 | } 38 | -------------------------------------------------------------------------------- /src/HvscSupport/Stil/Common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2024 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | using HvscPathsIndex = std::unordered_map; 25 | 26 | // Removes final CR from the string if present. 27 | inline void ClipCarriageReturn(std::string& str) 28 | { 29 | if (str.back() == '\r') 30 | { 31 | str.pop_back(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/XmlSequenceParsers/ThemedElementsParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "../ThemeData/ThemeData.h" 22 | 23 | #include 24 | #ifndef WX_PRECOMP 25 | #include 26 | #endif 27 | 28 | class wxXmlNode; 29 | 30 | namespace ThemeLoader 31 | { 32 | bool TryParseThemedElements(const wxXmlNode& node, ThemeData::ThemeData::ThemedElements& out); 33 | } 34 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/XmlSequenceParsers/ThemeImagesParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "../ThemeData/ThemeData.h" 22 | 23 | #include 24 | #ifndef WX_PRECOMP 25 | #include 26 | #endif 27 | 28 | class wxXmlNode; 29 | 30 | namespace ThemeLoader 31 | { 32 | bool TryParseThemeImages(const wxXmlNode& node, const std::string& themePath, ThemeData::ThemeData::ThemeImages& out); 33 | } 34 | -------------------------------------------------------------------------------- /src/wxApplication/Helpers/DpiSize.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2024 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #include "DpiSize.h" 20 | 21 | wxSize DpiSize(const wxSize& size) 22 | { 23 | const wxWindow* const mainFrame = wxTheApp->GetTopWindow(); 24 | assert(mainFrame != nullptr); 25 | return mainFrame->FromDIP(size); 26 | } 27 | 28 | wxSize DpiSize(int xx, int yy) 29 | { 30 | return DpiSize(wxSize(xx, yy)); 31 | } 32 | 33 | wxSize DpiSize(int size) 34 | { 35 | return DpiSize(wxSize(size, size)); 36 | } 37 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "g++ - Build and debug (mingw32-make)", 6 | "type": "cppdbg", 7 | "request": "launch", 8 | "program": "${workspaceFolder}\\build\\sidplaywx.exe", 9 | "args": [], 10 | "stopAtEntry": false, 11 | "cwd": "${workspaceFolder}", 12 | "environment": [], 13 | "externalConsole": false, 14 | "MIMode": "gdb", 15 | //"miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe", 16 | "setupCommands": [ 17 | { 18 | "description": "Enable pretty-printing for gdb", 19 | "text": "-enable-pretty-printing", 20 | "ignoreFailures": true 21 | } 22 | ], 23 | "preLaunchTask": "C/C++: mingw32-make" 24 | }, 25 | { 26 | "name": "g++ - Build and debug (Linux make)", 27 | "type": "cppdbg", 28 | "request": "launch", 29 | "program": "${workspaceFolder}/build/sidplaywx", 30 | "args": [], 31 | "stopAtEntry": false, 32 | "cwd": "${workspaceFolder}", 33 | "environment": [], 34 | "externalConsole": false, 35 | "MIMode": "gdb", 36 | "setupCommands": [ 37 | { 38 | "description": "Enable pretty-printing for gdb", 39 | "text": "-enable-pretty-printing", 40 | "ignoreFailures": true 41 | } 42 | ], 43 | "preLaunchTask": "C/C++: Linux make" 44 | } 45 | ] 46 | } -------------------------------------------------------------------------------- /src/wxApplication/Theme/ThemeData/ThemedElementData.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2024 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #include "ThemedElementData.h" 20 | 21 | namespace ThemeData 22 | { 23 | ThemedElementData::ThemedElementData(const ColoredProperties& colors) : 24 | _colors(colors) 25 | { 26 | } 27 | 28 | wxColor ThemedElementData::GetPropertyColor(const std::string& property) const 29 | { 30 | const auto it = _colors.find(property); 31 | return (it == _colors.cend()) ? wxColor() : (*it).second; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/ThemeManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace ThemeData 25 | { 26 | class ThemeData; 27 | } 28 | 29 | class ThemeManager 30 | { 31 | public: 32 | ThemeManager() = default; 33 | 34 | public: 35 | void LoadTheme(const std::string& foldername); 36 | const ThemeData::ThemeData& GetTheme(const std::string& foldername); 37 | 38 | private: 39 | std::map _loadedThemes; 40 | }; 41 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/ThemeData/ThemeImage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | 28 | namespace ThemeData 29 | { 30 | struct ThemeImage 31 | { 32 | ThemeImage() = delete; 33 | ThemeImage(const std::string& aName, const std::string& aPath) : 34 | name(aName), 35 | path(aPath) 36 | { 37 | } 38 | 39 | const std::string name; 40 | const std::string path; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /src/Util/BufferHolder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | struct BufferHolder // Designed for holding a buffered SID Tune (when loaded from a Zip file) for use with libsidplayfp. 25 | { 26 | BufferHolder() = delete; 27 | BufferHolder(const BufferHolder& other) = delete; 28 | BufferHolder& operator=(const BufferHolder&) = delete; 29 | 30 | explicit BufferHolder(size_t bufferSize); 31 | ~BufferHolder(); 32 | 33 | uint_least8_t* buffer = nullptr; 34 | size_t size = 0; 35 | }; 36 | -------------------------------------------------------------------------------- /src/wxApplication/SingleInstanceManager/MyClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | #include 28 | 29 | class MyClient : public wxClient 30 | { 31 | public: 32 | bool TryConnect(const wxString& host, const wxString& service, const wxString& topic); 33 | 34 | bool IsConnected() const; 35 | wxConnection* GetConnection(); 36 | void Disconnect(); 37 | 38 | private: 39 | std::unique_ptr _connection; 40 | }; 41 | -------------------------------------------------------------------------------- /src/PlaybackController/PlaybackWrappers/Output/extra/VirtualStereo/LinearBuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class LinearBuffer 24 | { 25 | public: 26 | LinearBuffer() = default; 27 | LinearBuffer(const LinearBuffer&) = delete; 28 | LinearBuffer& operator=(const LinearBuffer&) = delete; 29 | 30 | ~LinearBuffer(); 31 | 32 | public: 33 | void CopyFrom(const short* const src, size_t length); 34 | void CopyTo(short* out); 35 | 36 | const short* GetData() const; 37 | 38 | private: 39 | short* _data = nullptr; 40 | size_t _length = 0; 41 | }; 42 | -------------------------------------------------------------------------------- /src/wxApplication/UIElements/ElementsUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | 28 | namespace ThemeData 29 | { 30 | struct ThemeImage; 31 | } 32 | 33 | namespace UIElements 34 | { 35 | namespace Util 36 | { 37 | wxButton* NewSvgButton(const ThemeData::ThemeImage& themeImage, const wxSize& size, wxPanel& panel); 38 | std::shared_ptr LoadColorizedSvg(const char* filename, const wxSize& size, const wxColor* const color = nullptr); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/wxApplication/FrameChildren/FramePrefs/ElementsPrefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | //#include 28 | 29 | namespace FrameElements 30 | { 31 | class ElementsPrefs 32 | { 33 | public: 34 | ElementsPrefs() = delete; 35 | ElementsPrefs(const ElementsPrefs&) = delete; 36 | ElementsPrefs& operator=(const ElementsPrefs&) = delete; 37 | 38 | explicit ElementsPrefs(wxDialog& dialog); 39 | 40 | public: 41 | wxPropertyGridManager* propertyGrid; 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /dev/theme/default/svg/chip-memory.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Util/SimpleSignal/SimpleSignalListener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "SimpleSignalProvider.h" 22 | 23 | template 24 | class SimpleSignalListener 25 | { 26 | public: 27 | SimpleSignalListener() = default; 28 | 29 | public: 30 | void SubscribeMe(SimpleSignalProvider& signalProvider, ENUM_TYPE signalId, Signal::Func&& callback) 31 | { 32 | _subscriptions.emplace_back(signalProvider.Subscribe(signalId, callback)); 33 | } 34 | 35 | void UnsubscribeAll() 36 | { 37 | _subscriptions.clear(); 38 | } 39 | 40 | protected: 41 | std::vector::Subscription> _subscriptions; 42 | }; 43 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/ThemeData/ThemedElementData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | #include 28 | 29 | namespace ThemeData 30 | { 31 | class ThemedElementData 32 | { 33 | public: 34 | using ColoredProperties = std::map; 35 | 36 | public: 37 | ThemedElementData() = delete; 38 | explicit ThemedElementData(const ColoredProperties& colors); 39 | 40 | public: 41 | wxColor GetPropertyColor(const std::string& property) const; 42 | // TODO: other properties support perhaps 43 | 44 | private: 45 | ColoredProperties _colors; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /src/wxApplication/UIElements/PlayPauseButton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "MultiImageButton.h" 22 | 23 | namespace ThemeData 24 | { 25 | struct ThemeImage; 26 | } 27 | 28 | namespace UIElements 29 | { 30 | class PlayPauseButton : public MultiImageButton 31 | { 32 | private: 33 | enum class ActiveImage 34 | { 35 | Play = 0, 36 | Pause = 1 37 | }; 38 | 39 | public: 40 | PlayPauseButton() = delete; 41 | PlayPauseButton(const ThemeData::ThemeImage& imagePlay, const ThemeData::ThemeImage& imagePause, const wxSize& size, wxPanel& panel); 42 | 43 | public: 44 | bool IsPlay() const; 45 | bool IsPause() const; 46 | 47 | void SetPlay(); 48 | void SetPause(); 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /src/wxApplication/FrameChildren/FramePrefs/ElementsPrefs.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #include "ElementsPrefs.h" 20 | 21 | namespace FrameElements 22 | { 23 | static constexpr int BORDER = 10; // To make the resizing widget easily accessible on MSW. 24 | 25 | ElementsPrefs::ElementsPrefs(wxDialog& dialog) 26 | { 27 | wxBoxSizer* const sizer = new wxBoxSizer(wxVERTICAL); 28 | propertyGrid = new wxPropertyGridManager(&dialog, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_LIMITED_EDITING | wxPG_NO_INTERNAL_BORDER | wxPG_BOLD_MODIFIED | wxPG_DESCRIPTION); 29 | //propertyGrid->SetExtraStyle(wxPG_EX_HELP_AS_TOOLTIPS); 30 | sizer->Add(propertyGrid, 1, wxEXPAND, 0); 31 | sizer->Add(dialog.CreateButtonSizer(wxAPPLY | wxCANCEL | wxOK), 0, wxEXPAND | wxALL, BORDER); 32 | dialog.SetSizer(sizer); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/wxApplication/SingleInstanceManager/MyClient.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #include "MyClient.h" 20 | 21 | bool MyClient::TryConnect(const wxString& host, const wxString& service, const wxString& topic) 22 | { 23 | Disconnect(); 24 | 25 | // suppress the log messages from MakeConnection() 26 | wxLogNull nolog; 27 | 28 | _connection = std::unique_ptr(static_cast(MakeConnection(host, service, topic))); 29 | return _connection != nullptr; 30 | } 31 | 32 | bool MyClient::IsConnected() const 33 | { 34 | return _connection != nullptr; 35 | } 36 | 37 | wxConnection* MyClient::GetConnection() 38 | { 39 | return _connection.get(); 40 | } 41 | 42 | void MyClient::Disconnect() 43 | { 44 | _connection = nullptr; // wxConnection's destructor also calls its own Disconnect(); 45 | } 46 | -------------------------------------------------------------------------------- /src/wxApplication/Theme/ThemeManager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #include "ThemeManager.h" 20 | #include "ThemeLoader.h" 21 | #include "ThemeData/ThemeData.h" 22 | #include 23 | 24 | static const std::string THEMES_FOLDER = "theme/"; 25 | 26 | void ThemeManager::LoadTheme(const std::string& foldername) 27 | { 28 | if (_loadedThemes.count(foldername) != 0) 29 | { 30 | throw std::runtime_error("Theme already loaded!"); 31 | } 32 | 33 | _loadedThemes.emplace(foldername, ThemeLoader::LoadTheme(THEMES_FOLDER + foldername)); 34 | } 35 | 36 | const ThemeData::ThemeData& ThemeManager::GetTheme(const std::string& foldername) 37 | { 38 | if (_loadedThemes.count(foldername) != 1) 39 | { 40 | throw std::runtime_error("Theme wasn't loaded before!"); 41 | } 42 | 43 | return _loadedThemes.at(foldername); 44 | } 45 | -------------------------------------------------------------------------------- /src/PlaybackController/PlaybackWrappers/Input/SidDecoder/SidMixer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | class sidplayfp; 22 | 23 | class SidMixer 24 | { 25 | public: 26 | static constexpr unsigned int LIBSIDPLAYFP_PLAY_CYCLES = 3000; // Roughly 3ms buffer granularity. 27 | 28 | public: 29 | SidMixer() = delete; 30 | SidMixer(SidMixer&) = delete; 31 | SidMixer& operator=(const SidMixer&) = delete; 32 | 33 | explicit SidMixer(sidplayfp& sidEngine); 34 | 35 | public: 36 | void FillBuffer(void* buffer, unsigned long framesPerBuffer); 37 | 38 | private: 39 | sidplayfp& _sidEngine; 40 | 41 | const unsigned int _numSidChips = 0; 42 | const float _sidVolumeFactor = 0; 43 | const unsigned int _numChannels = 0; 44 | short* _sidChipsBuffers[3]; 45 | 46 | int _samplesPos = 0; 47 | int _samplesLen = 0; 48 | }; 49 | -------------------------------------------------------------------------------- /src/wxApplication/FrameChildren/FrameTuneInfo/ElementsTuneInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | 28 | namespace FrameElements 29 | { 30 | class ElementsTuneInfo 31 | { 32 | public: 33 | ElementsTuneInfo() = delete; 34 | ElementsTuneInfo(const ElementsTuneInfo&) = delete; 35 | ElementsTuneInfo& operator=(const ElementsTuneInfo&) = delete; 36 | 37 | explicit ElementsTuneInfo(wxDialog& dialog); 38 | 39 | private: 40 | void AddProperty(wxPropertyGridPage* page, const char* const title); 41 | 42 | public: 43 | wxPropertyGridManager* propertyGrid = nullptr; 44 | wxCheckBox* checkboxFollowPlayback = nullptr; 45 | wxButton* buttonBrowse = nullptr; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /src/wxApplication/UIElements/MultiImageButton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | #ifndef WX_PRECOMP 23 | #include 24 | #endif 25 | 26 | #include 27 | 28 | namespace ThemeData 29 | { 30 | struct ThemeImage; 31 | } 32 | 33 | namespace UIElements 34 | { 35 | class MultiImageButton : public wxButton 36 | { 37 | protected: 38 | using ImageList = std::vector< std::reference_wrapper >; 39 | 40 | public: 41 | MultiImageButton() = delete; 42 | MultiImageButton(const ImageList& images, const wxSize& size, wxPanel& panel); 43 | 44 | protected: 45 | void SetActiveImage(int index); 46 | int GetActiveImage() const; 47 | 48 | private: 49 | std::vector< std::shared_ptr > _indexedBitmaps; 50 | int _activeBitmapIndex = 0; 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /src/PlaybackController/PlaybackWrappers/Output/extra/VirtualStereo/VirtualStereo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "CircularBuffer.h" 22 | #include "LinearBuffer.h" 23 | 24 | class VirtualStereo 25 | { 26 | public: 27 | VirtualStereo() = delete; 28 | VirtualStereo(unsigned int sampleRate, unsigned int offsetMs, float sideVolumeFactor); 29 | 30 | public: 31 | /// @brief Applies the effect. 16bit stereo stream is assumed. 32 | void Apply(short* const out, const size_t framesPerBuffer); 33 | 34 | /// @brief Flushes buffers so it's ready for new playback. 35 | void Reset(); 36 | 37 | void ChangeSideVolumeFactor(float factor); 38 | 39 | private: 40 | const size_t _framesOffset = 0; 41 | size_t _warmupReadSamples = 0; 42 | CircularBuffer _delayBuffer; 43 | LinearBuffer _snapshotBuffer; 44 | 45 | float _sideVolumeFactor = 0.5; // 0.5 is maximum 46 | float _centerVolumeFactor = 0.5; 47 | }; 48 | -------------------------------------------------------------------------------- /src/wxApplication/Settings/SettingsBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of sidplaywx, a GUI player for Commodore 64 SID music files. 3 | * Copyright (C) 2021-2025 Jasmin Rutic (bytespiller@gmail.com) 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "Option.h" 22 | #include 23 | #include 24 | 25 | namespace Settings 26 | { 27 | class SettingsBase 28 | { 29 | public: 30 | explicit SettingsBase(const char* const filename); 31 | 32 | public: 33 | virtual std::vector