├── .clang-format ├── .editorconfig ├── .github ├── actions │ └── setup-ninja │ │ └── action.yml ├── fetch_yasm.ps1 └── workflows │ ├── main.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── .wikiheaders-options ├── Android.mk ├── CHANGES.txt ├── CMakeLists.txt ├── LICENSE.txt ├── README-versions.md ├── README.txt ├── VisualC ├── SDL_mixer.sln ├── SDL_mixer.vcxproj ├── SDL_mixer.vcxproj.filters ├── clean.sh ├── external │ ├── include │ │ ├── gme │ │ │ └── gme.h │ │ ├── ogg │ │ │ ├── config_types.h │ │ │ ├── ogg.h │ │ │ └── os_types.h │ │ ├── opus │ │ │ ├── opus.h │ │ │ ├── opus_defines.h │ │ │ ├── opus_multistream.h │ │ │ ├── opus_projection.h │ │ │ ├── opus_types.h │ │ │ └── opusfile.h │ │ ├── opusfile.h │ │ ├── wavpack │ │ │ └── wavpack.h │ │ └── xmp.h │ └── optional │ │ ├── x64 │ │ ├── LICENSE.gme.txt │ │ ├── LICENSE.ogg-vorbis.txt │ │ ├── LICENSE.opus.txt │ │ ├── LICENSE.opusfile.txt │ │ ├── LICENSE.wavpack.txt │ │ ├── LICENSE.xmp.txt │ │ ├── libgme.dll │ │ ├── libogg-0.dll │ │ ├── libopus-0.dll │ │ ├── libopusfile-0.dll │ │ ├── libwavpack-1.dll │ │ └── libxmp.dll │ │ └── x86 │ │ ├── LICENSE.gme.txt │ │ ├── LICENSE.ogg-vorbis.txt │ │ ├── LICENSE.opus.txt │ │ ├── LICENSE.opusfile.txt │ │ ├── LICENSE.wavpack.txt │ │ ├── LICENSE.xmp.txt │ │ ├── libgme.dll │ │ ├── libogg-0.dll │ │ ├── libopus-0.dll │ │ ├── libopusfile-0.dll │ │ ├── libwavpack-1.dll │ │ └── libxmp.dll ├── native_midi │ └── native_midi.vcxproj ├── playmus │ └── playmus.vcxproj ├── playwave │ └── playwave.vcxproj └── timidity │ └── timidity.vcxproj ├── Xcode ├── FLAC │ ├── FLAC.xcodeproj │ │ └── project.pbxproj │ └── config.h ├── Info-Framework.plist ├── SDL_mixer.xcodeproj │ └── project.pbxproj ├── config.xcconfig ├── gme │ └── gme.xcodeproj │ │ └── project.pbxproj ├── iOS │ └── SDL3.framework │ │ ├── Headers │ │ ├── SDL.h │ │ ├── SDL_assert.h │ │ ├── SDL_asyncio.h │ │ ├── SDL_atomic.h │ │ ├── SDL_audio.h │ │ ├── SDL_begin_code.h │ │ ├── SDL_bits.h │ │ ├── SDL_blendmode.h │ │ ├── SDL_camera.h │ │ ├── SDL_clipboard.h │ │ ├── SDL_close_code.h │ │ ├── SDL_copying.h │ │ ├── SDL_cpuinfo.h │ │ ├── SDL_dialog.h │ │ ├── SDL_egl.h │ │ ├── SDL_endian.h │ │ ├── SDL_error.h │ │ ├── SDL_events.h │ │ ├── SDL_filesystem.h │ │ ├── SDL_gamepad.h │ │ ├── SDL_gpu.h │ │ ├── SDL_guid.h │ │ ├── SDL_haptic.h │ │ ├── SDL_hidapi.h │ │ ├── SDL_hints.h │ │ ├── SDL_init.h │ │ ├── SDL_intrin.h │ │ ├── SDL_iostream.h │ │ ├── SDL_joystick.h │ │ ├── SDL_keyboard.h │ │ ├── SDL_keycode.h │ │ ├── SDL_loadso.h │ │ ├── SDL_locale.h │ │ ├── SDL_log.h │ │ ├── SDL_main.h │ │ ├── SDL_main_impl.h │ │ ├── SDL_messagebox.h │ │ ├── SDL_metal.h │ │ ├── SDL_misc.h │ │ ├── SDL_mouse.h │ │ ├── SDL_mutex.h │ │ ├── SDL_oldnames.h │ │ ├── SDL_opengl.h │ │ ├── SDL_opengl_glext.h │ │ ├── SDL_opengles.h │ │ ├── SDL_opengles2.h │ │ ├── SDL_opengles2_gl2.h │ │ ├── SDL_opengles2_gl2ext.h │ │ ├── SDL_opengles2_gl2platform.h │ │ ├── SDL_opengles2_khrplatform.h │ │ ├── SDL_pen.h │ │ ├── SDL_pixels.h │ │ ├── SDL_platform.h │ │ ├── SDL_platform_defines.h │ │ ├── SDL_power.h │ │ ├── SDL_process.h │ │ ├── SDL_properties.h │ │ ├── SDL_rect.h │ │ ├── SDL_render.h │ │ ├── SDL_revision.h │ │ ├── SDL_scancode.h │ │ ├── SDL_sensor.h │ │ ├── SDL_stdinc.h │ │ ├── SDL_storage.h │ │ ├── SDL_surface.h │ │ ├── SDL_system.h │ │ ├── SDL_thread.h │ │ ├── SDL_time.h │ │ ├── SDL_timer.h │ │ ├── SDL_touch.h │ │ ├── SDL_tray.h │ │ ├── SDL_version.h │ │ ├── SDL_video.h │ │ └── SDL_vulkan.h │ │ ├── Info.plist │ │ ├── LICENSE.txt │ │ ├── README.md │ │ └── SDL3.tbd ├── macOS │ └── SDL3.framework │ │ ├── Headers │ │ ├── Resources │ │ ├── SDL3.tbd │ │ └── Versions │ │ ├── A │ │ ├── Headers │ │ │ ├── SDL.h │ │ │ ├── SDL_assert.h │ │ │ ├── SDL_asyncio.h │ │ │ ├── SDL_atomic.h │ │ │ ├── SDL_audio.h │ │ │ ├── SDL_begin_code.h │ │ │ ├── SDL_bits.h │ │ │ ├── SDL_blendmode.h │ │ │ ├── SDL_camera.h │ │ │ ├── SDL_clipboard.h │ │ │ ├── SDL_close_code.h │ │ │ ├── SDL_copying.h │ │ │ ├── SDL_cpuinfo.h │ │ │ ├── SDL_dialog.h │ │ │ ├── SDL_egl.h │ │ │ ├── SDL_endian.h │ │ │ ├── SDL_error.h │ │ │ ├── SDL_events.h │ │ │ ├── SDL_filesystem.h │ │ │ ├── SDL_gamepad.h │ │ │ ├── SDL_gpu.h │ │ │ ├── SDL_guid.h │ │ │ ├── SDL_haptic.h │ │ │ ├── SDL_hidapi.h │ │ │ ├── SDL_hints.h │ │ │ ├── SDL_init.h │ │ │ ├── SDL_intrin.h │ │ │ ├── SDL_iostream.h │ │ │ ├── SDL_joystick.h │ │ │ ├── SDL_keyboard.h │ │ │ ├── SDL_keycode.h │ │ │ ├── SDL_loadso.h │ │ │ ├── SDL_locale.h │ │ │ ├── SDL_log.h │ │ │ ├── SDL_main.h │ │ │ ├── SDL_main_impl.h │ │ │ ├── SDL_messagebox.h │ │ │ ├── SDL_metal.h │ │ │ ├── SDL_misc.h │ │ │ ├── SDL_mouse.h │ │ │ ├── SDL_mutex.h │ │ │ ├── SDL_oldnames.h │ │ │ ├── SDL_opengl.h │ │ │ ├── SDL_opengl_glext.h │ │ │ ├── SDL_opengles.h │ │ │ ├── SDL_opengles2.h │ │ │ ├── SDL_opengles2_gl2.h │ │ │ ├── SDL_opengles2_gl2ext.h │ │ │ ├── SDL_opengles2_gl2platform.h │ │ │ ├── SDL_opengles2_khrplatform.h │ │ │ ├── SDL_pen.h │ │ │ ├── SDL_pixels.h │ │ │ ├── SDL_platform.h │ │ │ ├── SDL_platform_defines.h │ │ │ ├── SDL_power.h │ │ │ ├── SDL_process.h │ │ │ ├── SDL_properties.h │ │ │ ├── SDL_rect.h │ │ │ ├── SDL_render.h │ │ │ ├── SDL_revision.h │ │ │ ├── SDL_scancode.h │ │ │ ├── SDL_sensor.h │ │ │ ├── SDL_stdinc.h │ │ │ ├── SDL_storage.h │ │ │ ├── SDL_surface.h │ │ │ ├── SDL_system.h │ │ │ ├── SDL_thread.h │ │ │ ├── SDL_time.h │ │ │ ├── SDL_timer.h │ │ │ ├── SDL_touch.h │ │ │ ├── SDL_tray.h │ │ │ ├── SDL_version.h │ │ │ ├── SDL_video.h │ │ │ └── SDL_vulkan.h │ │ ├── Resources │ │ │ ├── Info.plist │ │ │ ├── LICENSE.txt │ │ │ └── README.md │ │ └── SDL3.tbd │ │ └── Current ├── mpg123 │ ├── arm64 │ │ └── config.h │ ├── armv7 │ │ └── config.h │ ├── config.xcconfig │ ├── mpg123.h │ ├── mpg123.xcodeproj │ │ └── project.pbxproj │ └── x86_64 │ │ └── config.h ├── ogg │ └── ogg.xcodeproj │ │ └── project.pbxproj ├── opus │ ├── arm64 │ │ └── config.h │ ├── armv7 │ │ └── config.h │ ├── config.xcconfig │ ├── opus.xcodeproj │ │ └── project.pbxproj │ └── x86_64 │ │ └── config.h ├── package ├── pkg-support │ ├── SDL_mixer.info │ ├── build.xcconfig │ ├── mkpackage.sh │ ├── resources │ │ ├── CMake │ │ │ ├── SDL3_mixerConfig.cmake │ │ │ └── SDL3_mixerConfigVersion.cmake │ │ ├── ReadMe.txt │ │ └── Welcome.txt │ └── share │ │ └── cmake │ │ └── SDL3_mixer │ │ ├── SDL3_mixerConfig.cmake │ │ └── SDL3_mixerConfigVersion.cmake ├── playmus │ ├── config.xcconfig │ ├── macOS │ │ └── macOS.entitlements │ └── playmus.xcodeproj │ │ └── project.pbxproj ├── playwave │ ├── config.xcconfig │ ├── macOS │ │ └── macOS.entitlements │ └── playwave.xcodeproj │ │ └── project.pbxproj ├── tremor │ ├── config.h │ └── tremor.xcodeproj │ │ └── project.pbxproj ├── vorbis │ ├── config.h │ └── vorbis.xcodeproj │ │ └── project.pbxproj ├── wavpack │ ├── config.xcconfig │ └── wavpack.xcodeproj │ │ └── project.pbxproj └── xmp │ └── xmp.xcodeproj │ └── project.pbxproj ├── build-scripts ├── android-prefab.sh ├── build-release.py ├── cmake-toolchain-mingw64-i686.cmake ├── cmake-toolchain-mingw64-x86_64.cmake ├── create-release.py ├── pkg-support │ ├── android │ │ ├── README.md.in │ │ └── aar │ │ │ ├── __main__.py.in │ │ │ ├── cmake │ │ │ ├── SDL3_mixerConfig.cmake │ │ │ └── SDL3_mixerConfigVersion.cmake.in │ │ │ └── description.json.in │ ├── mingw │ │ ├── Makefile │ │ └── cmake │ │ │ ├── SDL3_mixerConfig.cmake │ │ │ └── SDL3_mixerConfigVersion.cmake │ └── msvc │ │ └── cmake │ │ ├── SDL3_mixerConfig.cmake.in │ │ └── SDL3_mixerConfigVersion.cmake.in ├── release-info.json ├── test-versioning.sh └── wikiheaders.pl ├── cmake ├── CPackProjectConfig.cmake.in ├── FindFLAC.cmake ├── FindFluidSynth.cmake ├── FindOgg.cmake ├── FindOpus.cmake ├── FindOpusFile.cmake ├── FindSndFile.cmake ├── FindVorbis.cmake ├── Findgme.cmake ├── Findlibxmp-lite.cmake ├── Findlibxmp.cmake ├── Findmpg123.cmake ├── Findtremor.cmake ├── Findwavpack.cmake ├── GetGitRevisionDescription.cmake ├── GetGitRevisionDescription.cmake.in ├── PkgConfigHelper.cmake ├── PrivateSdlFunctions.cmake ├── SDL3_mixerConfig.cmake.in ├── sdl3-mixer.pc.in ├── sdlcpu.cmake ├── sdlmanpages.cmake ├── sdlplatform.cmake └── test │ ├── CMakeLists.txt │ └── main.c ├── examples ├── playmus.c └── playwave.c ├── external ├── Get-GitModules.ps1 └── download.sh ├── include └── SDL3_mixer │ └── SDL_mixer.h ├── mingw └── pkg-support │ └── cmake │ ├── sdl3_mixer-config-version.cmake │ └── sdl3_mixer-config.cmake ├── release_checklist.md └── src ├── SDL_mixer.sym ├── codecs ├── dr_libs │ ├── LICENSE │ ├── README.md │ ├── dr_flac.h │ └── dr_mp3.h ├── load_aiff.c ├── load_aiff.h ├── load_sndfile.c ├── load_sndfile.h ├── load_voc.c ├── load_voc.h ├── mp3utils.c ├── mp3utils.h ├── music_drflac.c ├── music_drflac.h ├── music_drmp3.c ├── music_drmp3.h ├── music_flac.c ├── music_flac.h ├── music_fluidsynth.c ├── music_fluidsynth.h ├── music_gme.c ├── music_gme.h ├── music_mpg123.c ├── music_mpg123.h ├── music_nativemidi.c ├── music_nativemidi.h ├── music_ogg.c ├── music_ogg.h ├── music_ogg_stb.c ├── music_opus.c ├── music_opus.h ├── music_timidity.c ├── music_timidity.h ├── music_wav.c ├── music_wav.h ├── music_wavpack.c ├── music_wavpack.h ├── music_xmp.c ├── music_xmp.h ├── native_midi │ ├── native_midi.h │ ├── native_midi_common.c │ ├── native_midi_common.h │ ├── native_midi_haiku.cpp │ ├── native_midi_linux_alsa.c │ ├── native_midi_macosx.c │ └── native_midi_win32.c ├── stb_vorbis │ ├── README.txt │ └── stb_vorbis.h └── timidity │ ├── Android.mk │ ├── CHANGES │ ├── COPYING │ ├── FAQ │ ├── README │ ├── TODO │ ├── common.c │ ├── common.h │ ├── instrum.c │ ├── instrum.h │ ├── mix.c │ ├── mix.h │ ├── options.h │ ├── output.c │ ├── output.h │ ├── playmidi.c │ ├── playmidi.h │ ├── readmidi.c │ ├── readmidi.h │ ├── resample.c │ ├── resample.h │ ├── tables.c │ ├── tables.h │ ├── timidity.c │ └── timidity.h ├── effect_position.c ├── effect_stereoreverse.c ├── effects_internal.c ├── effects_internal.h ├── mixer.c ├── mixer.h ├── music.c ├── music.h ├── utils.c ├── utils.h └── version.rc /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | AlignConsecutiveMacros: Consecutive 3 | AlignConsecutiveAssignments: None 4 | AlignConsecutiveBitFields: None 5 | AlignConsecutiveDeclarations: None 6 | AlignEscapedNewlines: Right 7 | AlignOperands: Align 8 | AlignTrailingComments: true 9 | 10 | AllowAllArgumentsOnNextLine: true 11 | AllowAllParametersOfDeclarationOnNextLine: true 12 | AllowShortEnumsOnASingleLine: true 13 | AllowShortBlocksOnASingleLine: Never 14 | AllowShortCaseLabelsOnASingleLine: false 15 | AllowShortFunctionsOnASingleLine: All 16 | AllowShortIfStatementsOnASingleLine: Never 17 | AllowShortLoopsOnASingleLine: false 18 | 19 | AlwaysBreakAfterDefinitionReturnType: None 20 | AlwaysBreakAfterReturnType: None 21 | AlwaysBreakBeforeMultilineStrings: false 22 | AlwaysBreakTemplateDeclarations: MultiLine 23 | 24 | # Custom brace breaking 25 | BreakBeforeBraces: Custom 26 | BraceWrapping: 27 | AfterCaseLabel: true 28 | AfterClass: true 29 | AfterControlStatement: Never 30 | AfterEnum: true 31 | AfterFunction: true 32 | AfterNamespace: true 33 | AfterObjCDeclaration: true 34 | AfterStruct: true 35 | AfterUnion: true 36 | AfterExternBlock: false 37 | BeforeElse: false 38 | BeforeWhile: false 39 | IndentBraces: false 40 | SplitEmptyFunction: true 41 | SplitEmptyRecord: true 42 | 43 | # Make the closing brace of container literals go to a new line 44 | Cpp11BracedListStyle: false 45 | 46 | # Never format includes 47 | IncludeBlocks: Preserve 48 | # clang-format version 4.0 through 12.0: 49 | #SortIncludes: false 50 | # clang-format version 13.0+: 51 | #SortIncludes: Never 52 | 53 | # No length limit, in case it breaks macros, you can 54 | # disable it with /* clang-format off/on */ comments 55 | ColumnLimit: 0 56 | 57 | IndentWidth: 4 58 | ContinuationIndentWidth: 4 59 | IndentCaseLabels: false 60 | IndentCaseBlocks: false 61 | IndentGotoLabels: true 62 | IndentPPDirectives: None 63 | IndentExternBlock: NoIndent 64 | 65 | PointerAlignment: Right 66 | SpaceAfterCStyleCast: false 67 | SpacesInCStyleCastParentheses: false 68 | SpacesInConditionalStatement: false 69 | SpacesInContainerLiterals: true 70 | SpaceBeforeAssignmentOperators: true 71 | SpaceBeforeCaseColon: false 72 | SpaceBeforeParens: ControlStatements 73 | SpaceAroundPointerQualifiers: Default 74 | SpaceInEmptyBlock: false 75 | SpaceInEmptyParentheses: false 76 | 77 | UseCRLF: false 78 | UseTab: Never 79 | 80 | --- 81 | 82 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # For format see editorconfig.org 2 | # Copyright 2022 Collabora Ltd. 3 | # SPDX-License-Identifier: Zlib 4 | 5 | root = true 6 | 7 | [README.txt] 8 | end_of_line = crlf 9 | 10 | [*.{c,cc,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}] 11 | indent_size = 4 12 | indent_style = space 13 | insert_final_newline = true 14 | trim_trailing_whitespace = true 15 | 16 | [*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}] 17 | indent_size = 2 18 | indent_style = space 19 | trim_tailing_whitespace = true 20 | 21 | [{CMakeLists.txt,cmake/*.cmake}] 22 | indent_size = 2 23 | indent_style = space 24 | insert_final_newline = true 25 | trim_trailing_whitespace = true 26 | 27 | [{cmake/*.cmake.in}] 28 | indent_size = 4 29 | indent_style = space 30 | insert_final_newline = true 31 | trim_trailing_whitespace = true 32 | 33 | [{Makefile.*,*.mk,*.sln,*.pbxproj,*.plist}] 34 | indent_size = 8 35 | indent_style = tab 36 | tab_width = 8 37 | 38 | [*.{markdown,md}] 39 | indent_size = 4 40 | indent_style = space 41 | # Markdown syntax treats tabs as 4 spaces 42 | tab_width = 4 43 | 44 | [{*.bat,*.rc}] 45 | end_of_line = crlf 46 | -------------------------------------------------------------------------------- /.github/actions/setup-ninja/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup ninja' 2 | description: 'Download ninja and add it to the PATH environment variable' 3 | inputs: 4 | version: 5 | description: 'Ninja version' 6 | default: '1.12.1' 7 | runs: 8 | using: 'composite' 9 | steps: 10 | - name: 'Calculate variables' 11 | id: calc 12 | shell: sh 13 | run: | 14 | case "${{ runner.os }}-${{ runner.arch }}" in 15 | "Linux-X86" | "Linux-X64") 16 | archive="ninja-linux.zip" 17 | ;; 18 | "Linux-ARM64") 19 | archive="ninja-linux-aarch64.zip" 20 | ;; 21 | "macOS-X86" | "macOS-X64" | "macOS-ARM64") 22 | archive="ninja-mac.zip" 23 | ;; 24 | "Windows-X86" | "Windows-X64") 25 | archive="ninja-win.zip" 26 | ;; 27 | "Windows-ARM64") 28 | archive="ninja-winarm64.zip" 29 | ;; 30 | *) 31 | echo "Unsupported ${{ runner.os }}-${{ runner.arch }}" 32 | exit 1; 33 | ;; 34 | esac 35 | echo "archive=${archive}" >> ${GITHUB_OUTPUT} 36 | echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT} 37 | - name: 'Restore cached ${{ steps.calc.outputs.archive }}' 38 | id: cache-restore 39 | uses: actions/cache/restore@v4 40 | with: 41 | path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}' 42 | key: ${{ steps.calc.outputs.cache-key }} 43 | - name: 'Download ninja ${{ inputs.version }} for ${{ runner.os }} (${{ runner.arch }})' 44 | if: ${{ (!steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false') }} 45 | shell: pwsh 46 | run: | 47 | Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}" 48 | - name: 'Cache ${{ steps.calc.outputs.archive }}' 49 | if: ${{ (!steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false') }} 50 | uses: actions/cache/save@v4 51 | with: 52 | path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}' 53 | key: ${{ steps.calc.outputs.cache-key }} 54 | - name: 'Extract ninja' 55 | shell: pwsh 56 | run: | 57 | 7z "-o${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}" 58 | - name: 'Set output variables' 59 | id: final 60 | shell: pwsh 61 | run: | 62 | echo "${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" >> $env:GITHUB_PATH 63 | -------------------------------------------------------------------------------- /.github/fetch_yasm.ps1: -------------------------------------------------------------------------------- 1 | $ErrorActionPreference = "Stop" 2 | 3 | $project_root = "$psScriptRoot\.." 4 | Write-Output "project_root: $project_root" 5 | 6 | $yasm_version = "1.3.0" 7 | $yasm_dlexe = "yasm-$yasm_version-win64.exe" 8 | 9 | $yasm_url = "https://github.com/yasm/yasm/releases/download/v$yasm_version/$yasm_dlexe" 10 | $yasm_exename = "yasm.exe" 11 | $yasm_exepath = "$project_root/yasm.exe" 12 | 13 | $yasm_dlpath = "$project_root\$yasm_dlexe" 14 | 15 | echo "yasm_dlpath: $yasm_dlpath" 16 | echo "yasm_exename: $yasm_exename" 17 | echo "yasm_exepath: $yasm_exepath" 18 | 19 | echo "Cleaning previous artifacts" 20 | if (Test-Path $yasm_dlpath) { 21 | Remove-Item $yasm_dlpath -Force 22 | } 23 | if (Test-Path $yasm_exepath) { 24 | Remove-Item $yasm_exepath -Force 25 | } 26 | 27 | Write-Output "Downloading $yasm_dlexe ($yasm_url)" 28 | Invoke-WebRequest -Uri $yasm_url -OutFile $yasm_dlpath 29 | 30 | Write-Output "Moving $yasm_dlexe to $yasm_exename" 31 | Rename-Item $yasm_dlpath $yasm_exename 32 | 33 | Write-Output "Done" 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build* 2 | !build-scripts/ 3 | aclocal.m4 4 | autom4te* 5 | config.cache 6 | config.log 7 | config.status 8 | Makefile 9 | libtool 10 | .deps 11 | .libs 12 | *.lo 13 | *.o 14 | *.la 15 | *.lai 16 | Debug 17 | Release 18 | *.user 19 | *.ncb 20 | *.suo 21 | *.sdf 22 | .DS_Store 23 | xcuserdata 24 | *.xcworkspace 25 | .vs 26 | .vscode 27 | Xcode/build.xcconfig 28 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/flac"] 2 | path = external/flac 3 | url = https://github.com/libsdl-org/flac.git 4 | branch = 1.3.4-SDL 5 | [submodule "external/ogg"] 6 | path = external/ogg 7 | url = https://github.com/libsdl-org/ogg.git 8 | branch = v1.3.5-SDL 9 | [submodule "external/vorbis"] 10 | path = external/vorbis 11 | url = https://github.com/libsdl-org/vorbis.git 12 | branch = v1.3.7-SDL 13 | [submodule "external/opus"] 14 | path = external/opus 15 | url = https://github.com/libsdl-org/opus.git 16 | branch = v1.4-SDL 17 | [submodule "external/opusfile"] 18 | path = external/opusfile 19 | url = https://github.com/libsdl-org/opusfile.git 20 | branch = v0.12-SDL 21 | [submodule "external/tremor"] 22 | path = external/tremor 23 | url = https://github.com/libsdl-org/tremor.git 24 | branch = v1.2.1-SDL 25 | [submodule "external/mpg123"] 26 | path = external/mpg123 27 | url = https://github.com/libsdl-org/mpg123.git 28 | branch = v1.31.3-SDL 29 | [submodule "external/libxmp"] 30 | path = external/libxmp 31 | url = https://github.com/libsdl-org/libxmp.git 32 | branch = 4.6.3-SDL 33 | [submodule "external/wavpack"] 34 | path = external/wavpack 35 | url = https://github.com/libsdl-org/wavpack.git 36 | branch = 5.7.0-sdl 37 | [submodule "external/libgme"] 38 | path = external/libgme 39 | url = https://github.com/libsdl-org/game-music-emu.git 40 | branch = v0.6.4-SDL 41 | -------------------------------------------------------------------------------- /.wikiheaders-options: -------------------------------------------------------------------------------- 1 | projectfullname = SDL_mixer 2 | projectshortname = SDL_mixer 3 | incsubdir = include/SDL3_mixer 4 | wikisubdir = SDL3_mixer 5 | apiprefixregex = (Mix_|MIX_) 6 | mainincludefname = SDL3_mixer/SDL_mixer.h 7 | versionfname = include/SDL3_mixer/SDL_mixer.h 8 | versionmajorregex = \A\#define\s+SDL_MIXER_MAJOR_VERSION\s+(\d+)\Z 9 | versionminorregex = \A\#define\s+SDL_MIXER_MINOR_VERSION\s+(\d+)\Z 10 | versionmicroregex = \A\#define\s+SDL_MIXER_MICRO_VERSION\s+(\d+)\Z 11 | selectheaderregex = \ASDL_mixer\.h\Z 12 | projecturl = https://libsdl.org/projects/SDL_mixer 13 | wikiurl = https://wiki.libsdl.org/SDL_mixer 14 | bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new 15 | warn_about_missing = 0 16 | wikipreamble = (This function is part of SDL_mixer, a separate library from SDL.) 17 | wikiheaderfiletext = Defined in [](https://github.com/libsdl-org/SDL_mixer/blob/main/include/SDL3_mixer/%fname%) 18 | manpageheaderfiletext = Defined in SDL3_mixer/%fname% 19 | quickrefenabled = 1 20 | quickreftitle = SDL3_mixer API Quick Reference 21 | quickrefurl = https://libsdl.org/ 22 | quickrefdesc = The latest version of this document can be found at https://wiki.libsdl.org/SDL3_mixer/QuickReference 23 | -------------------------------------------------------------------------------- /CHANGES.txt: -------------------------------------------------------------------------------- 1 | 3.0.0: 2 | * Removed support for libmodplug as a MOD music backend. 3 | * Go back to using dr_mp3 as the default backend for MP3 music 4 | * Updated for SDL 3.0 5 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 1997-2025 Sam Lantinga 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /README-versions.md: -------------------------------------------------------------------------------- 1 | # Versioning 2 | 3 | ## Since 2.5.0 4 | 5 | `SDL_mixer` follows an "odd/even" versioning policy, similar to GLib, GTK, Flatpak 6 | and older versions of the Linux kernel: 7 | 8 | * The major version (first part) increases when backwards compatibility 9 | is broken, which will happen infrequently. 10 | 11 | * If the minor version (second part) is divisible by 2 12 | (for example 2.6.x, 2.8.x), this indicates a version that 13 | is believed to be stable and suitable for production use. 14 | 15 | * In stable releases, the patchlevel or micro version (third part) 16 | indicates bugfix releases. Bugfix releases should not add or 17 | remove ABI, so the ".0" release (for example 2.6.0) should be 18 | forwards-compatible with all the bugfix releases from the 19 | same cycle (for example 2.6.1). 20 | 21 | * The minor version increases when new API or ABI is added, or when 22 | other significant changes are made. Newer minor versions are 23 | backwards-compatible, but not fully forwards-compatible. 24 | For example, programs built against `SDL_mixer` 2.6.x should work fine 25 | with 2.8.x, but programs built against 2.8.x will not necessarily 26 | work with 2.6.x. 27 | 28 | * If the minor version (second part) is not divisible by 2 29 | (for example 2.5.x, 2.7.x), this indicates a development prerelease 30 | that is not suitable for stable software distributions. 31 | Use with caution. 32 | 33 | * The patchlevel or micro version (third part) increases with 34 | each prerelease. 35 | 36 | * Each prerelease might add new API and/or ABI. 37 | 38 | * Prereleases are backwards-compatible with older stable branches. 39 | For example, 2.7.x will be backwards-compatible with 2.6.x. 40 | 41 | * Prereleases are not guaranteed to be backwards-compatible with 42 | each other. For example, new API or ABI added in 2.5.1 43 | might be removed or changed in 2.5.2. 44 | If this would be a problem for you, please do not use prereleases. 45 | 46 | * Only upgrade to a prerelease if you can guarantee that you will 47 | promptly upgrade to the stable release that follows it. 48 | For example, do not upgrade to 2.5.x unless you will be able to 49 | upgrade to 2.6.0 when it becomes available. 50 | 51 | * Software distributions that have a freeze policy (in particular Linux 52 | distributions with a release cycle, such as Debian and Fedora) 53 | should usually only package stable releases, and not prereleases. 54 | 55 | ## Before 2.5.0 56 | 57 | Older versions of `SDL_mixer` used the patchlevel (micro version, 58 | third part) for feature releases, and did not distinguish between feature 59 | and bugfix releases. 60 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | 2 | SDL_mixer 3.0 3 | 4 | The latest version of this library is available from GitHub: 5 | https://github.com/libsdl-org/SDL_mixer/releases 6 | 7 | Due to popular demand, here is a simple multi-channel audio mixer. 8 | It supports 8 channels of 16 bit stereo audio, plus a single channel of music. It can load FLAC, MP3, Ogg, VOC, and WAV format audio. It can also load MIDI, MOD, and Opus audio, depending on build options (see the note below for details.) 9 | 10 | See the header file SDL_mixer.h and the examples playwave.c and playmus.c for documentation on this mixer library. This documentation is also available online at https://wiki.libsdl.org/SDL3_mixer 11 | 12 | The process of mixing MIDI files to wave output is very CPU intensive, so if playing regular WAVE files sound great, but playing MIDI files sound choppy, try using 8-bit audio, mono audio, or lower frequencies. 13 | 14 | If you have built with FluidSynth support, you'll need to set the SDL_SOUNDFONTS environment variable to a Sound Font 2 (.sf2) file containing the musical instruments you want to use for MIDI playback. 15 | (On some Linux distributions you can install the fluid-soundfont-gm package) 16 | 17 | To play MIDI files using Timidity, you'll need to get a complete set of GUS patches from: 18 | http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz 19 | and unpack them in /usr/local/lib under UNIX, and C:\ under Win32. 20 | 21 | This library is under the zlib license, see the file "LICENSE.txt" for details. 22 | 23 | Note: 24 | Support for software MIDI, MOD, and Opus are not included by default because of the size of the decode libraries, but you can get them by running external/download.sh 25 | - When building with CMake, you can enable the appropriate SDLMIXER_* options defined in CMakeLists.txt. SDLMIXER_VENDORED allows switching between system and vendored libraries. 26 | - When building with Visual Studio, you will need to build the libraries and then add the appropriate LOAD_* preprocessor define to the Visual Studio project. 27 | - When building with Xcode, you can edit the config at the top of the project to enable them, and you will need to include the appropriate framework in your application. 28 | - For Android, you can edit the config at the top of Android.mk to enable them. 29 | -------------------------------------------------------------------------------- /VisualC/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete 3 | rm -rvf Win32 */Win32 x64 */x64 4 | -------------------------------------------------------------------------------- /VisualC/external/include/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure or cmake*/ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef int16_t ogg_int16_t; 20 | typedef uint16_t ogg_uint16_t; 21 | typedef int32_t ogg_int32_t; 22 | typedef uint32_t ogg_uint32_t; 23 | typedef int64_t ogg_int64_t; 24 | typedef uint64_t ogg_uint64_t; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /VisualC/external/include/opusfile.h: -------------------------------------------------------------------------------- 1 | /* wrapper to avoid an additional -Iinclude/opus directive. 2 | * headers under opus/ are edited accordingly for this */ 3 | #include 4 | -------------------------------------------------------------------------------- /VisualC/external/optional/x64/LICENSE.ogg-vorbis.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | https://hg.libsdl.org/SDL_mixer/file/default/external 3 | --- 4 | 5 | Copyright (c) 2002-2018 Xiph.org Foundation 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /VisualC/external/optional/x64/LICENSE.opus.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | https://hg.libsdl.org/SDL_mixer/file/default/external 3 | --- 4 | 5 | Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, 6 | Jean-Marc Valin, Timothy B. Terriberry, 7 | CSIRO, Gregory Maxwell, Mark Borgerding, 8 | Erik de Castro Lopo 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions 12 | are met: 13 | 14 | - Redistributions of source code must retain the above copyright 15 | notice, this list of conditions and the following disclaimer. 16 | 17 | - Redistributions in binary form must reproduce the above copyright 18 | notice, this list of conditions and the following disclaimer in the 19 | documentation and/or other materials provided with the distribution. 20 | 21 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 22 | names of specific contributors, may be used to endorse or promote 23 | products derived from this software without specific prior written 24 | permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 30 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 31 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 32 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 34 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | 38 | Opus is subject to the royalty-free patent licenses which are 39 | specified at: 40 | 41 | Xiph.Org Foundation: 42 | https://datatracker.ietf.org/ipr/1524/ 43 | 44 | Microsoft Corporation: 45 | https://datatracker.ietf.org/ipr/1914/ 46 | 47 | Broadcom Corporation: 48 | https://datatracker.ietf.org/ipr/1526/ 49 | -------------------------------------------------------------------------------- /VisualC/external/optional/x64/LICENSE.opusfile.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | https://hg.libsdl.org/SDL_mixer/file/default/external 3 | --- 4 | 5 | Copyright (c) 1994-2013 Xiph.Org Foundation and contributors 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.Org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /VisualC/external/optional/x64/LICENSE.wavpack.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 1998 - 2022 David Bryant 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of Conifer Software nor the names of its contributors 13 | may be used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /VisualC/external/optional/x64/LICENSE.xmp.txt: -------------------------------------------------------------------------------- 1 | Extended Module Player 2 | Copyright (C) 1996-2024 Claudio Matsuoka and Hipolito Carraro Jr 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a 5 | copy of this software and associated documentation files (the "Software"), 6 | to deal in the Software without restriction, including without limitation 7 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /VisualC/external/optional/x64/libgme.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x64/libgme.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x64/libogg-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x64/libogg-0.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x64/libopus-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x64/libopus-0.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x64/libopusfile-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x64/libopusfile-0.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x64/libwavpack-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x64/libwavpack-1.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x64/libxmp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x64/libxmp.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x86/LICENSE.ogg-vorbis.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | https://hg.libsdl.org/SDL_mixer/file/default/external 3 | --- 4 | 5 | Copyright (c) 2002-2018 Xiph.org Foundation 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /VisualC/external/optional/x86/LICENSE.opus.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | https://hg.libsdl.org/SDL_mixer/file/default/external 3 | --- 4 | 5 | Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, 6 | Jean-Marc Valin, Timothy B. Terriberry, 7 | CSIRO, Gregory Maxwell, Mark Borgerding, 8 | Erik de Castro Lopo 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions 12 | are met: 13 | 14 | - Redistributions of source code must retain the above copyright 15 | notice, this list of conditions and the following disclaimer. 16 | 17 | - Redistributions in binary form must reproduce the above copyright 18 | notice, this list of conditions and the following disclaimer in the 19 | documentation and/or other materials provided with the distribution. 20 | 21 | - Neither the name of Internet Society, IETF or IETF Trust, nor the 22 | names of specific contributors, may be used to endorse or promote 23 | products derived from this software without specific prior written 24 | permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 30 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 31 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 32 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 34 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | 38 | Opus is subject to the royalty-free patent licenses which are 39 | specified at: 40 | 41 | Xiph.Org Foundation: 42 | https://datatracker.ietf.org/ipr/1524/ 43 | 44 | Microsoft Corporation: 45 | https://datatracker.ietf.org/ipr/1914/ 46 | 47 | Broadcom Corporation: 48 | https://datatracker.ietf.org/ipr/1526/ 49 | -------------------------------------------------------------------------------- /VisualC/external/optional/x86/LICENSE.opusfile.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | https://hg.libsdl.org/SDL_mixer/file/default/external 3 | --- 4 | 5 | Copyright (c) 1994-2013 Xiph.Org Foundation and contributors 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.Org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /VisualC/external/optional/x86/LICENSE.wavpack.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 1998 - 2022 David Bryant 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of Conifer Software nor the names of its contributors 13 | may be used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /VisualC/external/optional/x86/LICENSE.xmp.txt: -------------------------------------------------------------------------------- 1 | Extended Module Player 2 | Copyright (C) 1996-2024 Claudio Matsuoka and Hipolito Carraro Jr 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a 5 | copy of this software and associated documentation files (the "Software"), 6 | to deal in the Software without restriction, including without limitation 7 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /VisualC/external/optional/x86/libgme.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x86/libgme.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x86/libogg-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x86/libogg-0.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x86/libopus-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x86/libopus-0.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x86/libopusfile-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x86/libopusfile-0.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x86/libwavpack-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x86/libwavpack-1.dll -------------------------------------------------------------------------------- /VisualC/external/optional/x86/libxmp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libsdl-org/SDL_mixer/daf0503cea6d9a521f585d37e785d88c2f066cd0/VisualC/external/optional/x86/libxmp.dll -------------------------------------------------------------------------------- /Xcode/Info-Framework.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | SDL3_mixer 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | SDL3_mixer 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0.0 19 | CFBundleVersion 20 | 3.0.0 21 | 22 | 23 | -------------------------------------------------------------------------------- /Xcode/config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // config.xcconfig 3 | // 4 | 5 | // Configuration settings file format documentation can be found at: 6 | // https://help.apple.com/xcode/#/dev745c5c974 7 | 8 | // Include any optional config for this build 9 | #include? "build.xcconfig" 10 | 11 | // Uncomment these lines to enable Game_Music_Emu support 12 | // If you do this, you should run external/download.sh to download the decode libraries and add gme.framework to your application bundle. 13 | //GME_PREPROCESSOR_DEFINITIONS = MUSIC_GME 14 | //GME_FRAMEWORK_LDFLAGS = -weak_framework gme 15 | 16 | // Uncomment these lines to enable native MIDI support on OSX 17 | //MIDI_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = MUSIC_MID_NATIVE 18 | 19 | // Uncomment these lines to enable MOD support 20 | // If you do this, you should run external/download.sh to download the decode libraries and add xmp.framework to your application bundle. 21 | //MOD_PREPROCESSOR_DEFINITIONS = MUSIC_MOD_XMP LIBXMP_HEADER=\"../external/libxmp/include/xmp.h\" 22 | //MOD_FRAMEWORK_LDFLAGS = -weak_framework xmp 23 | 24 | // Uncomment these lines to enable Opus support 25 | // If you do this, you should run external/download.sh to download the decode libraries and add opus.framework to your application bundle. 26 | //OPUS_PREPROCESSOR_DEFINITIONS = MUSIC_OPUS 27 | //OPUS_FRAMEWORK_LDFLAGS = -weak_framework opus 28 | 29 | // Uncomment these lines to enable WavPack support 30 | // If you do this, you should run external/download.sh to download the decode libraries and add wavpack.framework to your application bundle. 31 | //WAVPACK_PREPROCESSOR_DEFINITIONS = MUSIC_WAVPACK MUSIC_WAVPACK_DSD 32 | //WAVPACK_FRAMEWORK_LDFLAGS = -weak_framework wavpack 33 | 34 | CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) $(GME_PREPROCESSOR_DEFINITIONS) $(MIDI_PREPROCESSOR_DEFINITIONS) $(MOD_PREPROCESSOR_DEFINITIONS) $(OPUS_PREPROCESSOR_DEFINITIONS) $(WAVPACK_PREPROCESSOR_DEFINITIONS) 35 | CONFIG_FRAMEWORK_LDFLAGS = $(inherited) $(GME_FRAMEWORK_LDFLAGS) $(MIDI_FRAMEWORK_LDFLAGS) $(MOD_FRAMEWORK_LDFLAGS) $(OPUS_FRAMEWORK_LDFLAGS) $(WAVPACK_FRAMEWORK_LDFLAGS) 36 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * Main include header for the SDL library, version 3.2.6 24 | * 25 | * It is almost always best to include just this one header instead of 26 | * picking out individual headers included here. There are exceptions to 27 | * this rule--SDL_main.h is special and not included here--but usually 28 | * letting SDL.h include the kitchen sink for you is the correct approach. 29 | */ 30 | 31 | #ifndef SDL_h_ 32 | #define SDL_h_ 33 | 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | #include 73 | #include 74 | #include 75 | #include 76 | #include 77 | #include 78 | #include 79 | #include 80 | #include 81 | #include 82 | #include 83 | #include 84 | #include 85 | #include 86 | #include 87 | #include 88 | #include 89 | 90 | #endif /* SDL_h_ */ 91 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This file reverses the effects of SDL_begin_code.h and should be included 24 | * after you finish any function and structure declarations in your headers. 25 | * 26 | * SDL's headers use this; applications generally should not include this 27 | * header directly. 28 | */ 29 | 30 | #ifndef SDL_begin_code_h 31 | #error SDL_close_code.h included without matching SDL_begin_code.h 32 | #endif 33 | #undef SDL_begin_code_h 34 | 35 | /* Reset structure packing at previous byte alignment */ 36 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 37 | #ifdef __BORLANDC__ 38 | #pragma nopackwarning 39 | #endif 40 | #pragma pack(pop) 41 | #endif /* Compiler needs structure packing set */ 42 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* Header file containing SDL's license. */ 23 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * # CategoryMisc 24 | * 25 | * SDL API functions that don't fit elsewhere. 26 | */ 27 | 28 | #ifndef SDL_misc_h_ 29 | #define SDL_misc_h_ 30 | 31 | #include 32 | #include 33 | 34 | #include 35 | 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /** 42 | * Open a URL/URI in the browser or other appropriate external application. 43 | * 44 | * Open a URL in a separate, system-provided application. How this works will 45 | * vary wildly depending on the platform. This will likely launch what makes 46 | * sense to handle a specific URL's protocol (a web browser for `http://`, 47 | * etc), but it might also be able to launch file managers for directories and 48 | * other things. 49 | * 50 | * What happens when you open a URL varies wildly as well: your game window 51 | * may lose focus (and may or may not lose focus if your game was fullscreen 52 | * or grabbing input at the time). On mobile devices, your app will likely 53 | * move to the background or your process might be paused. Any given platform 54 | * may or may not handle a given URL. 55 | * 56 | * If this is unimplemented (or simply unavailable) for a platform, this will 57 | * fail with an error. A successful result does not mean the URL loaded, just 58 | * that we launched _something_ to handle it (or at least believe we did). 59 | * 60 | * All this to say: this function can be useful, but you should definitely 61 | * test it on every platform you target. 62 | * 63 | * \param url a valid URL/URI to open. Use `file:///full/path/to/file` for 64 | * local files, if supported. 65 | * \returns true on success or false on failure; call SDL_GetError() for more 66 | * information. 67 | * 68 | * \since This function is available since SDL 3.2.0. 69 | */ 70 | extern SDL_DECLSPEC bool SDLCALL SDL_OpenURL(const char *url); 71 | 72 | /* Ends C function definitions when using C++ */ 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | #include 77 | 78 | #endif /* SDL_misc_h_ */ 79 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 24 | */ 25 | 26 | #include 27 | 28 | #ifdef SDL_PLATFORM_IOS 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 24 | */ 25 | 26 | #include 27 | 28 | #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS) 29 | 30 | #ifdef SDL_PLATFORM_IOS 31 | #include 32 | #include 33 | #else 34 | #include 35 | #include 36 | #include 37 | #endif 38 | 39 | #else /* _MSC_VER */ 40 | 41 | /* OpenGL ES2 headers for Visual Studio */ 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | #endif /* _MSC_VER */ 48 | 49 | #ifndef APIENTRY 50 | #define APIENTRY GL_APIENTRY 51 | #endif 52 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * # CategoryPlatform 24 | * 25 | * SDL provides a means to identify the app's platform, both at compile time 26 | * and runtime. 27 | */ 28 | 29 | #ifndef SDL_platform_h_ 30 | #define SDL_platform_h_ 31 | 32 | #include 33 | 34 | #include 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * Get the name of the platform. 42 | * 43 | * Here are the names returned for some (but not all) supported platforms: 44 | * 45 | * - "Windows" 46 | * - "macOS" 47 | * - "Linux" 48 | * - "iOS" 49 | * - "Android" 50 | * 51 | * \returns the name of the platform. If the correct platform name is not 52 | * available, returns a string beginning with the text "Unknown". 53 | * 54 | * \since This function is available since SDL 3.2.0. 55 | */ 56 | extern SDL_DECLSPEC const char * SDLCALL SDL_GetPlatform(void); 57 | 58 | /* Ends C function definitions when using C++ */ 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | #include 63 | 64 | #endif /* SDL_platform_h_ */ 65 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Headers/SDL_revision.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* WIKI CATEGORY: Version */ 23 | 24 | /* 25 | * SDL_revision.h contains the SDL revision, which might be defined on the 26 | * compiler command line, or generated right into the header itself by the 27 | * build system. 28 | */ 29 | 30 | #ifndef SDL_revision_h_ 31 | #define SDL_revision_h_ 32 | 33 | #ifdef SDL_WIKI_DOCUMENTATION_SECTION 34 | 35 | /** 36 | * This macro is a string describing the source at a particular point in 37 | * development. 38 | * 39 | * This string is often generated from revision control's state at build time. 40 | * 41 | * This string can be quite complex and does not follow any standard. For 42 | * example, it might be something like "SDL-prerelease-3.1.1-47-gf687e0732". 43 | * It might also be user-defined at build time, so it's best to treat it as a 44 | * clue in debugging forensics and not something the app will parse in any 45 | * way. 46 | * 47 | * \since This macro is available since SDL 3.2.0. 48 | */ 49 | #define SDL_REVISION "Some arbitrary string decided at SDL build time" 50 | #elif defined(SDL_VENDOR_INFO) 51 | #define SDL_REVISION SDL_VENDOR_INFO 52 | #else 53 | #define SDL_REVISION "" 54 | #endif 55 | 56 | #endif /* SDL_revision_h_ */ 57 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | SDL3 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | org.libsdl.SDL3 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 23 | CFBundleShortVersionString 24 | 25 | CSResourcesFileMapped 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 1997-2025 Sam Lantinga 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | -------------------------------------------------------------------------------- /Xcode/iOS/SDL3.framework/README.md: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer (SDL for short) is a cross-platform library 3 | designed to make it easy to write multi-media software, such as games 4 | and emulators. 5 | 6 | You can find the latest release and additional information at: 7 | https://www.libsdl.org/ 8 | 9 | Installation instructions and a quick introduction is available in 10 | [INSTALL.md](INSTALL.md) 11 | 12 | This library is distributed under the terms of the zlib license, 13 | available in [LICENSE.txt](LICENSE.txt). 14 | 15 | Enjoy! 16 | 17 | Sam Lantinga (slouken@libsdl.org) 18 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/SDL3.tbd: -------------------------------------------------------------------------------- 1 | Versions/Current/SDL3.tbd -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * Main include header for the SDL library, version 3.2.6 24 | * 25 | * It is almost always best to include just this one header instead of 26 | * picking out individual headers included here. There are exceptions to 27 | * this rule--SDL_main.h is special and not included here--but usually 28 | * letting SDL.h include the kitchen sink for you is the correct approach. 29 | */ 30 | 31 | #ifndef SDL_h_ 32 | #define SDL_h_ 33 | 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | #include 71 | #include 72 | #include 73 | #include 74 | #include 75 | #include 76 | #include 77 | #include 78 | #include 79 | #include 80 | #include 81 | #include 82 | #include 83 | #include 84 | #include 85 | #include 86 | #include 87 | #include 88 | #include 89 | 90 | #endif /* SDL_h_ */ 91 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This file reverses the effects of SDL_begin_code.h and should be included 24 | * after you finish any function and structure declarations in your headers. 25 | * 26 | * SDL's headers use this; applications generally should not include this 27 | * header directly. 28 | */ 29 | 30 | #ifndef SDL_begin_code_h 31 | #error SDL_close_code.h included without matching SDL_begin_code.h 32 | #endif 33 | #undef SDL_begin_code_h 34 | 35 | /* Reset structure packing at previous byte alignment */ 36 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 37 | #ifdef __BORLANDC__ 38 | #pragma nopackwarning 39 | #endif 40 | #pragma pack(pop) 41 | #endif /* Compiler needs structure packing set */ 42 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_copying.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* Header file containing SDL's license. */ 23 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * # CategoryMisc 24 | * 25 | * SDL API functions that don't fit elsewhere. 26 | */ 27 | 28 | #ifndef SDL_misc_h_ 29 | #define SDL_misc_h_ 30 | 31 | #include 32 | #include 33 | 34 | #include 35 | 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /** 42 | * Open a URL/URI in the browser or other appropriate external application. 43 | * 44 | * Open a URL in a separate, system-provided application. How this works will 45 | * vary wildly depending on the platform. This will likely launch what makes 46 | * sense to handle a specific URL's protocol (a web browser for `http://`, 47 | * etc), but it might also be able to launch file managers for directories and 48 | * other things. 49 | * 50 | * What happens when you open a URL varies wildly as well: your game window 51 | * may lose focus (and may or may not lose focus if your game was fullscreen 52 | * or grabbing input at the time). On mobile devices, your app will likely 53 | * move to the background or your process might be paused. Any given platform 54 | * may or may not handle a given URL. 55 | * 56 | * If this is unimplemented (or simply unavailable) for a platform, this will 57 | * fail with an error. A successful result does not mean the URL loaded, just 58 | * that we launched _something_ to handle it (or at least believe we did). 59 | * 60 | * All this to say: this function can be useful, but you should definitely 61 | * test it on every platform you target. 62 | * 63 | * \param url a valid URL/URI to open. Use `file:///full/path/to/file` for 64 | * local files, if supported. 65 | * \returns true on success or false on failure; call SDL_GetError() for more 66 | * information. 67 | * 68 | * \since This function is available since SDL 3.2.0. 69 | */ 70 | extern SDL_DECLSPEC bool SDLCALL SDL_OpenURL(const char *url); 71 | 72 | /* Ends C function definitions when using C++ */ 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | #include 77 | 78 | #endif /* SDL_misc_h_ */ 79 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 24 | */ 25 | 26 | #include 27 | 28 | #ifdef SDL_PLATFORM_IOS 29 | #include 30 | #include 31 | #else 32 | #include 33 | #include 34 | #endif 35 | 36 | #ifndef APIENTRY 37 | #define APIENTRY 38 | #endif 39 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* 23 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 24 | */ 25 | 26 | #include 27 | 28 | #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS) 29 | 30 | #ifdef SDL_PLATFORM_IOS 31 | #include 32 | #include 33 | #else 34 | #include 35 | #include 36 | #include 37 | #endif 38 | 39 | #else /* _MSC_VER */ 40 | 41 | /* OpenGL ES2 headers for Visual Studio */ 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | #endif /* _MSC_VER */ 48 | 49 | #ifndef APIENTRY 50 | #define APIENTRY GL_APIENTRY 51 | #endif 52 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * # CategoryPlatform 24 | * 25 | * SDL provides a means to identify the app's platform, both at compile time 26 | * and runtime. 27 | */ 28 | 29 | #ifndef SDL_platform_h_ 30 | #define SDL_platform_h_ 31 | 32 | #include 33 | 34 | #include 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * Get the name of the platform. 42 | * 43 | * Here are the names returned for some (but not all) supported platforms: 44 | * 45 | * - "Windows" 46 | * - "macOS" 47 | * - "Linux" 48 | * - "iOS" 49 | * - "Android" 50 | * 51 | * \returns the name of the platform. If the correct platform name is not 52 | * available, returns a string beginning with the text "Unknown". 53 | * 54 | * \since This function is available since SDL 3.2.0. 55 | */ 56 | extern SDL_DECLSPEC const char * SDLCALL SDL_GetPlatform(void); 57 | 58 | /* Ends C function definitions when using C++ */ 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | #include 63 | 64 | #endif /* SDL_platform_h_ */ 65 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Headers/SDL_revision.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* WIKI CATEGORY: Version */ 23 | 24 | /* 25 | * SDL_revision.h contains the SDL revision, which might be defined on the 26 | * compiler command line, or generated right into the header itself by the 27 | * build system. 28 | */ 29 | 30 | #ifndef SDL_revision_h_ 31 | #define SDL_revision_h_ 32 | 33 | #ifdef SDL_WIKI_DOCUMENTATION_SECTION 34 | 35 | /** 36 | * This macro is a string describing the source at a particular point in 37 | * development. 38 | * 39 | * This string is often generated from revision control's state at build time. 40 | * 41 | * This string can be quite complex and does not follow any standard. For 42 | * example, it might be something like "SDL-prerelease-3.1.1-47-gf687e0732". 43 | * It might also be user-defined at build time, so it's best to treat it as a 44 | * clue in debugging forensics and not something the app will parse in any 45 | * way. 46 | * 47 | * \since This macro is available since SDL 3.2.0. 48 | */ 49 | #define SDL_REVISION "Some arbitrary string decided at SDL build time" 50 | #elif defined(SDL_VENDOR_INFO) 51 | #define SDL_REVISION SDL_VENDOR_INFO 52 | #else 53 | #define SDL_REVISION "" 54 | #endif 55 | 56 | #endif /* SDL_revision_h_ */ 57 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | SDL3 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | org.libsdl.SDL3 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 23 | CFBundleShortVersionString 24 | 25 | CSResourcesFileMapped 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Resources/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 1997-2025 Sam Lantinga 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/A/Resources/README.md: -------------------------------------------------------------------------------- 1 | 2 | Simple DirectMedia Layer (SDL for short) is a cross-platform library 3 | designed to make it easy to write multi-media software, such as games 4 | and emulators. 5 | 6 | You can find the latest release and additional information at: 7 | https://www.libsdl.org/ 8 | 9 | Installation instructions and a quick introduction is available in 10 | [INSTALL.md](INSTALL.md) 11 | 12 | This library is distributed under the terms of the zlib license, 13 | available in [LICENSE.txt](LICENSE.txt). 14 | 15 | Enjoy! 16 | 17 | Sam Lantinga (slouken@libsdl.org) 18 | -------------------------------------------------------------------------------- /Xcode/macOS/SDL3.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /Xcode/opus/config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // sources.xcconfig 3 | // opus 4 | // 5 | 6 | // Configuration settings file format documentation can be found at: 7 | // https://help.apple.com/xcode/#/dev745c5c974 8 | 9 | ARM_SOURCES = */arm/* 10 | 11 | EXCLUDED_SOURCE_FILE_NAMES = $(ARM_SOURCES) 12 | INCLUDED_SOURCE_FILE_NAMES = 13 | INCLUDED_SOURCE_FILE_NAMES[arch=armv7] = $(ARM_SOURCES) 14 | INCLUDED_SOURCE_FILE_NAMES[arch=arm64] = $(ARM_SOURCES) 15 | -------------------------------------------------------------------------------- /Xcode/pkg-support/SDL_mixer.info: -------------------------------------------------------------------------------- 1 | Title SDL_mixer 1.2.10 2 | Version 1 3 | Description SDL_mixer Library for Mac OS X (http://www.libsdl.org/projects/SDL_mixer) 4 | DefaultLocation /Library/Frameworks 5 | Diskname (null) 6 | DeleteWarning 7 | NeedsAuthorization NO 8 | DisableStop NO 9 | UseUserMask NO 10 | Application NO 11 | Relocatable YES 12 | Required NO 13 | InstallOnly NO 14 | RequiresReboot NO 15 | InstallFat NO 16 | -------------------------------------------------------------------------------- /Xcode/pkg-support/build.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // build.xcconfig 3 | // 4 | 5 | // Configuration settings file format documentation can be found at: 6 | // https://help.apple.com/xcode/#/dev745c5c974 7 | 8 | // Uncomment these lines to enable Game_Music_Emu support 9 | // If you do this, you should run external/download.sh to download the decode libraries and add gme.framework to your application bundle. 10 | GME_PREPROCESSOR_DEFINITIONS = MUSIC_GME 11 | GME_FRAMEWORK_LDFLAGS = -weak_framework gme 12 | 13 | // Uncomment these lines to enable native MIDI support on OSX 14 | MIDI_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = MUSIC_MID_NATIVE 15 | 16 | // Uncomment these lines to enable MOD support 17 | // If you do this, you should run external/download.sh to download the decode libraries and add xmp.framework to your application bundle. 18 | MOD_PREPROCESSOR_DEFINITIONS = MUSIC_MOD_XMP LIBXMP_HEADER=\"../external/libxmp/include/xmp.h\" 19 | MOD_FRAMEWORK_LDFLAGS = -weak_framework xmp 20 | 21 | // Uncomment these lines to enable Opus support 22 | // If you do this, you should run external/download.sh to download the decode libraries and add opus.framework to your application bundle. 23 | OPUS_PREPROCESSOR_DEFINITIONS = MUSIC_OPUS 24 | OPUS_FRAMEWORK_LDFLAGS = -weak_framework opus 25 | 26 | // Uncomment these lines to enable WavPack support 27 | // If you do this, you should run external/download.sh to download the decode libraries and add wavpack.framework to your application bundle. 28 | WAVPACK_PREPROCESSOR_DEFINITIONS = MUSIC_WAVPACK MUSIC_WAVPACK_DSD 29 | WAVPACK_FRAMEWORK_LDFLAGS = -weak_framework wavpack 30 | -------------------------------------------------------------------------------- /Xcode/pkg-support/mkpackage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Generic script to create a package with Project Builder in mind 4 | # There should only be one version of this script for all projects! 5 | 6 | FRAMEWORK="$1" 7 | VARIANT="$2" 8 | 9 | PACKAGE="$FRAMEWORK" 10 | PACKAGE_RESOURCES="pkg-support/resources" 11 | 12 | echo "Building package for $FRAMEWORK.framework" 13 | echo "Will fetch resources from $PACKAGE_RESOURCES" 14 | echo "Will create the package $PACKAGE.pkg" 15 | 16 | # create a copy of the framework 17 | mkdir -p build/pkg-tmp 18 | xcrun CpMac -r "build/$FRAMEWORK.framework" build/pkg-tmp/ 19 | 20 | ./package build/pkg-tmp "pkg-support/$PACKAGE.info" -d build -r "$PACKAGE_RESOURCES" 21 | 22 | # remove temporary files 23 | rm -rf build/pkg-tmp 24 | 25 | # compress 26 | (cd build; tar -zcvf "$PACKAGE.pkg.tar.gz" "$PACKAGE.pkg") 27 | 28 | -------------------------------------------------------------------------------- /Xcode/pkg-support/resources/CMake/SDL3_mixerConfigVersion.cmake: -------------------------------------------------------------------------------- 1 | # based on the files generated by CMake's write_basic_package_version_file 2 | 3 | # SDL3_mixer CMake version configuration file: 4 | # This file is meant to be placed in Resources/CMake of a SDL3_mixer framework 5 | 6 | if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_mixer.h") 7 | message(AUTHOR_WARNING "Could not find SDL_mixer.h. This script is meant to be placed in the Resources/CMake directory of SDL3_mixer.framework") 8 | return() 9 | endif() 10 | 11 | file(READ "${CMAKE_CURRENT_LIST_DIR}/../../Headers/SDL_mixer.h" _sdl_mixer_h) 12 | string(REGEX MATCH "#define[ \t]+SDL_MIXER_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_mixer_h}") 13 | set(_sdl_major "${CMAKE_MATCH_1}") 14 | string(REGEX MATCH "#define[ \t]+SDL_MIXER_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_mixer_h}") 15 | set(_sdl_minor "${CMAKE_MATCH_1}") 16 | string(REGEX MATCH "#define[ \t]+SDL_MIXER_MICRO_VERSION[ \t]+([0-9]+)" _sdl_micro_re "${_sdl_mixer_h}") 17 | set(_sdl_micro "${CMAKE_MATCH_1}") 18 | if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re) 19 | set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}") 20 | else() 21 | message(AUTHOR_WARNING "Could not extract version from SDL_mixer.h.") 22 | return() 23 | endif() 24 | 25 | if(PACKAGE_FIND_VERSION_RANGE) 26 | # Package version must be in the requested version range 27 | if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) 28 | OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) 29 | OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) 30 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 31 | else() 32 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 33 | endif() 34 | else() 35 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 36 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 37 | else() 38 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 39 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 40 | set(PACKAGE_VERSION_EXACT TRUE) 41 | endif() 42 | endif() 43 | endif() 44 | 45 | # if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail. 46 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") 47 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 48 | endif() 49 | -------------------------------------------------------------------------------- /Xcode/pkg-support/resources/ReadMe.txt: -------------------------------------------------------------------------------- 1 | SDL_mixer is an example portable sound library for use with SDL. 2 | 3 | The source code is available from: http://www.libsdl.org/projects/SDL_mixer 4 | 5 | This library is distributed under the terms of the zlib license: http://www.zlib.net/zlib_license.html 6 | 7 | This packages contains the SDL3_mixer.framework for OS X. Conforming with Apple guidelines, this framework contains both the SDL runtime component and development header files. 8 | 9 | Requirements: 10 | You must have the SDL3.framework installed. 11 | 12 | To Install: 13 | Copy the SDL3_mixer.framework to /Library/Frameworks 14 | 15 | You may alternatively install it in /Library/Frameworks if your access privileges are not high enough. (Be aware that the Xcode templates we provide in the SDL Developer Extras package may require some adjustment for your system if you do this.) 16 | 17 | In the optional directory are additional frameworks you can install or include in your application to support more audio formats. 18 | 19 | Use in CMake projects: 20 | SDL3_mixer.framework can be used in CMake projects using the following pattern: 21 | ``` 22 | find_package(SDL3_mixer REQUIRED) 23 | add_executable(my_game ${MY_SOURCES}) 24 | target_link_libraries(my_game PRIVATE SDL3_mixer::SDL3_mixer) 25 | ``` 26 | If SDL3_mixer.framework is installed in a non-standard location, 27 | please refer to the following link for ways to configure CMake: 28 | https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure 29 | -------------------------------------------------------------------------------- /Xcode/pkg-support/resources/Welcome.txt: -------------------------------------------------------------------------------- 1 | This package installs the SDL_mixer library into /Library/Frameworks. You can also install it in 2 | /Library/Frameworks if your access privileges are not high enough. 3 | 4 | -------------------------------------------------------------------------------- /Xcode/playmus/config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // config.xcconfig 3 | // 4 | 5 | // Configuration settings file format documentation can be found at: 6 | // https://help.apple.com/xcode/#/dev745c5c974 7 | 8 | // Include any optional config for this build 9 | #include? "build.xcconfig" 10 | -------------------------------------------------------------------------------- /Xcode/playmus/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Xcode/playwave/config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // config.xcconfig 3 | // 4 | 5 | // Configuration settings file format documentation can be found at: 6 | // https://help.apple.com/xcode/#/dev745c5c974 7 | 8 | // Include any optional config for this build 9 | #include? "build.xcconfig" 10 | -------------------------------------------------------------------------------- /Xcode/playwave/macOS/macOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Xcode/vorbis/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP 5 | systems. This function is required for `alloca.c' support on those systems. 6 | */ 7 | /* #undef CRAY_STACKSEG_END */ 8 | 9 | /* Define to 1 if using `alloca.c'. */ 10 | /* #undef C_ALLOCA */ 11 | 12 | /* Define to 1 if you have `alloca', as a function or macro. */ 13 | #define HAVE_ALLOCA 1 14 | 15 | /* Define to 1 if you have and it should be used (not on Ultrix). 16 | */ 17 | #define HAVE_ALLOCA_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_DLFCN_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_INTTYPES_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_MEMORY_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_STDINT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_STDLIB_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_STRINGS_H 1 36 | 37 | /* Define to 1 if you have the header file. */ 38 | #define HAVE_STRING_H 1 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #define HAVE_SYS_STAT_H 1 42 | 43 | /* Define to 1 if you have the header file. */ 44 | #define HAVE_SYS_TYPES_H 1 45 | 46 | /* Define to 1 if you have the header file. */ 47 | #define HAVE_UNISTD_H 1 48 | 49 | /* Define to the sub-directory where libtool stores uninstalled libraries. */ 50 | #define LT_OBJDIR ".libs/" 51 | 52 | /* Name of package */ 53 | #define PACKAGE "libvorbis" 54 | 55 | /* Define to the address where bug reports for this package should be sent. */ 56 | #define PACKAGE_BUGREPORT "vorbis-dev@xiph.org" 57 | 58 | /* Define to the full name of this package. */ 59 | #define PACKAGE_NAME "libvorbis" 60 | 61 | /* Define to the full name and version of this package. */ 62 | #define PACKAGE_STRING "libvorbis 1.3.6" 63 | 64 | /* Define to the one symbol short name of this package. */ 65 | #define PACKAGE_TARNAME "libvorbis" 66 | 67 | /* Define to the home page for this package. */ 68 | #define PACKAGE_URL "" 69 | 70 | /* Define to the version of this package. */ 71 | #define PACKAGE_VERSION "1.3.6" 72 | 73 | /* If using the C implementation of alloca, define if you know the 74 | direction of stack growth for your system; otherwise it will be 75 | automatically deduced at runtime. 76 | STACK_DIRECTION > 0 => grows toward higher addresses 77 | STACK_DIRECTION < 0 => grows toward lower addresses 78 | STACK_DIRECTION = 0 => direction of growth unknown */ 79 | /* #undef STACK_DIRECTION */ 80 | 81 | /* Define to 1 if you have the ANSI C header files. */ 82 | #define STDC_HEADERS 1 83 | 84 | /* Version number of package */ 85 | #define VERSION "1.3.6" 86 | 87 | /* Define to `__inline__' or `__inline' if that's what the C compiler 88 | calls it, or to nothing if 'inline' is not supported under any name. */ 89 | #ifndef __cplusplus 90 | /* #undef inline */ 91 | #endif 92 | 93 | /* Define to `unsigned int' if does not define. */ 94 | /* #undef size_t */ 95 | -------------------------------------------------------------------------------- /Xcode/wavpack/config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // sources.xcconfig 3 | // wavpack 4 | // 5 | 6 | // Configuration settings file format documentation can be found at: 7 | // https://help.apple.com/xcode/#/dev745c5c974 8 | 9 | ARM_SOURCES = */*_armv7* 10 | X86_SOURCES = */*_x86* 11 | X64_SOURCES = */*_x64* 12 | 13 | EXCLUDED_SOURCE_FILE_NAMES = $(ARM_SOURCES) $(X86_SOURCES) $(X64_SOURCES) 14 | INCLUDED_SOURCE_FILE_NAMES = 15 | INCLUDED_SOURCE_FILE_NAMES[arch=armv7] = $(ARM_SOURCES) 16 | INCLUDED_SOURCE_FILE_NAMES[arch=i386] = $(X86_SOURCES) 17 | INCLUDED_SOURCE_FILE_NAMES[arch=x86_64] = $(X64_SOURCES) 18 | 19 | CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) 20 | CONFIG_PREPROCESSOR_DEFINITIONS[arch=armv7] = $(inherited) OPT_ASM_ARM32 21 | CONFIG_PREPROCESSOR_DEFINITIONS[arch=i386] = $(inherited) OPT_ASM_X86 22 | CONFIG_PREPROCESSOR_DEFINITIONS[arch=x86_64] = $(inherited) OPT_ASM_X64 23 | -------------------------------------------------------------------------------- /build-scripts/cmake-toolchain-mingw64-i686.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Windows) 2 | set(CMAKE_SYSTEM_PROCESSOR x86) 3 | 4 | find_program(CMAKE_C_COMPILER NAMES i686-w64-mingw32-gcc) 5 | find_program(CMAKE_CXX_COMPILER NAMES i686-w64-mingw32-g++) 6 | find_program(CMAKE_RC_COMPILER NAMES i686-w64-mingw32-windres windres) 7 | 8 | if(NOT CMAKE_C_COMPILER) 9 | message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.") 10 | endif() 11 | 12 | if(NOT CMAKE_CXX_COMPILER) 13 | message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.") 14 | endif() 15 | 16 | if(NOT CMAKE_RC_COMPILER) 17 | message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.") 18 | endif() 19 | -------------------------------------------------------------------------------- /build-scripts/cmake-toolchain-mingw64-x86_64.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Windows) 2 | set(CMAKE_SYSTEM_PROCESSOR x86_64) 3 | 4 | find_program(CMAKE_C_COMPILER NAMES x86_64-w64-mingw32-gcc) 5 | find_program(CMAKE_CXX_COMPILER NAMES x86_64-w64-mingw32-g++) 6 | find_program(CMAKE_RC_COMPILER NAMES x86_64-w64-mingw32-windres windres) 7 | 8 | if(NOT CMAKE_C_COMPILER) 9 | message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.") 10 | endif() 11 | 12 | if(NOT CMAKE_CXX_COMPILER) 13 | message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.") 14 | endif() 15 | 16 | if(NOT CMAKE_RC_COMPILER) 17 | message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.") 18 | endif() 19 | -------------------------------------------------------------------------------- /build-scripts/create-release.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import argparse 4 | from pathlib import Path 5 | import json 6 | import logging 7 | import re 8 | import subprocess 9 | 10 | ROOT = Path(__file__).resolve().parents[1] 11 | 12 | 13 | def determine_remote() -> str: 14 | text = (ROOT / "build-scripts/release-info.json").read_text() 15 | release_info = json.loads(text) 16 | if "remote" in release_info: 17 | return release_info["remote"] 18 | project_with_version = release_info["name"] 19 | project, _ = re.subn("([^a-zA-Z_])", "", project_with_version) 20 | return f"libsdl-org/{project}" 21 | 22 | 23 | def main(): 24 | default_remote = determine_remote() 25 | 26 | parser = argparse.ArgumentParser(allow_abbrev=False) 27 | parser.add_argument("--ref", required=True, help=f"Name of branch or tag containing release.yml") 28 | parser.add_argument("--remote", "-R", default=default_remote, help=f"Remote repo (default={default_remote})") 29 | parser.add_argument("--commit", help=f"Input 'commit' of release.yml (default is the hash of the ref)") 30 | args = parser.parse_args() 31 | 32 | if args.commit is None: 33 | args.commit = subprocess.check_output(["git", "rev-parse", args.ref], cwd=ROOT, text=True).strip() 34 | 35 | 36 | print(f"Running release.yml workflow:") 37 | print(f" remote = {args.remote}") 38 | print(f" ref = {args.ref}") 39 | print(f" commit = {args.commit}") 40 | 41 | subprocess.check_call(["gh", "-R", args.remote, "workflow", "run", "release.yml", "--ref", args.ref, "-f", f"commit={args.commit}"], cwd=ROOT) 42 | 43 | 44 | if __name__ == "__main__": 45 | raise SystemExit(main()) 46 | -------------------------------------------------------------------------------- /build-scripts/pkg-support/android/README.md.in: -------------------------------------------------------------------------------- 1 | 2 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library 3 | designed to make it easy to write multi-media software, such as games 4 | and emulators. 5 | 6 | The Simple DirectMedia Layer library source code is available from: 7 | https://www.libsdl.org/ 8 | 9 | This library is distributed under the terms of the zlib license: 10 | http://www.zlib.net/zlib_license.html 11 | 12 | # @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar 13 | 14 | This Android archive allows use of @<@PROJECT_NAME@>@ in your Android project, without needing to copy any SDL source. 15 | 16 | ## Gradle integration 17 | 18 | For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/). 19 | 20 | Copy the aar archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project. 21 | 22 | In `app/build.gradle` of your Android project, add: 23 | ``` 24 | android { 25 | /* ... */ 26 | buildFeatures { 27 | prefab true 28 | } 29 | } 30 | dependencies { 31 | implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar') 32 | /* ... */ 33 | } 34 | ``` 35 | 36 | If you're using CMake, add the following to your CMakeLists.txt: 37 | ``` 38 | find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG) 39 | target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@) 40 | ``` 41 | 42 | If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`: 43 | ``` 44 | LOCAL_SHARED_LIBARARIES := @<@PROJECT_NAME@>@ 45 | ``` 46 | And add the following at the bottom: 47 | ``` 48 | # https://google.github.io/prefab/build-systems.html 49 | 50 | # Add the prefab modules to the import path. 51 | $(call import-add-path,/out) 52 | 53 | # Import @<@PROJECT_NAME@>@ so we can depend on it. 54 | $(call import-module,prefab/@<@PROJECT_NAME@>@) 55 | ``` 56 | 57 | --- 58 | 59 | ## Other build systems (advanced) 60 | 61 | If you want to build a project without Gradle, 62 | running the following command will extract the Android archive into a more common directory structure. 63 | ``` 64 | python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix 65 | ``` 66 | Add `--help` for a list of all available options. 67 | 68 | 69 | Look at the example programs in ./examples (of the source archive), and check out online documentation: 70 | https://wiki.libsdl.org/SDL3/FrontPage 71 | 72 | Join the SDL discourse server if you want to join the community: 73 | https://discourse.libsdl.org/ 74 | 75 | 76 | That's it! 77 | Sam Lantinga 78 | -------------------------------------------------------------------------------- /build-scripts/pkg-support/android/aar/cmake/SDL3_mixerConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | # SDL3_mixer CMake version configuration file: 2 | # This file is meant to be placed in a lib/cmake/SDL3_mixer subfolder of a reconstructed Android SDL3_mixer SDK 3 | 4 | set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@") 5 | 6 | if(PACKAGE_FIND_VERSION_RANGE) 7 | # Package version must be in the requested version range 8 | if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) 9 | OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) 10 | OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) 11 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 12 | else() 13 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 14 | endif() 15 | else() 16 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 17 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 18 | else() 19 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 20 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 21 | set(PACKAGE_VERSION_EXACT TRUE) 22 | endif() 23 | endif() 24 | endif() 25 | 26 | # if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail. 27 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") 28 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 29 | endif() 30 | 31 | include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake") 32 | SDL_DetectTargetCPUArchitectures(_detected_archs) 33 | 34 | # check that the installed version has a compatible architecture as the one which is currently searching: 35 | if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM32 OR SDL_CPU_ARM64)) 36 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM32,ARM64)") 37 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 38 | endif() 39 | -------------------------------------------------------------------------------- /build-scripts/pkg-support/android/aar/description.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@<@PROJECT_NAME@>@", 3 | "version": "@<@PROJECT_VERSION@>@", 4 | "git-hash": "@<@PROJECT_COMMIT@>@" 5 | } 6 | -------------------------------------------------------------------------------- /build-scripts/pkg-support/mingw/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for installing the mingw32 version of the SDL_mixer library 3 | 4 | DESTDIR = /usr/local 5 | ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32 6 | 7 | default: 8 | @echo "Run \"make install-i686\" to install 32-bit" 9 | @echo "Run \"make install-x86_64\" to install 64-bit" 10 | @echo "Run \"make install-all\" to install both" 11 | @echo "Add DESTDIR=/custom/path to change the destination folder" 12 | 13 | install: 14 | @if test -d $(ARCH) && test -d $(DESTDIR); then \ 15 | (cd $(ARCH) && cp -rv bin include lib share $(DESTDIR)/); \ 16 | else \ 17 | echo "*** ERROR: $(ARCH) or $(DESTDIR) does not exist!"; \ 18 | exit 1; \ 19 | fi 20 | 21 | install-i686: 22 | $(MAKE) install ARCH=i686-w64-mingw32 23 | 24 | install-x86_64: 25 | $(MAKE) install ARCH=x86_64-w64-mingw32 26 | 27 | install-all: 28 | @if test -d $(DESTDIR); then \ 29 | mkdir -p $(DESTDIR)/cmake; \ 30 | cp -rv cmake/* $(DESTDIR)/cmake; \ 31 | for arch in $(ARCHITECTURES); do \ 32 | $(MAKE) install ARCH=$$arch DESTDIR=$(DESTDIR)/$$arch; \ 33 | done \ 34 | else \ 35 | echo "*** ERROR: $(DESTDIR) does not exist!"; \ 36 | exit 1; \ 37 | fi 38 | 39 | .PHONY: default install install-i686 install-x86_64 install-all 40 | -------------------------------------------------------------------------------- /build-scripts/pkg-support/mingw/cmake/SDL3_mixerConfig.cmake: -------------------------------------------------------------------------------- 1 | # SDL3_mixer CMake configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL3_mixer-devel-3.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL3_mixer/SDL3_mixerConfig.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL3_mixer/SDL3_mixerConfig.cmake") 8 | else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") 9 | set(SDL3_mixer_FOUND FALSE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl3_mixer_config_path}") 14 | message(WARNING "${sdl3_mixer_config_path} does not exist: MinGW development package is corrupted") 15 | set(SDL3_mixer_FOUND FALSE) 16 | return() 17 | endif() 18 | 19 | include("${sdl3_mixer_config_path}") 20 | -------------------------------------------------------------------------------- /build-scripts/pkg-support/mingw/cmake/SDL3_mixerConfigVersion.cmake: -------------------------------------------------------------------------------- 1 | # SDL3_mixer CMake version configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL3_mixer-devel-3.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL3_mixer/SDL3_mixerConfigVersion.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL3_mixer/SDL3_mixerConfigVersion.cmake") 8 | else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") 9 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl3_mixer_config_path}") 14 | message(WARNING "${sdl3_mixer_config_path} does not exist: MinGW development package is corrupted") 15 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 16 | return() 17 | endif() 18 | 19 | include("${sdl3_mixer_config_path}") 20 | -------------------------------------------------------------------------------- /build-scripts/pkg-support/msvc/cmake/SDL3_mixerConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | # @<@PROJECT_NAME@>@ CMake version configuration file: 2 | # This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip 3 | 4 | set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@") 5 | 6 | include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake") 7 | SDL_DetectTargetCPUArchitectures(_detected_archs) 8 | 9 | if(PACKAGE_FIND_VERSION_RANGE) 10 | # Package version must be in the requested version range 11 | if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) 12 | OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) 13 | OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) 14 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 15 | else() 16 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 17 | endif() 18 | else() 19 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 20 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 21 | else() 22 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 23 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 24 | set(PACKAGE_VERSION_EXACT TRUE) 25 | endif() 26 | endif() 27 | endif() 28 | 29 | #include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake") 30 | #SDL_DetectTargetCPUArchitectures(_detected_archs) 31 | 32 | # check that the installed version has a compatible architecture as the one which is currently searching: 33 | if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM64 OR SDL_CPU_ARM64EC)) 34 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM64)") 35 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 36 | endif() 37 | -------------------------------------------------------------------------------- /cmake/CPackProjectConfig.cmake.in: -------------------------------------------------------------------------------- 1 | if(CPACK_PACKAGE_FILE_NAME MATCHES ".*-src$") 2 | message(FATAL_ERROR "Creating source archives is not supported.") 3 | endif() 4 | 5 | set(PROJECT_NAME "@PROJECT_NAME@") 6 | set(PROJECT_VERSION "@PROJECT_VERSION@") 7 | set(PROJECT_SOURCE_DIR "@PROJECT_SOURCE_DIR@") 8 | set(SDL_CMAKE_PLATFORM "@SDL_CMAKE_PLATFORM@") 9 | set(SDL_CPU_NAMES "@SDL_CPU_NAMES@") 10 | list(SORT SDL_CPU_NAMES) 11 | 12 | string(TOLOWER "${SDL_CMAKE_PLATFORM}" SDL_CMAKE_PLATFORM) 13 | string(TOLOWER "${SDL_CPU_NAMES}" SDL_CPU_NAMES) 14 | if(lower_sdl_cmake_platform STREQUAL lower_sdl_cpu_names) 15 | set(SDL_CPU_NAMES_WITH_DASHES) 16 | endif() 17 | 18 | string(REPLACE ";" "-" SDL_CPU_NAMES_WITH_DASHES "${SDL_CPU_NAMES}") 19 | if(SDL_CPU_NAMES_WITH_DASHES) 20 | set(SDL_CPU_NAMES_WITH_DASHES "-${SDL_CPU_NAMES_WITH_DASHES}") 21 | endif() 22 | 23 | set(MSVC @MSVC@) 24 | set(MINGW @MINGW@) 25 | if(MSVC) 26 | set(SDL_CMAKE_PLATFORM "${SDL_CMAKE_PLATFORM}-VC") 27 | elseif(MINGW) 28 | set(SDL_CMAKE_PLATFORM "${SDL_CMAKE_PLATFORM}-mingw") 29 | endif() 30 | 31 | set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-${SDL_CMAKE_PLATFORM}${SDL_CPU_NAMES_WITH_DASHES}") 32 | 33 | if(CPACK_GENERATOR STREQUAL "DragNDrop") 34 | set(CPACK_DMG_VOLUME_NAME "@PROJECT_NAME@ @PROJECT_VERSION@") 35 | # FIXME: use pre-built/create .DS_Store through AppleScript (CPACK_DMG_DS_STORE/CPACK_DMG_DS_STORE_SETUP_SCRIPT) 36 | set(CPACK_DMG_DS_STORE "${PROJECT_SOURCE_DIR}/Xcode/SDL/pkg-support/resources/SDL_DS_Store") 37 | endif() 38 | -------------------------------------------------------------------------------- /cmake/FindFLAC.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_FLAC QUIET flac) 5 | 6 | find_library(FLAC_LIBRARY 7 | NAMES FLAC 8 | HINTS ${PC_FLAC_LIBDIR} 9 | ) 10 | 11 | find_path(FLAC_INCLUDE_PATH 12 | NAMES FLAC/all.h 13 | HINTS ${PC_FLAC_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_FLAC_FOUND) 17 | get_flags_from_pkg_config("${FLAC_LIBRARY}" "PC_FLAC" "_flac") 18 | endif() 19 | 20 | set(FLAC_COMPILE_OPTIONS "${_flac_compile_options}" CACHE STRING "Extra compile options of FLAC") 21 | 22 | set(FLAC_LINK_LIBRARIES "${_flac_link_libraries}" CACHE STRING "Extra link libraries of FLAC") 23 | 24 | set(FLAC_LINK_OPTIONS "${_flac_link_options}" CACHE STRING "Extra link flags of FLAC") 25 | 26 | set(FLAC_LINK_DIRECTORIES "${_flac_link_directories}" CACHE PATH "Extra link directories of FLAC") 27 | 28 | find_package_handle_standard_args(FLAC 29 | REQUIRED_VARS FLAC_LIBRARY FLAC_INCLUDE_PATH 30 | ) 31 | 32 | if(FLAC_FOUND) 33 | if(NOT TARGET FLAC::FLAC) 34 | add_library(FLAC::FLAC UNKNOWN IMPORTED) 35 | set_target_properties(FLAC::FLAC PROPERTIES 36 | IMPORTED_LOCATION "${FLAC_LIBRARY}" 37 | INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_PATH}" 38 | INTERFACE_COMPILE_OPTIONS "${FLAC_COMPILE_OPTIONS}" 39 | INTERFACE_LINK_LIBRARIES "${FLAC_LINK_LIBRARIES}" 40 | INTERFACE_LINK_OPTIONS "${FLAC_LINK_OPTIONS}" 41 | INTERFACE_LINK_DIRECTORIES "${FLAC_LINK_DIRECTORIES}" 42 | ) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/FindFluidSynth.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_FLUIDSYNTH QUIET fluidsynth) 5 | 6 | find_library(FluidSynth_LIBRARY 7 | NAMES fluidsynth libfluidsynth 8 | HINTS ${PC_FLUIDSYNTH_LIBDIR} 9 | ) 10 | 11 | find_path(FluidSynth_INCLUDE_PATH 12 | NAMES fluidsynth.h 13 | HINTS ${PC_FLUIDSYNTH_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_FLUIDSYNTH_FOUND) 17 | get_flags_from_pkg_config("${FluidSynth_LIBRARY}" "PC_FLUIDSYNTH" "_fluidsynth") 18 | endif() 19 | 20 | set(FluidSynth_COMPILE_OPTIONS "${_fluidsynth_compile_options}" CACHE STRING "Extra compile options of FluidSynth") 21 | 22 | set(FluidSynth_LINK_LIBRARIES "${_fluidsynth_link_libraries}" CACHE STRING "Extra link libraries of FluidSynth") 23 | 24 | set(FluidSynth_LINK_OPTIONS "${_fluidsynth_link_options}" CACHE STRING "Extra link flags of FluidSynth") 25 | 26 | set(FluidSynth_LINK_DIRECTORIES "${_fluidsynth_link_directories}" CACHE PATH "Extra link directories of FluidSynth") 27 | 28 | find_package_handle_standard_args(FluidSynth 29 | REQUIRED_VARS FluidSynth_LIBRARY FluidSynth_INCLUDE_PATH 30 | ) 31 | 32 | if(FluidSynth_FOUND) 33 | if(NOT TARGET FluidSynth::libfluidsynth) 34 | add_library(FluidSynth::libfluidsynth UNKNOWN IMPORTED) 35 | set_target_properties(FluidSynth::libfluidsynth PROPERTIES 36 | IMPORTED_LOCATION "${FluidSynth_LIBRARY}" 37 | INTERFACE_INCLUDE_DIRECTORIES "${FluidSynth_INCLUDE_PATH}" 38 | INTERFACE_COMPILE_OPTIONS "${FluidSynth_COMPILE_OPTIONS}" 39 | INTERFACE_LINK_LIBRARIES "${FluidSynth_LINK_LIBRARIES}" 40 | INTERFACE_LINK_OPTIONS "${FluidSynth_LINK_OPTIONS}" 41 | INTERFACE_LINK_DIRECTORIES "${FluidSynth_LINK_DIRECTORIES}" 42 | ) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/FindOgg.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_OGG QUIET ogg) 5 | 6 | find_library(Ogg_LIBRARY 7 | NAMES ogg 8 | HINTS ${PC_OGG_LIBDIR} 9 | ) 10 | 11 | find_path(Ogg_INCLUDE_PATH 12 | NAMES ogg/ogg.h 13 | HINTS ${PC_OGG_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_OGG_FOUND) 17 | get_flags_from_pkg_config("${Ogg_LIBRARY}" "PC_OGG" "_ogg") 18 | endif() 19 | 20 | set(Ogg_COMPILE_OPTIONS "${_ogg_compile_options}" CACHE STRING "Extra compile options of ogg") 21 | 22 | set(Ogg_LINK_LIBRARIES "${_ogg_link_libraries}" CACHE STRING "Extra link libraries of ogg") 23 | 24 | set(Ogg_LINK_OPTIONS "${_ogg_link_options}" CACHE STRING "Extra link flags of ogg") 25 | 26 | set(Ogg_LINK_DIRECTORIES "${_ogg_link_directories}" CACHE PATH "Extra link directories of ogg") 27 | 28 | find_package_handle_standard_args(Ogg 29 | REQUIRED_VARS Ogg_LIBRARY Ogg_INCLUDE_PATH 30 | ) 31 | 32 | if(Ogg_FOUND) 33 | set(Ogg_dirs ${Ogg_INCLUDE_PATH}) 34 | if(EXISTS "${Ogg_INCLUDE_PATH}/ogg") 35 | list(APPEND Ogg_dirs "${Ogg_INCLUDE_PATH}/ogg") 36 | endif() 37 | if(NOT TARGET Ogg::ogg) 38 | add_library(Ogg::ogg UNKNOWN IMPORTED) 39 | set_target_properties(Ogg::ogg PROPERTIES 40 | IMPORTED_LOCATION "${Ogg_LIBRARY}" 41 | INTERFACE_INCLUDE_DIRECTORIES "${Ogg_dirs}" 42 | INTERFACE_COMPILE_OPTIONS "${Ogg_COMPILE_OPTIONS}" 43 | INTERFACE_LINK_LIBRARIES "${Ogg_LINK_LIBRARIES}" 44 | INTERFACE_LINK_OPTIONS "${Ogg_LINK_OPTIONS}" 45 | INTERFACE_LINK_DIRECTORIES "${Ogg_LINK_DIRECTORIES}" 46 | ) 47 | endif() 48 | endif() 49 | 50 | set(Ogg_INCLUDE_DIRS ${Ogg_INCLUDE_PATH}) 51 | -------------------------------------------------------------------------------- /cmake/FindOpus.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_OPUS QUIET opus) 5 | 6 | find_library(Opus_LIBRARY 7 | NAMES opus 8 | HINTS ${PC_OPUS_LIBDIR} 9 | ) 10 | 11 | find_path(Opus_INCLUDE_PATH 12 | NAMES opus.h 13 | PATH_SUFFIXES opus 14 | HINTS ${PC_OPUS_INCLUDEDIR} 15 | ) 16 | if(EXISTS "${Opus_INCLUDE_PATH}/opus") 17 | list(APPEND Opus_INCLUDE_PATH "${Opus_INCLUDE_PATH}/opus") 18 | endif() 19 | 20 | if(PC_OPUS_FOUND) 21 | get_flags_from_pkg_config("${Opus_LIBRARY}" "PC_OPUS" "_opus") 22 | endif() 23 | 24 | set(Opus_COMPILE_OPTIONS "${_opus_compile_options}" CACHE STRING "Extra compile options of opus") 25 | 26 | set(Opus_LINK_LIBRARIES "${_opus_link_libraries}" CACHE STRING "Extra link libraries of opus") 27 | 28 | set(Opus_LINK_OPTIONS "${_opus_link_options}" CACHE STRING "Extra link flags of opus") 29 | 30 | set(Opus_LINK_DIRECTORIES "${_opus_link_directories}" CACHE PATH "Extra link directories of opus") 31 | 32 | find_package(Ogg ${required}) 33 | 34 | find_package_handle_standard_args(Opus 35 | REQUIRED_VARS Opus_LIBRARY Opus_INCLUDE_PATH Ogg_FOUND 36 | ) 37 | 38 | if(Opus_FOUND) 39 | set(Opus_dirs ${Opus_INCLUDE_PATH}) 40 | if(NOT TARGET Opus::opus) 41 | add_library(Opus::opus UNKNOWN IMPORTED) 42 | set_target_properties(Opus::opus PROPERTIES 43 | IMPORTED_LOCATION "${Opus_LIBRARY}" 44 | INTERFACE_INCLUDE_DIRECTORIES "${Opus_dirs}" 45 | INTERFACE_COMPILE_OPTIONS "${Opus_COMPILE_OPTIONS}:$" 46 | INTERFACE_LINK_LIBRARIES "${Opus_LINK_LIBRARIES}" 47 | INTERFACE_LINK_OPTIONS "${Opus_LINK_OPTIONS}" 48 | INTERFACE_LINK_DIRECTORIES "${Opus_LINK_DIRECTORIES}" 49 | ) 50 | endif() 51 | endif() 52 | 53 | set(Opus_INCLUDE_DIRS ${Opus_INCLUDE_PATH}) 54 | -------------------------------------------------------------------------------- /cmake/FindOpusFile.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_OPUSFILE QUIET opusfile) 5 | 6 | find_library(OpusFile_LIBRARY 7 | NAMES opusfile 8 | HINTS ${PC_OPUSFILE_LIBDIR} 9 | ) 10 | 11 | find_path(OpusFile_INCLUDE_PATH 12 | NAMES opus/opusfile.h 13 | HINTS ${PC_OPUSFILE_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_OPUSFILE_FOUND) 17 | get_flags_from_pkg_config("${OpusFile_LIBRARY}" "PC_OPUSFILE" "_opusfile") 18 | endif() 19 | 20 | set(OpusFile_COMPILE_OPTIONS "${_opusfile_compile_options}" CACHE STRING "Extra compile options of opusfile") 21 | 22 | set(OpusFile_LINK_LIBRARIES "${_opusfile_link_libraries}" CACHE STRING "Extra link libraries of opusfile") 23 | 24 | set(OpusFile_LINK_OPTIONS "${_opusfile_link_options}" CACHE STRING "Extra link flags of opusfile") 25 | 26 | set(OpusFile_LINK_DIRECTORIES "${_opusfile_link_directories}" CACHE PATH "Extra link directories of opusfile") 27 | 28 | find_package(Ogg) 29 | find_package(Opus) 30 | 31 | find_package_handle_standard_args(OpusFile 32 | REQUIRED_VARS OpusFile_LIBRARY OpusFile_INCLUDE_PATH Ogg_FOUND Opus_FOUND 33 | ) 34 | 35 | if(OpusFile_FOUND) 36 | set(OpusFile_dirs ${OpusFile_INCLUDE_PATH}) 37 | if(EXISTS "${OpusFile_INCLUDE_PATH}/opus") 38 | list(APPEND OpusFile_dirs "${OpusFile_INCLUDE_PATH}/opus") 39 | endif() 40 | if(NOT TARGET OpusFile::opusfile) 41 | add_library(OpusFile::opusfile UNKNOWN IMPORTED) 42 | set_target_properties(OpusFile::opusfile PROPERTIES 43 | IMPORTED_LOCATION "${OpusFile_LIBRARY}" 44 | INTERFACE_INCLUDE_DIRECTORIES "${OpusFile_dirs};$;$" 45 | INTERFACE_COMPILE_OPTIONS "${OpusFile_COMPILE_OPTIONS}" 46 | INTERFACE_LINK_LIBRARIES "${OpusFile_LINK_LIBRARIES}" 47 | INTERFACE_LINK_OPTIONS "${OpusFile_LINK_OPTIONS}" 48 | INTERFACE_LINK_DIRECTORIES "${OpusFile_LINK_DIRECTORIES}" 49 | ) 50 | endif() 51 | endif() 52 | -------------------------------------------------------------------------------- /cmake/FindSndFile.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_SNDFILE QUIET sndfile) 5 | 6 | find_library(SndFile_LIBRARY 7 | NAMES sndfile sndfile-1 8 | HINTS ${PC_SNDFILE_LIBDIR} 9 | ) 10 | 11 | find_path(SndFile_INCLUDE_PATH 12 | NAMES sndfile.h 13 | HINTS ${PC_SNDFILE_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_SNDFILE_FOUND) 17 | get_flags_from_pkg_config("${SndFile_LIBRARY}" "PC_SNDFILE" "_sndfile") 18 | endif() 19 | 20 | set(SndFile_COMPILE_OPTIONS "${_sndfile_compile_options}" CACHE STRING "Extra compile options of libsndfile") 21 | 22 | set(SndFile_LINK_LIBRARIES "${_sndfile_link_libraries}" CACHE STRING "Extra link libraries of libsndfile") 23 | 24 | set(SndFile_LINK_OPTIONS "${_sndfile_link_options}" CACHE STRING "Extra link flags of libsndfile") 25 | 26 | set(SndFile_LINK_DIRECTORIES "${_sndfile_link_directories}" CACHE PATH "Extra link directories of libsndfile") 27 | 28 | find_package_handle_standard_args(SndFile 29 | REQUIRED_VARS SndFile_LIBRARY SndFile_INCLUDE_PATH 30 | ) 31 | 32 | if(SndFile_FOUND) 33 | if(NOT TARGET SndFile::sndfile) 34 | add_library(SndFile::sndfile UNKNOWN IMPORTED) 35 | set_target_properties(SndFile::sndfile PROPERTIES 36 | IMPORTED_LOCATION "${SndFile_LIBRARY}" 37 | INTERFACE_INCLUDE_DIRECTORIES "${SndFile_INCLUDE_PATH}" 38 | INTERFACE_COMPILE_OPTIONS "${SndFile_COMPILE_OPTIONS}" 39 | INTERFACE_LINK_LIBRARIES "${SndFile_LINK_LIBRARIES}" 40 | INTERFACE_LINK_OPTIONS "${SndFile_LINK_OPTIONS}" 41 | INTERFACE_LINK_DIRECTORIES "${SndFile_LINK_DIRECTORIES}" 42 | ) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/FindVorbis.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_VORBIS QUIET vorbisfile) 5 | 6 | find_library(Vorbis_vorbisfile_LIBRARY 7 | NAMES vorbisfile 8 | HINTS ${PC_VORBIS_LIBDIR} 9 | ) 10 | 11 | find_path(Vorbis_vorbisfile_INCLUDE_PATH 12 | NAMES vorbis/vorbisfile.h 13 | HINTS ${PC_VORBIS_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_VORBIS_FOUND) 17 | get_flags_from_pkg_config("${Vorbis_vorbisfile_LIBRARY}" "PC_VORBIS" "_vorbisfile") 18 | endif() 19 | 20 | set(Vorbis_vorbisfile_COMPILE_OPTIONS "${_vorbisfile_compile_options}" CACHE STRING "Extra compile options of vorbisfile") 21 | 22 | set(Vorbis_vorbisfile_LINK_LIBRARIES "${_vorbisfile_link_libraries}" CACHE STRING "Extra link libraries of vorbisfile") 23 | 24 | set(Vorbis_vorbisfile_LINK_OPTIONS "${_vorbisfile_link_options}" CACHE STRING "Extra link flags of vorbisfile") 25 | 26 | set(Vorbis_vorbisfile_LINK_DIRECTORIES "${_vorbisfile_link_directories}" CACHE PATH "Extra link directories of vorbisfile") 27 | 28 | find_package_handle_standard_args(Vorbis 29 | REQUIRED_VARS Vorbis_vorbisfile_LIBRARY Vorbis_vorbisfile_INCLUDE_PATH 30 | ) 31 | 32 | if (Vorbis_FOUND) 33 | if (NOT TARGET Vorbis::vorbisfile) 34 | add_library(Vorbis::vorbisfile UNKNOWN IMPORTED) 35 | set_target_properties(Vorbis::vorbisfile PROPERTIES 36 | IMPORTED_LOCATION "${Vorbis_vorbisfile_LIBRARY}" 37 | INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_vorbisfile_INCLUDE_PATH}" 38 | INTERFACE_COMPILE_OPTIONS "${Vorbis_vorbisfile_COMPILE_OPTIONS}" 39 | INTERFACE_LINK_LIBRARIES "${Vorbis_vorbisfile_LINK_LIBRARIES}" 40 | INTERFACE_LINK_OPTIONS "${Vorbis_vorbisfile_LINK_OPTIONS}" 41 | INTERFACE_LINK_DIRECTORIES "${Vorbis_vorbisfile_LINK_DIRECTORIES}" 42 | ) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/Findgme.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_GME QUIET libgme) 5 | 6 | find_library(gme_LIBRARY 7 | NAMES gme 8 | HINTS ${PC_GME_LIBDIR} 9 | ) 10 | 11 | find_path(gme_INCLUDE_PATH 12 | NAMES gme/gme.h 13 | HINTS ${PC_GME_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_GME_FOUND) 17 | get_flags_from_pkg_config("${gme_LIBRARY}" "PC_GME" "_gme") 18 | endif() 19 | 20 | set(gme_COMPILE_OPTIONS "${_gme_compile_options}" CACHE STRING "Extra compile options of gme") 21 | 22 | set(gme_LINK_LIBRARIES "${_gme_link_libraries}" CACHE STRING "Extra link libraries of gme") 23 | 24 | set(gme_LINK_OPTIONS "${_gme_link_options}" CACHE STRING "Extra link flags of gme") 25 | 26 | set(gme_LINK_DIRECTORIES "${_gme_link_directories}" CACHE PATH "Extra link directories of gme") 27 | 28 | find_package_handle_standard_args(gme 29 | REQUIRED_VARS gme_LIBRARY gme_INCLUDE_PATH 30 | ) 31 | 32 | if(gme_FOUND) 33 | set(gme_dirs ${gme_INCLUDE_PATH}) 34 | if(EXISTS "${gme_INCLUDE_PATH}/gme") 35 | list(APPEND gme_dirs "${gme_INCLUDE_PATH}/gme") 36 | endif() 37 | if(NOT TARGET gme::gme) 38 | add_library(gme::gme UNKNOWN IMPORTED) 39 | set_target_properties(gme::gme PROPERTIES 40 | IMPORTED_LOCATION "${gme_LIBRARY}" 41 | INTERFACE_INCLUDE_DIRECTORIES "${gme_dirs}" 42 | INTERFACE_COMPILE_OPTIONS "${gme_COMPILE_OPTIONS}" 43 | INTERFACE_LINK_LIBRARIES "${gme_LINK_LIBRARIES}" 44 | INTERFACE_LINK_OPTIONS "${gme_LINK_OPTIONS}" 45 | INTERFACE_LINK_DIRECTORIES "${gme_LINK_DIRECTORIES}" 46 | ) 47 | endif() 48 | endif() 49 | -------------------------------------------------------------------------------- /cmake/Findlibxmp-lite.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_XMPLITE QUIET libxmp-lite) 5 | 6 | find_library(libxmp_lite_LIBRARY 7 | NAMES xmp-lite libxmp-lite 8 | HINTS ${PC_XMPLITE_LIBDIR} 9 | ) 10 | 11 | find_path(libxmp_lite_INCLUDE_PATH 12 | NAMES xmp.h 13 | PATH_SUFFIXES libxmp-lite 14 | HINTS ${PC_XMPLITE_INCLUDEDIR} 15 | ) 16 | 17 | if(PC_XMPLITE_FOUND) 18 | get_flags_from_pkg_config("${libxmp_lite_LIBRARY}" "PC_XMPLITE" "_libxmp_lite") 19 | endif() 20 | 21 | set(libxmp_lite_COMPILE_OPTIONS "${_libxmp_lite_compile_options}" CACHE STRING "Extra compile options of libxmp_lite") 22 | 23 | set(libxmp_lite_LINK_LIBRARIES "${_libxmp_lite_link_libraries}" CACHE STRING "Extra link libraries of libxmp_lite") 24 | 25 | set(libxmp_lite_LINK_OPTIONS "${_libxmp_lite_link_options}" CACHE STRING "Extra link flags of libxmp_lite") 26 | 27 | set(libxmp_lite_LINK_DIRECTORIES "${_libxmp_lite_link_directories}" CACHE PATH "Extra link directories of libxmp_lite") 28 | 29 | find_package_handle_standard_args(libxmp-lite 30 | REQUIRED_VARS libxmp_lite_LIBRARY libxmp_lite_INCLUDE_PATH 31 | ) 32 | 33 | if(libxmp-lite_FOUND) 34 | if(NOT TARGET libxmp-lite::libxmp-lite) 35 | add_library(libxmp-lite::libxmp-lite UNKNOWN IMPORTED) 36 | set_target_properties(libxmp-lite::libxmp-lite PROPERTIES 37 | IMPORTED_LOCATION "${libxmp_lite_LIBRARY}" 38 | INTERFACE_INCLUDE_DIRECTORIES "${libxmp_lite_INCLUDE_PATH}" 39 | INTERFACE_COMPILE_OPTIONS "${libxmp_lite_COMPILE_OPTIONS}" 40 | INTERFACE_LINK_LIBRARIES "${libxmp_lite_LINK_LIBRARIES}" 41 | INTERFACE_LINK_OPTIONS "${libxmp_lite_LINK_OPTIONS}" 42 | INTERFACE_LINK_DIRECTORIES "${libxmp_lite_LINK_DIRECTORIES}" 43 | ) 44 | endif() 45 | endif() 46 | -------------------------------------------------------------------------------- /cmake/Findlibxmp.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_XMP QUIET libxmp) 5 | 6 | find_library(libxmp_LIBRARY 7 | NAMES xmp 8 | HINTS ${PC_XMP_LIBDIR} 9 | ) 10 | 11 | find_path(libxmp_INCLUDE_PATH 12 | NAMES xmp.h 13 | HINTS ${PC_XMP_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_XMP_FOUND) 17 | get_flags_from_pkg_config("${libxmp_LIBRARY}" "PC_XMP" "_libxmp") 18 | endif() 19 | 20 | set(libxmp_COMPILE_OPTIONS "${_libxmp_compile_options}" CACHE STRING "Extra compile options of libxmp") 21 | 22 | set(libxmp_LINK_LIBRARIES "${_libxmp_link_libraries}" CACHE STRING "Extra link libraries of libxmp") 23 | 24 | set(libxmp_LINK_OPTIONS "${_libxmp_link_options}" CACHE STRING "Extra link flags of libxmp") 25 | 26 | set(libxmp_LINK_DIRECTORIES "${_libxmp_link_directories}" CACHE PATH "Extra link flags of libxmp") 27 | 28 | find_package_handle_standard_args(libxmp 29 | REQUIRED_VARS libxmp_LIBRARY libxmp_INCLUDE_PATH 30 | ) 31 | 32 | if(libxmp_FOUND) 33 | if(NOT TARGET libxmp::libxmp) 34 | add_library(libxmp::libxmp UNKNOWN IMPORTED) 35 | set_target_properties(libxmp::libxmp PROPERTIES 36 | IMPORTED_LOCATION "${libxmp_LIBRARY}" 37 | INTERFACE_INCLUDE_DIRECTORIES "${libxmp_INCLUDE_PATH}" 38 | INTERFACE_COMPILE_OPTIONS "${libxmp_COMPILE_OPTIONS}" 39 | INTERFACE_LINK_LIBRARIES "${libxmp_LINK_LIBRARIES}" 40 | INTERFACE_LINK_OPTIONS "${libxmp_LINK_OPTIONS}" 41 | INTERFACE_LINK_DIRECTORIES "${libxmp_LINK_DIRECTORIES}" 42 | ) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/Findmpg123.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_MPG123 QUIET libmpg123) 5 | 6 | find_library(mpg123_LIBRARY 7 | NAMES mpg123 8 | HINTS ${PC_MPG123_LIBDIR} 9 | ) 10 | 11 | find_path(mpg123_INCLUDE_PATH 12 | NAMES mpg123.h 13 | HINTS ${PC_MPG123_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_MPG123_FOUND) 17 | get_flags_from_pkg_config("${mpg123_LIBRARY}" "PC_MPG123" "_mpg123") 18 | endif() 19 | 20 | set(mpg123_COMPILE_OPTIONS "${_mpg123_compile_options}" CACHE STRING "Extra compile options of mpg123") 21 | 22 | set(mpg123_LINK_LIBRARIES "${_mpg123_link_libraries}" CACHE STRING "Extra link libraries of mpg123") 23 | 24 | set(mpg123_LINK_OPTIONS "${_mpg123_link_options}" CACHE STRING "Extra link flags of mpg123") 25 | 26 | set(mpg123_LINK_DIRECTORIES "${_mpg123_link_directories}" CACHE PATH "Extra link directories of mpg123") 27 | 28 | find_package_handle_standard_args(mpg123 29 | REQUIRED_VARS mpg123_LIBRARY mpg123_INCLUDE_PATH 30 | ) 31 | 32 | if(mpg123_FOUND) 33 | if(NOT TARGET MPG123::libmpg123) 34 | add_library(MPG123::libmpg123 UNKNOWN IMPORTED) 35 | set_target_properties(MPG123::libmpg123 PROPERTIES 36 | IMPORTED_LOCATION "${mpg123_LIBRARY}" 37 | INTERFACE_INCLUDE_DIRECTORIES "${mpg123_INCLUDE_PATH}" 38 | INTERFACE_COMPILE_OPTIONS "${mpg123_COMPILE_OPTIONS}" 39 | INTERFACE_LINK_LIBRARIES "${mpg123_LINK_LIBRARIES}" 40 | INTERFACE_LINK_OPTIONS "${mpg123_LINK_OPTIONS}" 41 | INTERFACE_LINK_DIRECTORIES "${mpg123_LINK_DIRECTORIES}" 42 | ) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/Findtremor.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | find_package(PkgConfig QUIET) 4 | pkg_check_modules(PC_TREMOR QUIET vorbisidec) 5 | 6 | find_library(tremor_LIBRARY 7 | NAMES vorbisidec libvorbisidec 8 | HINTS ${PC_TREMOR_LIBDIR} 9 | ) 10 | 11 | find_path(tremor_INCLUDE_PATH 12 | NAMES tremor/ivorbisfile.h 13 | HINTS ${PC_TREMOR_INCLUDEDIR} 14 | ) 15 | 16 | if(PC_TREMOR_FOUND) 17 | get_flags_from_pkg_config("${tremor_LIBRARY}" "PC_TREMOR" "_tremor") 18 | endif() 19 | 20 | set(tremor_COMPILE_OPTIONS "${_tremor_compile_options}" CACHE STRING "Extra compile options of vorbis") 21 | 22 | set(tremor_LINK_LIBRARIES "${_tremor_link_libraries}" CACHE STRING "Extra link libraries of vorbis") 23 | 24 | set(tremor_LINK_OPTIONS "${_tremor_link_options}" CACHE STRING "Extra link flags of vorbis") 25 | 26 | set(tremor_LINK_DIRECTORIES "${_tremor_link_directories}" CACHE PATH "Extra link directories of vorbis") 27 | 28 | find_package_handle_standard_args(tremor 29 | REQUIRED_VARS tremor_LIBRARY tremor_INCLUDE_PATH 30 | ) 31 | 32 | if (tremor_FOUND) 33 | if (NOT TARGET tremor::tremor) 34 | add_library(tremor::tremor UNKNOWN IMPORTED) 35 | set_target_properties(tremor::tremor PROPERTIES 36 | IMPORTED_LOCATION "${tremor_LIBRARY}" 37 | INTERFACE_INCLUDE_DIRECTORIES "${tremor_INCLUDE_PATH}" 38 | INTERFACE_COMPILE_OPTIONS "${tremor_COMPILE_OPTIONS}" 39 | INTERFACE_LINK_LIBRARIES "${tremor_LINK_LIBRARIES}" 40 | INTERFACE_LINK_OPTIONS "${tremor_LINK_OPTIONS}" 41 | INTERFACE_LINK_DIRECTORIES "${tremor_LINK_DIRECTORIES}" 42 | ) 43 | endif() 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/Findwavpack.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | if(WIN32) 4 | set(wavpack_find_names wavpack libwavpack wavpackdll) 5 | else() 6 | set(wavpack_find_names wavpack) 7 | endif() 8 | find_library(wavpack_LIBRARY 9 | NAMES ${wavpack_find_names} 10 | ) 11 | 12 | find_path(wavpack_INCLUDE_PATH 13 | NAMES wavpack/wavpack.h 14 | ) 15 | 16 | set(wavpack_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of wavpack") 17 | 18 | set(wavpack_LINK_LIBRARIES "" CACHE STRING "Extra link libraries of wavpack") 19 | 20 | set(wavpack_LINK_OPTIONS "" CACHE STRING "Extra link flags of wavpack") 21 | 22 | find_package_handle_standard_args(wavpack 23 | REQUIRED_VARS wavpack_LIBRARY wavpack_INCLUDE_PATH 24 | ) 25 | 26 | if (wavpack_FOUND) 27 | if (NOT TARGET WavPack::WavPack) 28 | add_library(WavPack::WavPack UNKNOWN IMPORTED) 29 | set_target_properties(WavPack::WavPack PROPERTIES 30 | IMPORTED_LOCATION "${wavpack_LIBRARY}" 31 | INTERFACE_INCLUDE_DIRECTORIES "${wavpack_INCLUDE_PATH}" 32 | INTERFACE_COMPILE_OPTIONS "${wavpack_COMPILE_OPTIONS}" 33 | INTERFACE_LINK_LIBRARIES "${wavpack_LINK_LIBRARIES}" 34 | INTERFACE_LINK_OPTIONS "${wavpack_LINK_OPTIONS}" 35 | ) 36 | endif() 37 | endif() 38 | -------------------------------------------------------------------------------- /cmake/GetGitRevisionDescription.cmake.in: -------------------------------------------------------------------------------- 1 | # 2 | # Internal file for GetGitRevisionDescription.cmake 3 | # 4 | # Requires CMake 2.6 or newer (uses the 'function' command) 5 | # 6 | # Original Author: 7 | # 2009-2010 Ryan Pavlik 8 | # http://academic.cleardefinition.com 9 | # Iowa State University HCI Graduate Program/VRAC 10 | # 11 | # Copyright 2009-2012, Iowa State University 12 | # Copyright 2011-2015, Contributors 13 | # Distributed under the Boost Software License, Version 1.0. 14 | # (See accompanying file LICENSE_1_0.txt or copy at 15 | # http://www.boost.org/LICENSE_1_0.txt) 16 | # SPDX-License-Identifier: BSL-1.0 17 | 18 | set(HEAD_HASH) 19 | 20 | file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) 21 | 22 | string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) 23 | if(HEAD_CONTENTS MATCHES "ref") 24 | # named branch 25 | string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") 26 | if(EXISTS "@GIT_DIR@/${HEAD_REF}") 27 | configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) 28 | else() 29 | configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY) 30 | file(READ "@GIT_DATA@/packed-refs" PACKED_REFS) 31 | if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}") 32 | set(HEAD_HASH "${CMAKE_MATCH_1}") 33 | endif() 34 | endif() 35 | else() 36 | # detached HEAD 37 | configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) 38 | endif() 39 | 40 | if(NOT HEAD_HASH) 41 | file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) 42 | string(STRIP "${HEAD_HASH}" HEAD_HASH) 43 | endif() 44 | -------------------------------------------------------------------------------- /cmake/PkgConfigHelper.cmake: -------------------------------------------------------------------------------- 1 | # Helper for Find modules 2 | 3 | function(get_flags_from_pkg_config _library _pc_prefix _out_prefix) 4 | if("${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") 5 | set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER) 6 | set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES) 7 | set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER) 8 | set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS) 9 | else() 10 | set(_cflags ${_pc_prefix}_CFLAGS_OTHER) 11 | set(_link_libraries ${_pc_prefix}_LIBRARIES) 12 | set(_link_options ${_pc_prefix}_LDFLAGS_OTHER) 13 | set(_library_dirs ${_pc_prefix}_LIBRARY_DIRS) 14 | endif() 15 | 16 | # The *_LIBRARIES lists always start with the library itself 17 | list(POP_FRONT "${_link_libraries}") 18 | 19 | # Work around CMake's flag deduplication when pc files use `-framework A` instead of `-Wl,-framework,A` 20 | string(REPLACE "-framework;" "-Wl,-framework," "_filtered_link_options" "${${_link_options}}") 21 | 22 | set(${_out_prefix}_compile_options 23 | "${${_cflags}}" 24 | PARENT_SCOPE) 25 | set(${_out_prefix}_link_libraries 26 | "${${_link_libraries}}" 27 | PARENT_SCOPE) 28 | set(${_out_prefix}_link_options 29 | "${_filtered_link_options}" 30 | PARENT_SCOPE) 31 | set(${_out_prefix}_link_directories 32 | "${${_library_dirs}}" 33 | PARENT_SCOPE) 34 | endfunction() 35 | -------------------------------------------------------------------------------- /cmake/sdl3-mixer.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@SDL_PKGCONFIG_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=@LIBDIR_FOR_PKG_CONFIG@ 4 | includedir=@INCLUDEDIR_FOR_PKG_CONFIG@ 5 | 6 | Name: @PROJECT_NAME@ 7 | Description: mixer library for Simple DirectMedia Layer 8 | Version: @PROJECT_VERSION@ 9 | Requires: sdl3 >= @SDL_REQUIRED_VERSION@ 10 | Libs: -L${libdir} -lSDL3_mixer 11 | Requires.private: @PC_REQUIRES@ 12 | Libs.private: @PC_LIBS@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /cmake/sdlmanpages.cmake: -------------------------------------------------------------------------------- 1 | include(CMakeParseArguments) 2 | include(GNUInstallDirs) 3 | 4 | function(SDL_generate_manpages) 5 | cmake_parse_arguments(ARG "" "RESULT_VARIABLE;NAME;BUILD_DOCDIR;HEADERS_DIR;SOURCE_DIR;SYMBOL;OPTION_FILE;WIKIHEADERS_PL_PATH;REVISION" "" ${ARGN}) 6 | 7 | set(wikiheaders_extra_args) 8 | 9 | if(NOT ARG_NAME) 10 | set(ARG_NAME "${PROJECT_NAME}") 11 | endif() 12 | 13 | if(NOT ARG_SOURCE_DIR) 14 | set(ARG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 15 | endif() 16 | 17 | if(NOT ARG_OPTION_FILE) 18 | set(ARG_OPTION_FILE "${PROJECT_SOURCE_DIR}/.wikiheaders-options") 19 | endif() 20 | 21 | if(NOT ARG_HEADERS_DIR) 22 | message(FATAL_ERROR "Missing required HEADERS_DIR argument") 23 | endif() 24 | 25 | # FIXME: get rid of SYMBOL and let the perl script figure out the dependencies 26 | if(NOT ARG_SYMBOL) 27 | message(FATAL_ERROR "Missing required SYMBOL argument") 28 | endif() 29 | 30 | if(ARG_REVISION) 31 | list(APPEND wikiheaders_extra_args "--rev=${ARG_REVISION}") 32 | endif() 33 | 34 | if(NOT ARG_BUILD_DOCDIR) 35 | set(ARG_BUILD_DOCDIR "${CMAKE_CURRENT_BINARY_DIR}/docs") 36 | endif() 37 | set(BUILD_WIKIDIR "${ARG_BUILD_DOCDIR}/wiki") 38 | set(BUILD_MANDIR "${ARG_BUILD_DOCDIR}/man") 39 | 40 | find_package(Perl) 41 | file(GLOB HEADER_FILES "${ARG_HEADERS_DIR}/*.h") 42 | 43 | set(result FALSE) 44 | 45 | if(PERL_FOUND AND EXISTS "${ARG_WIKIHEADERS_PL_PATH}") 46 | add_custom_command( 47 | OUTPUT "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" 48 | COMMAND "${CMAKE_COMMAND}" -E make_directory "${BUILD_WIKIDIR}" 49 | COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki ${wikiheaders_extra_args} 50 | DEPENDS ${HEADER_FILES} "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}" 51 | COMMENT "Generating ${ARG_NAME} wiki markdown files" 52 | ) 53 | add_custom_command( 54 | OUTPUT "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3" 55 | COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" "--manpath=${BUILD_MANDIR}" --copy-to-manpages ${wikiheaders_extra_args} 56 | DEPENDS "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}" 57 | COMMENT "Generating ${ARG_NAME} man pages" 58 | ) 59 | add_custom_target(${ARG_NAME}-docs ALL DEPENDS "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3") 60 | 61 | install(DIRECTORY "${BUILD_MANDIR}/" DESTINATION "${CMAKE_INSTALL_MANDIR}") 62 | set(result TRUE) 63 | endif() 64 | 65 | if(ARG_RESULT_VARIABLE) 66 | set(${ARG_RESULT_VARIABLE} ${result} PARENT_SCOPE) 67 | endif() 68 | endfunction() 69 | -------------------------------------------------------------------------------- /cmake/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This cmake build script is meant for verifying the various CMake configuration script. 2 | 3 | cmake_minimum_required(VERSION 3.12...3.28) 4 | project(sdl_test LANGUAGES C) 5 | 6 | cmake_policy(SET CMP0074 NEW) 7 | 8 | # Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL3_mixer outside of sysroot 9 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER) 10 | 11 | include(FeatureSummary) 12 | 13 | option(TEST_SHARED "Test linking to shared SDL3_mixer library" ON) 14 | add_feature_info("TEST_SHARED" TEST_SHARED "Test linking with shared library") 15 | 16 | option(TEST_STATIC "Test linking to static SDL3_mixer libary" ON) 17 | add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library") 18 | 19 | if(ANDROID) 20 | macro(add_executable NAME) 21 | set(args ${ARGN}) 22 | list(REMOVE_ITEM args WIN32) 23 | add_library(${NAME} SHARED ${args}) 24 | unset(args) 25 | endmacro() 26 | endif() 27 | 28 | if(TEST_SHARED) 29 | find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3) 30 | find_package(SDL3_mixer REQUIRED CONFIG) 31 | add_executable(main_shared main.c) 32 | target_link_libraries(main_shared PRIVATE SDL3_mixer::SDL3_mixer-shared SDL3::SDL3) 33 | endif() 34 | 35 | if(TEST_STATIC) 36 | find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3) 37 | # some static vendored libraries use c++ (enable CXX after `find_package` might show a warning) 38 | enable_language(CXX) 39 | find_package(SDL3_mixer REQUIRED CONFIG) 40 | add_executable(main_static main.c) 41 | target_link_libraries(main_static PRIVATE SDL3_mixer::SDL3_mixer-static SDL3::SDL3) 42 | endif() 43 | 44 | feature_summary(WHAT ALL) 45 | -------------------------------------------------------------------------------- /cmake/test/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | if (!SDL_Init(0)) { 8 | SDL_Log("SDL_Init: could not initialize SDL: %s\n", SDL_GetError()); 9 | return 1; 10 | } 11 | if (Mix_Init(0) == 0) { 12 | SDL_Log("Mix_Init: no sound/music loaders supported (%s)\n", SDL_GetError()); 13 | } 14 | Mix_Quit(); 15 | SDL_Quit(); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /external/Get-GitModules.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Downloads the Git modules specified in ../.gitmodules 4 | 5 | .DESCRIPTION 6 | Parses and downloads the Github repositories specified in the .gitmodules file 7 | 8 | .EXAMPLE 9 | PS> .\Get-GitModules.ps1 10 | < Downloads and parses the repositories in the .gitmodules file. > 11 | #> 12 | 13 | #------- Variables ------------------------------------------------------------- 14 | [String] $PathRegex = "path\s*=\s*(?.*)" 15 | [String] $URLRegex = "url\s*=\s*(?.*)" 16 | [String] $BranchRegex = "branch\s*=\s*(?.*)" 17 | [String[]] $Arguments = $args 18 | 19 | #------- Script ---------------------------------------------------------------- 20 | if (-not $Arguments) { 21 | [String[]]$Arguments = "--depth", "1" 22 | } 23 | 24 | foreach ($Line in Get-Content $PSScriptRoot\..\.gitmodules) { 25 | if ($Line -match $PathRegex) { 26 | $Match = Select-String -InputObject $Line -Pattern $PathRegex 27 | $Path = $Match.Matches[0].Groups[1].Value 28 | } 29 | elseif ($Line -match $URLRegex) { 30 | $Match = Select-String -InputObject $Line -Pattern $URLRegex 31 | $URL = $Match.Matches[0].Groups[1].Value 32 | } 33 | elseif ($Line -match $BranchRegex) { 34 | $Match = Select-String -InputObject $Line -Pattern $BranchRegex 35 | $Branch = $Match.Matches[0].Groups[1].Value 36 | 37 | Write-Host "git clone --filter=blob:none $URL $Path -b $Branch --recursive $Arguments" ` 38 | -ForegroundColor Blue 39 | git clone --filter=blob:none $URL $PSScriptRoot/../$Path -b $Branch --recursive $Arguments 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /external/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | ARGUMENTS="$*" 6 | 7 | cd $(dirname "$0")/.. 8 | cat .gitmodules | \ 9 | while true; do 10 | read module || break 11 | read line; set -- $line 12 | path=$3 13 | read line; set -- $line 14 | url=$3 15 | read line; set -- $line 16 | branch=$3 17 | 18 | if [ -z "$ARGUMENTS" ]; then 19 | ARGUMENTS="--depth 1" 20 | fi 21 | 22 | git clone --filter=blob:none $url $path -b $branch --recursive $ARGUMENTS 23 | done 24 | -------------------------------------------------------------------------------- /mingw/pkg-support/cmake/sdl3_mixer-config-version.cmake: -------------------------------------------------------------------------------- 1 | # SDL3_mixer CMake version configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL3_mixer-devel-3.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL3_mixer/SDL3ConfigVersion.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL3_mixer/SDL3ConfigVersion.cmake") 8 | else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") 9 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl3_mixer_config_path}") 14 | message(WARNING "${sdl3_mixer_config_path} does not exist: MinGW development package is corrupted") 15 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 16 | return() 17 | endif() 18 | 19 | include("${sdl3_mixer_config_path}") 20 | -------------------------------------------------------------------------------- /mingw/pkg-support/cmake/sdl3_mixer-config.cmake: -------------------------------------------------------------------------------- 1 | # SDL3_mixer CMake configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL3_mixer-devel-3.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL3_mixer/SDL3Config.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl3_mixer_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL3_mixer/SDL3Config.cmake") 8 | else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") 9 | set(SDL3_mixer_FOUND FALSE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl3_mixer_config_path}") 14 | message(WARNING "${sdl3_mixer_config_path} does not exist: MinGW development package is corrupted") 15 | set(SDL3_mixer_FOUND FALSE) 16 | return() 17 | endif() 18 | 19 | include("${sdl3_mixer_config_path}") 20 | 21 | # The SDL_mixer MinGW development package ships with vendored libraries 22 | set(SDLMIXER_VENDORED 1) 23 | -------------------------------------------------------------------------------- /release_checklist.md: -------------------------------------------------------------------------------- 1 | # Release checklist 2 | 3 | ## New feature release 4 | 5 | * Update `CHANGES.txt` 6 | 7 | * Bump version number to 3.EVEN.0 in all these locations: 8 | 9 | * `include/SDL3_mixer/SDL_mixer.h`: 10 | `SDL_MIXER_MAJOR_VERSION`, `SDL_MIXER_MINOR_VERSION`, `SDL_MIXER_MICRO_VERSION` 11 | * `CMakeLists.txt`: 12 | `MAJOR_VERSION`, `MINOR_VERSION`, `MICRO_VERSION` 13 | * `version.rc`: 14 | `FILEVERSION`, `PRODUCTVERSION`, `FileVersion`, `ProductVersion` 15 | * `VisualC/Version.rc`: 16 | `FILEVERSION`, `PRODUCTVERSION`, `FileVersion`, `ProductVersion` 17 | * `Xcode/Info-Framework.plist`: 18 | `CFBundleShortVersionString`, `CFBundleVersion` 19 | 20 | * Bump ABI version information 21 | 22 | * `Xcode/SDL_mixer.xcodeproj/project.pbxproj`: 23 | `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION` 24 | * set first number in `DYLIB_CURRENT_VERSION` to 25 | (100 * *minor*) + 1 26 | * set second number in `DYLIB_CURRENT_VERSION` to 0 27 | * set `DYLIB_COMPATIBILITY_VERSION` to the same value 28 | 29 | * Regenerate `configure` 30 | 31 | * Run `./test-versioning.sh` to verify that everything is consistent 32 | 33 | * Do the release 34 | 35 | ## New bugfix release 36 | 37 | * Check that no new API/ABI was added 38 | 39 | * If it was, do a new feature release (see above) instead 40 | 41 | * Bump version number from 3.Y.Z to 3.Y.(Z+1) (Y is even) 42 | 43 | * Same places as listed above 44 | 45 | * Bump ABI version information 46 | 47 | * `Xcode/SDL_mixer.xcodeproj/project.pbxproj`: 48 | `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION` 49 | * set second number in `DYLIB_CURRENT_VERSION` to *micro* 50 | * Leave `DYLIB_COMPATIBILITY_VERSION` unchanged 51 | 52 | * Regenerate `configure` 53 | 54 | * Run test/versioning.sh to verify that everything is consistent 55 | 56 | * Do the release 57 | 58 | ## After a feature release 59 | 60 | * Create a branch like `release-3.6.x` 61 | 62 | * Bump version number to 3.ODD.0 for next development branch 63 | 64 | * Same places as listed above 65 | 66 | * Bump ABI version information 67 | 68 | * Same places as listed above 69 | * Assume that the next feature release will contain new API/ABI 70 | 71 | * Run test/versioning.sh to verify that everything is consistent 72 | 73 | * Add a new milestone for issues 74 | 75 | ## New development prerelease 76 | 77 | * Bump version number from 3.Y.Z to 3.Y.(Z+1) (Y is odd) 78 | 79 | * Same places as listed above 80 | 81 | * Bump ABI version information 82 | 83 | * `Xcode/SDL_mixer.xcodeproj/project.pbxproj`: 84 | `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION` 85 | * set first number in `DYLIB_CURRENT_VERSION` to 86 | (100 * *minor*) + *micro* + 1 87 | * set second number in `DYLIB_CURRENT_VERSION` to 0 88 | * set `DYLIB_COMPATIBILITY_VERSION` to the same value 89 | 90 | * Regenerate `configure` 91 | 92 | * Run test/versioning.sh to verify that everything is consistent 93 | 94 | * Do the release 95 | -------------------------------------------------------------------------------- /src/SDL_mixer.sym: -------------------------------------------------------------------------------- 1 | SDL3_mixer_0.0.0 { 2 | global: 3 | Mix_AllocateChannels; 4 | Mix_ChannelFinished; 5 | Mix_CloseAudio; 6 | Mix_EachSoundFont; 7 | Mix_ExpireChannel; 8 | Mix_FadeInChannel; 9 | Mix_FadeInChannelTimed; 10 | Mix_FadeInMusic; 11 | Mix_FadeInMusicPos; 12 | Mix_FadeOutChannel; 13 | Mix_FadeOutGroup; 14 | Mix_FadeOutMusic; 15 | Mix_FadingChannel; 16 | Mix_FadingMusic; 17 | Mix_FreeChunk; 18 | Mix_FreeMusic; 19 | Mix_GetChunk; 20 | Mix_GetChunkDecoder; 21 | Mix_GetMusicAlbumTag; 22 | Mix_GetMusicArtistTag; 23 | Mix_GetMusicCopyrightTag; 24 | Mix_GetMusicDecoder; 25 | Mix_GetMusicHookData; 26 | Mix_GetMusicLoopEndTime; 27 | Mix_GetMusicLoopLengthTime; 28 | Mix_GetMusicLoopStartTime; 29 | Mix_GetMusicPosition; 30 | Mix_GetMusicTitle; 31 | Mix_GetMusicTitleTag; 32 | Mix_GetMusicType; 33 | Mix_GetMusicVolume; 34 | Mix_GetNumChunkDecoders; 35 | Mix_GetNumMusicDecoders; 36 | Mix_GetNumTracks; 37 | Mix_GetSoundFonts; 38 | Mix_GetTimidityCfg; 39 | Mix_GroupAvailable; 40 | Mix_GroupChannel; 41 | Mix_GroupChannels; 42 | Mix_GroupCount; 43 | Mix_GroupNewer; 44 | Mix_GroupOldest; 45 | Mix_HaltChannel; 46 | Mix_HaltGroup; 47 | Mix_HaltMusic; 48 | Mix_HasChunkDecoder; 49 | Mix_HasMusicDecoder; 50 | Mix_HookMusic; 51 | Mix_HookMusicFinished; 52 | Mix_Init; 53 | Mix_LoadMUS; 54 | Mix_LoadMUSType_IO; 55 | Mix_LoadMUS_IO; 56 | Mix_LoadWAV; 57 | Mix_LoadWAV_IO; 58 | Mix_MasterVolume; 59 | Mix_ModMusicJumpToOrder; 60 | Mix_MusicDuration; 61 | Mix_OpenAudio; 62 | Mix_Pause; 63 | Mix_PauseGroup; 64 | Mix_PauseAudio; 65 | Mix_PauseMusic; 66 | Mix_Paused; 67 | Mix_PausedMusic; 68 | Mix_PlayChannel; 69 | Mix_PlayChannelTimed; 70 | Mix_PlayMusic; 71 | Mix_Playing; 72 | Mix_PlayingMusic; 73 | Mix_QuerySpec; 74 | Mix_QuickLoad_RAW; 75 | Mix_QuickLoad_WAV; 76 | Mix_Quit; 77 | Mix_RegisterEffect; 78 | Mix_ReserveChannels; 79 | Mix_Resume; 80 | Mix_ResumeGroup; 81 | Mix_ResumeMusic; 82 | Mix_RewindMusic; 83 | Mix_SetDistance; 84 | Mix_SetMusicPosition; 85 | Mix_SetPanning; 86 | Mix_SetPosition; 87 | Mix_SetPostMix; 88 | Mix_SetReverseStereo; 89 | Mix_SetSoundFonts; 90 | Mix_SetTimidityCfg; 91 | Mix_StartTrack; 92 | Mix_UnregisterAllEffects; 93 | Mix_UnregisterEffect; 94 | Mix_Version; 95 | Mix_Volume; 96 | Mix_VolumeChunk; 97 | Mix_VolumeMusic; 98 | local: *; 99 | }; 100 | -------------------------------------------------------------------------------- /src/codecs/dr_libs/LICENSE: -------------------------------------------------------------------------------- 1 | This software is available as a choice of the following licenses. Choose 2 | whichever you prefer. 3 | 4 | =============================================================================== 5 | ALTERNATIVE 1 - Public Domain (www.unlicense.org) 6 | =============================================================================== 7 | This is free and unencumbered software released into the public domain. 8 | 9 | Anyone is free to copy, modify, publish, use, compile, sell, or distribute this 10 | software, either in source code form or as a compiled binary, for any purpose, 11 | commercial or non-commercial, and by any means. 12 | 13 | In jurisdictions that recognize copyright laws, the author or authors of this 14 | software dedicate any and all copyright interest in the software to the public 15 | domain. We make this dedication for the benefit of the public at large and to 16 | the detriment of our heirs and successors. We intend this dedication to be an 17 | overt act of relinquishment in perpetuity of all present and future rights to 18 | this software under copyright law. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 24 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | For more information, please refer to 28 | 29 | =============================================================================== 30 | ALTERNATIVE 2 - MIT No Attribution 31 | =============================================================================== 32 | Copyright 2020 David Reid 33 | 34 | Permission is hereby granted, free of charge, to any person obtaining a copy of 35 | this software and associated documentation files (the "Software"), to deal in 36 | the Software without restriction, including without limitation the rights to 37 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 38 | of the Software, and to permit persons to whom the Software is furnished to do 39 | so. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 47 | SOFTWARE. 48 | -------------------------------------------------------------------------------- /src/codecs/dr_libs/README.md: -------------------------------------------------------------------------------- 1 |

Public domain, single file audio decoding libraries for C and C++.

2 | 3 |

4 | discord 5 |

6 | 7 | All development of released libraries happens on the master branch. There may exist some decoder-specific branches for work in progress. Check tags for the latest version of a particular library. 8 | 9 | 10 | Library | Description 11 | ----------------------------------------------- | ----------- 12 | [dr_flac](dr_flac.h) | FLAC audio decoder. 13 | [dr_mp3](dr_mp3.h) | MP3 audio decoder. Based off [minimp3](https://github.com/lieff/minimp3). 14 | [dr_wav](dr_wav.h) | WAV audio loader and writer. 15 | 16 | 17 | # Other Libraries 18 | Below are some of my other libraries you may be interested in. 19 | 20 | Library | Description 21 | ------------------------------------------------- | ----------- 22 | [miniaudio](https://github.com/mackron/miniaudio) | A public domain, single file library for audio playback and recording. 23 | 24 | -------------------------------------------------------------------------------- /src/codecs/load_aiff.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | This is the source needed to decode an AIFF file into a waveform. 22 | It's pretty straightforward once you get going. The only 23 | externally-callable function is Mix_LoadAIFF_IO(), which is meant to 24 | act as identically to SDL_LoadWAV_IO() as possible. 25 | 26 | This file by Torbjörn Andersson (torbjorn.andersson@eurotime.se) 27 | */ 28 | 29 | /* Don't call this directly; use Mix_LoadWAV_IO() for now. */ 30 | SDL_AudioSpec *Mix_LoadAIFF_IO (SDL_IOStream *src, bool closeio, 31 | SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len); 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /src/codecs/load_sndfile.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | This is the source needed to decode a file in any format supported by 22 | libsndfile. The only externally-callable function is Mix_LoadSndFile_IO(), 23 | which is meant to act as identically to SDL_LoadWAV_IO() as possible. 24 | 25 | This file by Fabian Greffrath (fabian@greffrath.com). 26 | */ 27 | 28 | #ifndef LOAD_SNDFILE_H 29 | #define LOAD_SNDFILE_H 30 | 31 | #include 32 | 33 | /* Don't call this directly; use Mix_LoadWAV_IO() for now. */ 34 | SDL_AudioSpec *Mix_LoadSndFile_IO (SDL_IOStream *src, bool closeio, 35 | SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len); 36 | 37 | void SNDFILE_uninit (void); 38 | 39 | #endif 40 | 41 | /* vi: set ts=4 sw=4 expandtab: */ 42 | -------------------------------------------------------------------------------- /src/codecs/load_voc.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | This is the source needed to decode a Creative Labs VOC file into a 22 | waveform. It's pretty straightforward once you get going. The only 23 | externally-callable function is Mix_LoadVOC_IO(), which is meant to 24 | act as identically to SDL_LoadWAV_IO() as possible. 25 | 26 | This file by Ryan C. Gordon (icculus@icculus.org). 27 | 28 | Heavily borrowed from sox v12.17.1's voc.c. 29 | (http://www.freshmeat.net/projects/sox/) 30 | */ 31 | 32 | /* Don't call this directly; use Mix_LoadWAV_IO() for now. */ 33 | SDL_AudioSpec *Mix_LoadVOC_IO (SDL_IOStream *src, bool closeio, 34 | SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len); 35 | 36 | /* vi: set ts=4 sw=4 expandtab: */ 37 | -------------------------------------------------------------------------------- /src/codecs/mp3utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file provides utility functions to work with MP3 files including reading of tags. */ 23 | 24 | #ifndef MIX_MP3UTILS_H 25 | #define MIX_MP3UTILS_H 26 | 27 | #include "music.h" 28 | 29 | #define ENABLE_ALL_MP3_TAGS 30 | 31 | #if defined(MUSIC_WAV) || defined(ENABLE_ALL_MP3_TAGS) 32 | #define ENABLE_ID3V2_TAG 33 | struct mp3file_t { 34 | SDL_IOStream *src; 35 | Sint64 start, length, pos; 36 | }; 37 | #endif 38 | 39 | #ifdef ENABLE_ALL_MP3_TAGS 40 | extern int mp3_read_tags(Mix_MusicMetaTags *out_tags, struct mp3file_t *fil, bool keep_id3v2); 41 | #endif /* ENABLE_ALL_MP3_TAGS */ 42 | 43 | #ifdef ENABLE_ID3V2_TAG 44 | extern int read_id3v2_from_mem(Mix_MusicMetaTags *out_tags, Uint8 *data, size_t length); 45 | #endif 46 | 47 | #ifdef ENABLE_ALL_MP3_TAGS 48 | extern int MP3_IOinit(struct mp3file_t *fil, SDL_IOStream *src); 49 | extern size_t MP3_IOread(struct mp3file_t *fil, void *ptr, size_t size, size_t maxnum); 50 | extern Sint64 MP3_IOseek(struct mp3file_t *fil, Sint64 offset, int whence); 51 | extern Sint64 MP3_IOtell(struct mp3file_t *fil); 52 | #endif /* ENABLE_ALL_MP3_TAGS */ 53 | 54 | #endif /* MIX_MP3UTILS_H */ 55 | 56 | /* vi: set ts=4 sw=4 expandtab: */ 57 | -------------------------------------------------------------------------------- /src/codecs/music_drflac.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports playing FLAC files with dr_flac */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_DRFLAC; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_drmp3.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports playing MP3 files with dr_mp3 */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_DRMP3; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_flac.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #include "music.h" 23 | 24 | extern Mix_MusicInterface Mix_MusicInterface_FLAC; 25 | 26 | /* vi: set ts=4 sw=4 expandtab: */ 27 | -------------------------------------------------------------------------------- /src/codecs/music_fluidsynth.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | James Le Cuirot 22 | chewi@aura-online.co.uk 23 | */ 24 | 25 | /* This file supports playing MIDI files with FluidSynth */ 26 | 27 | #include "music.h" 28 | 29 | extern Mix_MusicInterface Mix_MusicInterface_FLUIDSYNTH; 30 | 31 | /* vi: set ts=4 sw=4 expandtab: */ 32 | -------------------------------------------------------------------------------- /src/codecs/music_gme.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports playing chiptune files with libGME */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_GME; 27 | -------------------------------------------------------------------------------- /src/codecs/music_mpg123.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports playing MP3 files with mpg123 */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_MPG123; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_nativemidi.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports playing MIDI files with OS APIs */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_NATIVEMIDI; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_ogg.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports Ogg Vorbis music streams */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_OGG; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_opus.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports Ogg Opus music streams */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_Opus; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_timidity.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports playing MIDI files with timidity */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_TIMIDITY; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_wav.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports streaming WAV files */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_WAV; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_wavpack.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports streaming WavPack files */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_WAVPACK; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/music_xmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* This file supports playing MOD files with libxmp */ 23 | 24 | #include "music.h" 25 | 26 | extern Mix_MusicInterface Mix_MusicInterface_XMP; 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/codecs/native_midi/native_midi.h: -------------------------------------------------------------------------------- 1 | /* 2 | native_midi: Hardware Midi support for the SDL_mixer library 3 | Copyright (C) 2000 Florian 'Proff' Schulze 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef NATIVE_MIDI_H_ 23 | #define NATIVE_MIDI_H_ 24 | 25 | #include 26 | 27 | typedef struct _NativeMidiSong NativeMidiSong; 28 | 29 | bool native_midi_detect(void); 30 | NativeMidiSong *native_midi_loadsong_IO(SDL_IOStream *src, bool closeio); 31 | void native_midi_freesong(NativeMidiSong *song); 32 | void native_midi_start(NativeMidiSong *song, int loops); 33 | void native_midi_pause(void); 34 | void native_midi_resume(void); 35 | void native_midi_stop(void); 36 | bool native_midi_active(void); 37 | void native_midi_setvolume(int volume); 38 | const char *native_midi_error(void); 39 | 40 | #endif /* NATIVE_MIDI_H_ */ 41 | -------------------------------------------------------------------------------- /src/codecs/native_midi/native_midi_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | native_midi: Hardware Midi support for the SDL_mixer library 3 | Copyright (C) 2000,2001 Florian 'Proff' Schulze 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef _NATIVE_MIDI_COMMON_H_ 23 | #define _NATIVE_MIDI_COMMON_H_ 24 | 25 | #include 26 | 27 | /* Midi Status Bytes */ 28 | #define MIDI_STATUS_NOTE_OFF 0x8 29 | #define MIDI_STATUS_NOTE_ON 0x9 30 | #define MIDI_STATUS_AFTERTOUCH 0xA 31 | #define MIDI_STATUS_CONTROLLER 0xB 32 | #define MIDI_STATUS_PROG_CHANGE 0xC 33 | #define MIDI_STATUS_PRESSURE 0xD 34 | #define MIDI_STATUS_PITCH_WHEEL 0xE 35 | #define MIDI_STATUS_SYSEX 0xF 36 | 37 | /* We store the midi events in a linked list; this way it is 38 | easy to shuffle the tracks together later on; and we are 39 | flexible in the size of each elemnt. 40 | */ 41 | typedef struct MIDIEvent 42 | { 43 | Uint32 time; /* Time at which this midi events occurs */ 44 | Uint8 status; /* Status byte */ 45 | Uint8 data[2]; /* 1 or 2 bytes additional data for most events */ 46 | 47 | Uint32 extraLen; /* For some SysEx events, we need additional storage */ 48 | Uint8 *extraData; 49 | 50 | struct MIDIEvent *next; 51 | } MIDIEvent; 52 | 53 | 54 | /* Load a midifile to memory, converting it to a list of MIDIEvents. 55 | This function returns a linked lists of MIDIEvents, 0 if an error occured. 56 | */ 57 | MIDIEvent *CreateMIDIEventList(SDL_IOStream *src, Uint16 *division); 58 | 59 | /* Release a MIDIEvent list after usage. */ 60 | void FreeMIDIEventList(MIDIEvent *head); 61 | 62 | 63 | #endif /* _NATIVE_MIDI_COMMON_H_ */ 64 | -------------------------------------------------------------------------------- /src/codecs/stb_vorbis/README.txt: -------------------------------------------------------------------------------- 1 | stb 2 | ------------------- 3 | single-file public domain (or MIT licensed) libraries for C/C++ 4 | ------------------- 5 | https://github.com/nothings/stb 6 | ------------------- 7 | stv_vorbis.c (renamed into h) version 1.22 8 | 9 | decode ogg vorbis files from file/memory to float/16-bit signed output 10 | -------------------------------------------------------------------------------- /src/codecs/timidity/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := timidity 6 | 7 | LOCAL_C_INCLUDES := 8 | 9 | LOCAL_CFLAGS := 10 | 11 | LOCAL_SRC_FILES += \ 12 | common.c \ 13 | instrum.c \ 14 | mix.c \ 15 | output.c \ 16 | playmidi.c \ 17 | readmidi.c \ 18 | resample.c \ 19 | tables.c \ 20 | timidity.c 21 | 22 | LOCAL_SHARED_LIBRARIES := SDL3 23 | 24 | include $(BUILD_STATIC_LIBRARY) 25 | -------------------------------------------------------------------------------- /src/codecs/timidity/CHANGES: -------------------------------------------------------------------------------- 1 | This version of TiMidity should contain all the fixes from the 2 | September 25 2003 SDL_mixer CVS snapshot. In addition, I've made some 3 | changes of my own, e.g.: 4 | 5 | * All file access is done through SDL_IOStream. This means the MIDI 6 | stream no longer has to be a file. (The config file and instruments 7 | still have to be though.) 8 | 9 | * Replacing of TiMidity's endian-handling with SDL's. 10 | 11 | * Removal of much unused or unnecessary code, such as 12 | 13 | + The "hooks" for putting a user interface onto TiMidity. 14 | + The antialias filter. It wasn't active, and even at 4 kHz I 15 | couldn't hear any difference when activating it. 16 | + Removed all traces of LOOKUP_HACK and LOOKUP_INTERPOLATION. 17 | According to the code comments they weren't very good anyway. 18 | ("degrades sound quality noticeably"). I also removed the 19 | disclaimer about the "8-bit uLaw to 16-bit PCM and the 13-bit-PCM 20 | to 8-bit uLaw tables" disclaimer, since I believe those were the 21 | tables I removed. 22 | + Removed LOOKUP_SINE since it was already commented out. I think we 23 | can count on our target audience having math co-processors 24 | nowadays. 25 | + Removed USE_LDEXP since it wasn't being used and "it doesn't make 26 | much of a difference either way". 27 | + Removed decompress hack from open_file() since it didn't look very 28 | portable. 29 | + Removed heaps of unnecessary constants. 30 | + Removed unused functions. 31 | + Assume that LINEAR_INTERPOLATION is always used, so remove all 32 | code dealing with it not being so. It's not that I think the 33 | difference in audio quality is that great, but since it wouldn't 34 | compile without code changes I assume no one's used it for quite 35 | some time... 36 | + Assume PRECALC_LOOPS is always defined. Judging by the comments it 37 | may not make much of a difference either way, so why maintain two 38 | versions of the same code? 39 | 40 | * Moving several static globals into the MidiSong struct. This 41 | includes sample rate, formate, etc. which are now all per-song. 42 | 43 | * Moved some typedefs (e.g. MidiSong) to timidity.h for easy inclusion 44 | into the MIDI decoder. 45 | 46 | * Added free_pathlist(). 47 | 48 | * Replaced TiMidity's own 8, 16 and 32-bit types with SDL's. 49 | 50 | * Made TiMidity look for its configuration file in both /etc and 51 | /usr/local/lib/timidity. (Windows version remains unchanged.) 52 | 53 | * Timidity_PlaySome() now takes three arguments. A MidiSong, a decode 54 | buffer and decode buffer size in bytes. (MidiSong is a new argument, 55 | and buffer size used to be in samples.) 56 | 57 | In addition, it will return the number of bytes decoded. 58 | 59 | * Added Timidity_Exit(). 60 | 61 | * Removed Timidity_Stop() and Timidity_Active(). Stopping playback 62 | should be handled by SDL_sound, and Timidity_PlaySome() will return 63 | 0 when the MIDI stream is finished. 64 | 65 | * Modified the ToneBank stuff to allow some data to be shared between 66 | MidiSongs. 67 | 68 | * The following files have been removed: controls.c, controls.h, 69 | filter.c, filter.h, sdl_a.c, sdl_c.c 70 | 71 | * config.h has been renamed as options.h to avoid confusion with the 72 | automatically generated config.h for SDL_sound. 73 | 74 | * Added support for loading DLS format instruments: 75 | Timidity_LoadDLS(), Timidity_FreeDLS(), Timidity_LoadDLSSong() 76 | 77 | * Added Timidity_Init_NoConfig() 78 | -------------------------------------------------------------------------------- /src/codecs/timidity/README: -------------------------------------------------------------------------------- 1 | [This version of timidity has been stripped for simplicity in porting to SDL, 2 | and then even further for SDL_sound] 3 | ---------------------------------*-text-*--------------------------------- 4 | 5 | From http://www.cgs.fi/~tt/discontinued.html : 6 | 7 | If you'd like to continue hacking on TiMidity, feel free. I'm 8 | hereby extending the TiMidity license agreement: you can now 9 | select the most convenient license for your needs from (1) the 10 | GNU GPL, (2) the GNU LGPL, or (3) the Perl Artistic License. 11 | 12 | -------------------------------------------------------------------------- 13 | 14 | This is the README file for TiMidity v0.2i 15 | 16 | TiMidity is a MIDI to WAVE converter that uses Gravis 17 | Ultrasound(*)-compatible patch files to generate digital audio data 18 | from General MIDI files. The audio data can be played through any 19 | sound device or stored on disk. On a fast machine, music can be 20 | played in real time. TiMidity runs under Linux, FreeBSD, HP-UX, SunOS, and 21 | Win32, and porting to other systems with gcc should be easy. 22 | 23 | TiMidity Features: 24 | 25 | * 32 or more dynamically allocated fully independent voices 26 | * Compatibility with GUS patch files 27 | * Output to 16- or 8-bit PCM or uLaw audio device, file, or 28 | stdout at any sampling rate 29 | * Optional interactive mode with real-time status display 30 | under ncurses and SLang terminal control libraries. Also 31 | a user friendly motif interface since version 0.2h 32 | * Support for transparent loading of compressed MIDI files and 33 | patch files 34 | 35 | * Support for the following MIDI events: 36 | - Program change 37 | - Key pressure 38 | - Channel main volume 39 | - Tempo 40 | - Panning 41 | - Damper pedal (Sustain) 42 | - Pitch wheel 43 | - Pitch wheel sensitivity 44 | - Change drum set 45 | 46 | * TiMidity requires sampled instruments (patches) to play MIDI files. You 47 | should get the file "timidity-lib-0.1.tar.gz" and unpack it in the same 48 | directory where you unpacked the source code archive. You'll want more 49 | patches later -- read the file "FAQ" for pointers. 50 | 51 | * Timidity is no longer supported, but can be found by searching the web. 52 | 53 | 54 | Tuukka Toivonen 55 | 56 | [(*) Any Registered Trademarks used anywhere in the documentation or 57 | source code for TiMidity are acknowledged as belonging to their 58 | respective owners.] 59 | -------------------------------------------------------------------------------- /src/codecs/timidity/TODO: -------------------------------------------------------------------------------- 1 | * I don't like the indentation style at all, but for the most part 2 | I've left it alone. 3 | 4 | * Much of the code looks ugly to me. 5 | 6 | * Group the members of MidiSong into logical units, i.e. structs? 7 | 8 | * The debug messages are probably a bit too noisy. I've removed one 9 | particularly annoying one, but... 10 | 11 | Some of them should be turned into error messages instead. 12 | 13 | * Can the instrument handling be made more efficient? At the moment 14 | different MidiSongs may separately load the same instrument. 15 | 16 | Note that the MidiSong's audio format affects how the instrument is 17 | loaded, so it's not as easy as just letting all MidiSongs share tone 18 | and drum banks. 19 | 20 | At the moment they do share the data that is simply read from the 21 | config file, but that's just a quick hack to avoid having to read 22 | the config file every time a MIDI song is loaded. 23 | 24 | * Check if any of MidiStruct's members can safely be made into static 25 | globals again. 26 | 27 | * TiMidity++ adds a number of undocumented (?) extensions to the 28 | configuration syntax. These are not implemented here. In particular, 29 | the "map" keyword used by the "eawpats". 30 | 31 | * The other decoders generally only read as much of the file as is 32 | necessary. Could we do that in this decoder as well? (Currently it 33 | seems to convert the entire file into MIDI events first.) 34 | 35 | * Can it be optimized? 36 | -------------------------------------------------------------------------------- /src/codecs/timidity/common.c: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | common.c 9 | */ 10 | 11 | #include 12 | 13 | #include "options.h" 14 | #include "common.h" 15 | 16 | #if defined(_WIN32) 17 | #define CHAR_DIRSEP '\\' 18 | #define is_dirsep(c) ((c) == '/' || (c) == '\\') 19 | #define is_abspath(p) ((p)[0] == '/' || (p)[0] == '\\' || ((p)[0] && (p)[1] == ':')) 20 | #else /* unix: */ 21 | #define CHAR_DIRSEP '/' 22 | #define is_dirsep(c) ((c) == '/') 23 | #define is_abspath(p) ((p)[0] == '/') 24 | #endif 25 | 26 | /* The paths in this list will be tried whenever we're reading a file */ 27 | typedef struct _PathList { 28 | char *path; 29 | struct _PathList *next; 30 | } PathList; 31 | 32 | static PathList *pathlist = NULL; 33 | 34 | /* This is meant to find and open files for reading */ 35 | SDL_IOStream *timi_openfile(const char *name) 36 | { 37 | SDL_IOStream *io; 38 | 39 | if (!name || !(*name)) { 40 | SNDDBG(("Attempted to open nameless file.\n")); 41 | return NULL; 42 | } 43 | 44 | /* First try the given name */ 45 | 46 | SNDDBG(("Trying to open %s\n", name)); 47 | if ((io = SDL_IOFromFile(name, "rb")) != NULL) 48 | return io; 49 | 50 | if (!is_abspath(name)) 51 | { 52 | char current_filename[1024]; 53 | PathList *plp = pathlist; 54 | char *p; 55 | size_t l; 56 | 57 | while (plp) { /* Try along the path then */ 58 | *current_filename = 0; 59 | p = current_filename; 60 | l = SDL_strlen(plp->path); 61 | if(l >= sizeof(current_filename) - 3) l = 0; 62 | if(l) { 63 | SDL_memcpy(current_filename, plp->path, l); 64 | p += l; 65 | if(!is_dirsep(p[-1])) { 66 | *p++ = CHAR_DIRSEP; 67 | l++; 68 | } 69 | } 70 | SDL_strlcpy(p, name, sizeof(current_filename) - l); 71 | SNDDBG(("Trying to open %s\n", current_filename)); 72 | if ((io = SDL_IOFromFile(current_filename, "rb"))) 73 | return io; 74 | plp = plp->next; 75 | } 76 | } 77 | 78 | /* Nothing could be opened. */ 79 | SNDDBG(("Could not open %s\n", name)); 80 | return NULL; 81 | } 82 | 83 | /* This adds a directory to the path list */ 84 | int timi_add_pathlist(const char *s, size_t l) 85 | { 86 | PathList *plp = SDL_malloc(sizeof(PathList)); 87 | if (plp == NULL) return -2; 88 | plp->path = SDL_malloc(l + 1); 89 | if (plp->path == NULL) { 90 | SDL_free (plp); 91 | return -2; 92 | } 93 | SDL_memcpy(plp->path, s, l); 94 | plp->path[l] = 0; 95 | plp->next = pathlist; 96 | pathlist = plp; 97 | return 0; 98 | } 99 | 100 | void timi_free_pathlist(void) 101 | { 102 | PathList *plp = pathlist; 103 | PathList *next; 104 | 105 | while (plp) { 106 | next = plp->next; 107 | SDL_free(plp->path); 108 | SDL_free(plp); 109 | plp = next; 110 | } 111 | pathlist = NULL; 112 | } 113 | -------------------------------------------------------------------------------- /src/codecs/timidity/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | common.h 9 | */ 10 | 11 | #ifndef TIMIDITY_COMMON_H 12 | #define TIMIDITY_COMMON_H 13 | 14 | extern SDL_IOStream *timi_openfile(const char *name); 15 | 16 | /* pathlist funcs only to be used during Timidity_Init/Timidity_Exit */ 17 | extern int timi_add_pathlist(const char *s, size_t len); 18 | extern void timi_free_pathlist(void); 19 | 20 | /* hide private symbols by prefixing with "_timi_" */ 21 | #undef TIMI_NAMESPACE 22 | #define TIMI_NAMESPACE(x) _timi_ ## x 23 | 24 | /* debug output */ 25 | #ifdef DEBUG_CHATTER 26 | #define SNDDBG(X) SDL_Log X 27 | #else 28 | #define SNDDBG(X) 29 | #endif 30 | 31 | #endif /* TIMIDITY_COMMON_H */ 32 | -------------------------------------------------------------------------------- /src/codecs/timidity/instrum.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | instrum.h 9 | */ 10 | 11 | #ifndef TIMIDITY_INSTRUM_H 12 | #define TIMIDITY_INSTRUM_H 13 | 14 | /* Bits in modes: */ 15 | #define MODES_16BIT (1<<0) 16 | #define MODES_UNSIGNED (1<<1) 17 | #define MODES_LOOPING (1<<2) 18 | #define MODES_PINGPONG (1<<3) 19 | #define MODES_REVERSE (1<<4) 20 | #define MODES_SUSTAIN (1<<5) 21 | #define MODES_ENVELOPE (1<<6) 22 | 23 | /* A hack to delay instrument loading until after reading the 24 | entire MIDI file. */ 25 | #define MAGIC_LOAD_INSTRUMENT ((Instrument *) (-1)) 26 | 27 | #define SPECIAL_PROGRAM -1 28 | 29 | #define load_missing_instruments TIMI_NAMESPACE(load_missing_instruments) 30 | #define free_instruments TIMI_NAMESPACE(free_instruments) 31 | #define set_default_instrument TIMI_NAMESPACE(set_default_instrument) 32 | 33 | extern int load_missing_instruments(MidiSong *song); 34 | extern void free_instruments(MidiSong *song); 35 | extern int set_default_instrument(MidiSong *song, const char *name); 36 | 37 | #endif /* TIMIDITY_INSTRUM_H */ 38 | -------------------------------------------------------------------------------- /src/codecs/timidity/mix.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | mix.h 9 | */ 10 | 11 | #ifndef TIMIDITY_MIX_H 12 | #define TIMIDITY_MIX_H 13 | 14 | #define mix_voice TIMI_NAMESPACE(mix_voice) 15 | #define recompute_envelope TIMI_NAMESPACE(recompute_envelope) 16 | #define apply_envelope_to_amp TIMI_NAMESPACE(apply_envelope_to_amp) 17 | 18 | extern void mix_voice(MidiSong *song, Sint32 *buf, int v, Sint32 c); 19 | extern int recompute_envelope(MidiSong *song, int v); 20 | extern void apply_envelope_to_amp(MidiSong *song, int v); 21 | 22 | #endif /* TIMIDITY_MIX_H */ 23 | -------------------------------------------------------------------------------- /src/codecs/timidity/output.c: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | output.c 9 | 10 | Audio output (to file / device) functions. 11 | */ 12 | 13 | #include 14 | 15 | #include "options.h" 16 | #include "output.h" 17 | 18 | /*****************************************************************/ 19 | /* Some functions to convert signed 32-bit data to other formats */ 20 | 21 | void timi_s32tos8(void *dp, Sint32 *lp, Sint32 c) 22 | { 23 | Sint8 *cp=(Sint8 *)(dp); 24 | Sint32 l; 25 | while (c--) 26 | { 27 | l=(*lp++)>>(32-8-GUARD_BITS); 28 | if (l>127) l=127; 29 | else if (l<-128) l=-128; 30 | *cp++ = (Sint8) (l); 31 | } 32 | } 33 | 34 | void timi_s32tou8(void *dp, Sint32 *lp, Sint32 c) 35 | { 36 | Uint8 *cp=(Uint8 *)(dp); 37 | Sint32 l; 38 | while (c--) 39 | { 40 | l=(*lp++)>>(32-8-GUARD_BITS); 41 | if (l>127) l=127; 42 | else if (l<-128) l=-128; 43 | *cp++ = 0x80 ^ ((Uint8) l); 44 | } 45 | } 46 | 47 | void timi_s32tos16(void *dp, Sint32 *lp, Sint32 c) 48 | { 49 | Sint16 *sp=(Sint16 *)(dp); 50 | Sint32 l; 51 | while (c--) 52 | { 53 | l=(*lp++)>>(32-16-GUARD_BITS); 54 | if (l > 32767) l=32767; 55 | else if (l<-32768) l=-32768; 56 | *sp++ = (Sint16)(l); 57 | } 58 | } 59 | 60 | void timi_s32tos16x(void *dp, Sint32 *lp, Sint32 c) 61 | { 62 | Sint16 *sp=(Sint16 *)(dp); 63 | Sint32 l; 64 | while (c--) 65 | { 66 | l=(*lp++)>>(32-16-GUARD_BITS); 67 | if (l > 32767) l=32767; 68 | else if (l<-32768) l=-32768; 69 | *sp++ = SDL_Swap16((Sint16)(l)); 70 | } 71 | } 72 | 73 | void timi_s32tof32(void *dp, Sint32 *lp, Sint32 c) 74 | { 75 | float *sp=(float *)(dp); 76 | while (c--) 77 | { 78 | *sp++ = (float)(*lp++) / 2147483647.0f; 79 | } 80 | } 81 | 82 | void timi_s32tos32(void *dp, Sint32 *lp, Sint32 c) 83 | { 84 | Sint32 *sp=(Sint32 *)(dp); 85 | while (c--) 86 | { 87 | *sp++ = (*lp++); 88 | } 89 | } 90 | 91 | void timi_s32tos32x(void *dp, Sint32 *lp, Sint32 c) 92 | { 93 | Sint32 *sp=(Sint32 *)(dp); 94 | while (c--) 95 | { 96 | *sp++ = SDL_Swap32(*lp++); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/codecs/timidity/output.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | output.h 9 | */ 10 | 11 | #ifndef TIMIDITY_OUTPUT_H 12 | #define TIMIDITY_OUTPUT_H 13 | 14 | /* Data format encoding bits */ 15 | 16 | #define PE_MONO 0x01 /* versus stereo */ 17 | #define PE_SIGNED 0x02 /* versus unsigned */ 18 | #define PE_16BIT 0x04 /* versus 8-bit */ 19 | #define PE_32BIT 0x08 /* versus 8-bit or 16-bit */ 20 | 21 | /* Conversion functions -- These overwrite the Sint32 data in *lp with 22 | data in another format */ 23 | 24 | /* 8-bit signed and unsigned*/ 25 | extern void timi_s32tos8(void *dp, Sint32 *lp, Sint32 c); 26 | extern void timi_s32tou8(void *dp, Sint32 *lp, Sint32 c); 27 | 28 | /* 16-bit */ 29 | extern void timi_s32tos16(void *dp, Sint32 *lp, Sint32 c); 30 | 31 | /* byte-exchanged 16-bit */ 32 | extern void timi_s32tos16x(void *dp, Sint32 *lp, Sint32 c); 33 | 34 | /* 32-bit */ 35 | extern void timi_s32tof32(void *dp, Sint32 *lp, Sint32 c); 36 | extern void timi_s32tos32(void *dp, Sint32 *lp, Sint32 c); 37 | 38 | /* byte-exchanged 32-bit */ 39 | extern void timi_s32tos32x(void *dp, Sint32 *lp, Sint32 c); 40 | 41 | /* little-endian and big-endian specific */ 42 | #if SDL_BYTEORDER == SDL_LIL_ENDIAN 43 | #define timi_s32tos16l timi_s32tos16 44 | #define timi_s32tos16b timi_s32tos16x 45 | #define timi_s32tos32l timi_s32tos32 46 | #define timi_s32tos32b timi_s32tos32x 47 | #else 48 | #define timi_s32tos16l timi_s32tos16x 49 | #define timi_s32tos16b timi_s32tos16 50 | #define timi_s32tos32l timi_s32tos32x 51 | #define timi_s32tos32b timi_s32tos32 52 | #endif 53 | 54 | #endif /* TIMIDITY_OUTPUT_H */ 55 | -------------------------------------------------------------------------------- /src/codecs/timidity/playmidi.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | playmidi.h 9 | */ 10 | 11 | #ifndef TIMIDITY_PLAYMIDI_H 12 | #define TIMIDITY_PLAYMIDI_H 13 | 14 | /* Midi events */ 15 | #define ME_NONE 0 16 | #define ME_NOTEON 1 17 | #define ME_NOTEOFF 2 18 | #define ME_KEYPRESSURE 3 19 | #define ME_MAINVOLUME 4 20 | #define ME_PAN 5 21 | #define ME_SUSTAIN 6 22 | #define ME_EXPRESSION 7 23 | #define ME_PITCHWHEEL 8 24 | #define ME_PROGRAM 9 25 | #define ME_TEMPO 10 26 | #define ME_PITCH_SENS 11 27 | 28 | #define ME_ALL_SOUNDS_OFF 12 29 | #define ME_RESET_CONTROLLERS 13 30 | #define ME_ALL_NOTES_OFF 14 31 | #define ME_TONE_BANK 15 32 | 33 | #define ME_LYRIC 16 34 | 35 | #define ME_EOT 99 36 | 37 | /* Causes the instrument's default panning to be used. */ 38 | #define NO_PANNING -1 39 | 40 | /* Voice status options: */ 41 | #define VOICE_FREE 0 42 | #define VOICE_ON 1 43 | #define VOICE_SUSTAINED 2 44 | #define VOICE_OFF 3 45 | #define VOICE_DIE 4 46 | 47 | /* Voice panned options: */ 48 | #define PANNED_MYSTERY 0 49 | #define PANNED_LEFT 1 50 | #define PANNED_RIGHT 2 51 | #define PANNED_CENTER 3 52 | /* Anything but PANNED_MYSTERY only uses the left volume */ 53 | 54 | #define ISDRUMCHANNEL(s, c) (((s)->drumchannels & (1<<(c)))) 55 | 56 | #endif /* TIMIDITY_PLAYMIDI_H */ 57 | -------------------------------------------------------------------------------- /src/codecs/timidity/readmidi.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | readmidi.h 9 | */ 10 | 11 | #ifndef TIMIDITY_READMIDI_H 12 | #define TIMIDITY_READMIDI_H 13 | 14 | #define read_midi_file TIMI_NAMESPACE(read_midi_file) 15 | 16 | extern MidiEvent *read_midi_file(MidiSong *song, Sint32 *count, Sint32 *sp); 17 | 18 | #endif /* TIMIDITY_READMIDI_H */ 19 | -------------------------------------------------------------------------------- /src/codecs/timidity/resample.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | resample.h 9 | */ 10 | 11 | #ifndef TIMIDITY_RESAMPLE_H 12 | #define TIMIDITY_RESAMPLE_H 13 | 14 | #define resample_voice TIMI_NAMESPACE(resample_voice) 15 | #define pre_resample TIMI_NAMESPACE(pre_resample) 16 | 17 | extern sample_t *resample_voice(MidiSong *song, int v, Sint32 *countptr); 18 | extern void pre_resample(MidiSong *song, Sample *sp); 19 | 20 | #endif /* TIMIDITY_RESAMPLE_H */ 21 | -------------------------------------------------------------------------------- /src/codecs/timidity/tables.h: -------------------------------------------------------------------------------- 1 | /* 2 | TiMidity -- Experimental MIDI to WAVE converter 3 | Copyright (C) 1995 Tuukka Toivonen 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the Perl Artistic License, available in COPYING. 7 | 8 | tables.h 9 | */ 10 | 11 | #ifndef TIMIDITY_TABLES_H 12 | #define TIMIDITY_TABLES_H 13 | 14 | #define timi_sine(x) (SDL_sin((2*PI/1024.0) * (x))) 15 | 16 | #define SINE_CYCLE_LENGTH 1024 17 | 18 | #define freq_table TIMI_NAMESPACE(freq_table) 19 | #define vol_table TIMI_NAMESPACE(vol_table) 20 | #define bend_fine TIMI_NAMESPACE(bend_fine) 21 | #define bend_coarse TIMI_NAMESPACE(bend_coarse) 22 | 23 | extern const Sint32 freq_table[]; 24 | extern const double vol_table[]; 25 | extern const double bend_fine[]; 26 | extern const double bend_coarse[]; 27 | 28 | #endif /* TIMIDITY_TABLES_H */ 29 | -------------------------------------------------------------------------------- /src/effects_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef INCLUDE_EFFECTS_INTERNAL_H_ 23 | #define INCLUDE_EFFECTS_INTERNAL_H_ 24 | 25 | #ifndef MIX_INTERNAL_EFFECT__ 26 | #error You should not include this file or use these functions. 27 | #endif 28 | 29 | #include 30 | 31 | extern int _Mix_effects_max_speed; 32 | extern void *_Eff_volume_table; 33 | void *_Eff_build_volume_table_u8(void); 34 | void *_Eff_build_volume_table_s8(void); 35 | 36 | void _Mix_InitEffects(void); 37 | void _Mix_DeinitEffects(void); 38 | void _Eff_PositionDeinit(void); 39 | 40 | bool _Mix_RegisterEffect_locked(int channel, Mix_EffectFunc_t f, Mix_EffectDone_t d, void *arg); 41 | bool _Mix_UnregisterEffect_locked(int channel, Mix_EffectFunc_t f); 42 | bool _Mix_UnregisterAllEffects_locked(int channel); 43 | 44 | #endif /* _INCLUDE_EFFECTS_INTERNAL_H_ */ 45 | -------------------------------------------------------------------------------- /src/mixer.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | #ifndef MIXER_H_ 22 | #define MIXER_H_ 23 | 24 | /* Locking wrapper functions */ 25 | extern void Mix_LockAudio(void); 26 | extern void Mix_UnlockAudio(void); 27 | 28 | extern void add_chunk_decoder(const char *decoder); 29 | 30 | #endif /* MIXER_H_ */ 31 | -------------------------------------------------------------------------------- /src/utils.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /* misc helper routines */ 23 | 24 | #include "utils.h" 25 | #include 26 | 27 | /* Is given tag a loop tag? */ 28 | bool _Mix_IsLoopTag(const char *tag) 29 | { 30 | char buf[5]; 31 | SDL_strlcpy(buf, tag, 5); 32 | return SDL_strcasecmp(buf, "LOOP") == 0; 33 | } 34 | 35 | /* Parse time string of the form HH:MM:SS.mmm and return equivalent sample 36 | * position */ 37 | Sint64 _Mix_ParseTime(char *time, long samplerate_hz) 38 | { 39 | char *num_start, *p; 40 | Sint64 result; 41 | char c; 42 | int val; 43 | 44 | /* Time is directly expressed as a sample position */ 45 | if (SDL_strchr(time, ':') == NULL) { 46 | return SDL_strtoll(time, NULL, 10); 47 | } 48 | 49 | result = 0; 50 | num_start = time; 51 | 52 | for (p = time; *p != '\0'; ++p) { 53 | if (*p == '.' || *p == ':') { 54 | c = *p; *p = '\0'; 55 | if ((val = SDL_atoi(num_start)) < 0) 56 | return -1; 57 | result = result * 60 + val; 58 | num_start = p + 1; 59 | *p = c; 60 | } 61 | 62 | if (*p == '.') { 63 | double val_f = SDL_atof(p); 64 | if (val_f < 0) return -1; 65 | return result * samplerate_hz + (Sint64) (val_f * samplerate_hz); 66 | } 67 | } 68 | 69 | if ((val = SDL_atoi(num_start)) < 0) return -1; 70 | return (result * 60 + val) * samplerate_hz; 71 | } 72 | -------------------------------------------------------------------------------- /src/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_mixer: An audio mixer library based on the SDL library 3 | Copyright (C) 1997-2025 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef UTILS_H_ 23 | #define UTILS_H_ 24 | 25 | /* misc helper routines */ 26 | 27 | #include 28 | 29 | /* Parse time string of the form HH:MM:SS.mmm and return equivalent sample 30 | * position */ 31 | extern Sint64 _Mix_ParseTime(char *time, long samplerate_hz); 32 | 33 | extern bool _Mix_IsLoopTag(const char *tag); 34 | 35 | #endif /* UTILS_H_ */ 36 | 37 | -------------------------------------------------------------------------------- /src/version.rc: -------------------------------------------------------------------------------- 1 | 2 | #include "winresrc.h" 3 | 4 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 5 | 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Version 9 | // 10 | 11 | VS_VERSION_INFO VERSIONINFO 12 | FILEVERSION 3,0,0,0 13 | PRODUCTVERSION 3,0,0,0 14 | FILEFLAGSMASK 0x3fL 15 | FILEFLAGS 0x0L 16 | FILEOS 0x40004L 17 | FILETYPE 0x2L 18 | FILESUBTYPE 0x0L 19 | BEGIN 20 | BLOCK "StringFileInfo" 21 | BEGIN 22 | BLOCK "040904b0" 23 | BEGIN 24 | VALUE "CompanyName", "\0" 25 | VALUE "FileDescription", "SDL_mixer\0" 26 | VALUE "FileVersion", "3, 0, 0, 0\0" 27 | VALUE "InternalName", "SDL_mixer\0" 28 | VALUE "LegalCopyright", "Copyright (C) 2025 Sam Lantinga\0" 29 | VALUE "OriginalFilename", "SDL3_mixer.dll\0" 30 | VALUE "ProductName", "Simple DirectMedia Layer\0" 31 | VALUE "ProductVersion", "3, 0, 0, 0\0" 32 | END 33 | END 34 | BLOCK "VarFileInfo" 35 | BEGIN 36 | VALUE "Translation", 0x409, 1200 37 | END 38 | END 39 | --------------------------------------------------------------------------------