Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append library stsound #650

Open
wants to merge 3 commits into
base: SDL2
Choose a base branch
from
Open

Append library stsound #650

wants to merge 3 commits into from

Conversation

yozka
Copy link

@yozka yozka commented Dec 20, 2024

This file supports playing YM files ( Atari ST music file format )

@sezero
Copy link
Contributor

sezero commented Dec 20, 2024

The cmake'ry of that library seems confused a lot, therefore it doesn't instill much confidence in me.. Personally I don't think that this should be accepted, at least because that library isn't in any linux distributions if for nothing else. (Plus this kind of addition should have been made against SDL3_mixer, i.e. the main branch, but that the least of issues.)

@sezero
Copy link
Contributor

sezero commented Dec 27, 2024

I'm closing this. Maintainers can reopen if they think there is compelling reason to do so.

@sezero sezero closed this Dec 27, 2024
@slouken slouken reopened this Dec 27, 2024
@slouken
Copy link
Collaborator

slouken commented Dec 27, 2024

@yozka, can you retarget the main branch? This wouldn't go in for SDL2.

Copy link
Contributor

@madebr madebr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the less-then-ideal CMake support, I created arnaud-carre/StSound#9 that improves this.
We can always maintain those in our fork.

Comment on lines +835 to +840
target_compile_definitions(SDL2_mixer PRIVATE MUSIC_YM)
target_compile_definitions(SDL2_mixer PRIVATE YM_SAMPLE_LENGTH_SEC=0.1)
include(external/StSound/CMake/Utils.cmake)
add_subdirectory(external/StSound/StSoundLibrary EXCLUDE_FROM_ALL)
target_link_libraries(SDL2_mixer PRIVATE StSoundLibrary)
target_include_directories(SDL2_mixer PRIVATE external/StSound/StSoundLibrary)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only supports a vendored stdound library.
It should also support an already-installed library.

(stsound needs arnaud-carre/StSound#9 for this)

Comment on lines +638 to +642
if (SDL_memcmp(magic, "YM", 2) == 0)
return MUS_YM;
if (SDL_memcmp(magic + 2, "-lh5-", 5) == 0)
return MUS_YM;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment, and use curly braces.
It looks like the gme detection is not formatted correctly.

src/music.c Outdated Show resolved Hide resolved
@@ -0,0 +1,32 @@
/*
SDL_mixer: An audio mixer library based on the SDL library
Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check the copyright dates.

Anyways, these will be updated to 2025 in less then a week. So don't bother ;)

@yozka
Copy link
Author

yozka commented Dec 27, 2024

@yozka, can you retarget the main branch? This wouldn't go in for SDL2.

ok.

Unfortunately, the author of the stsound library is not responding to my requests. Therefore, I will be using a fork from madebr with the necessary fixes. This will allow us to continue working on the project and implement the required improvements. The pull request will be directed to the main branch.

Thank you for your understanding.

Best regards

@yozka yozka changed the base branch from SDL2 to main December 27, 2024 19:01
@yozka yozka changed the base branch from main to SDL2 December 27, 2024 19:01
Co-authored-by: Anonymous Maarten <[email protected]>
@yozka
Copy link
Author

yozka commented Dec 27, 2024

@madebr
can i ask you to name the sdl branch?
i want to refer to your corrected version

@madebr
Copy link
Contributor

madebr commented Dec 27, 2024

@madebr can i ask you to name the sdl branch? i want to refer to your corrected version

You can find it at the top of my pr:

madebr wants to merge 5 commits into arnaud-carre:main from madebr:prune-cmake-and-add-github-ci

prune-cmake-and-add-github-ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants