Skip to content

Allow overriding protected methods on sfMusic and sfSoundStream #397

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Marioalexsan
Copy link
Member

@Marioalexsan Marioalexsan commented Apr 29, 2025

Fixes #394.

Implements overriding for protected methods in sfMusic and sfSoundStream by using the pattern described here.

The Chunk struct was also updated since the data types were different from the ones used in the C++ library:

// CSFML old struct
typedef struct
{
    int16_t*     samples;     ///< Pointer to the audio samples
    unsigned int sampleCount; ///< Number of samples pointed by Samples
} sfSoundStreamChunk;

// SFML's struct
struct Chunk
{
    const std::int16_t* samples{};     //!< Pointer to the audio samples
    std::size_t         sampleCount{}; //!< Number of samples pointed by Samples
};

Additionally, ci.yml was updated so that a newer version of CMake would be fetched. mirroring the current code in the SFML repo. Without this, CI would fail due to an unsupported old version (< 3.5) being fetched.

@eXpl0it3r eXpl0it3r added this to the 3.0 milestone Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Protected SFML Methods cannot be consumed by CSFML consumers
2 participants