SDL_mixer icon indicating copy to clipboard operation
SDL_mixer copied to clipboard

API/ABI change request for SDL3

Open klei1984 opened this issue 2 years ago • 2 comments

Hello,

I have a use case to play digital audio samples that have loop points. Loop points are supported by various digital formats, for example RIFF WAV files can store sample points in "smpl" chunks. E.g. the audio sample has a ramp up phase that plays once and then a relatively short segment follows that needs to be looped or repeated seamlessly until the sample is stopped by an API call. Loop points in music samples are supported for certain digital audio formats by SDL_mixer now, but the feature is not possible to do with Mix_Chunk samples without breaking the ABI as I was told.

Please consider to add some placeholder in the SDL_Chunk structure to allow later addition of support for loop points in digital audio samples that are not music.

Alternative suggestion: Please unify or merge the digital non music and digital music playback API. This way there is a single interface to play any type of digital audio with optional support for loop points. One historical API that worked that way is HMI Sound Operating System for which the API specification can be found here for an example.

Thanks.

klei1984 avatar Dec 30 '22 19:12 klei1984

Yes, this seems like a good idea for SDL_mixer 3.0. Feel free to submit a proposal.

slouken avatar Dec 31 '22 17:12 slouken

Seems thins thing is related to https://github.com/WohlSoft/SDL-Mixer-X/issues/42 . So, one possible way is making Mix_Chunk being an opaque thing (and for these advanced folks who still wants direct access to PCM data inside the chunk, provide related API calls).

Wohlstand avatar Apr 24 '23 22:04 Wohlstand