SDL_mixer
SDL_mixer copied to clipboard
[patch] Add LoadSFX macro due to naming concerns.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
- ~~Patch to indicate to users that many audio file types can be used for sound effects. (loadSFX.diff, text/plain, 2015-06-20 12:11:27 +0000, 1064 bytes)~~
- Improved version of the SFX patcher: only three spots in play when I thought more. (loadSFX.diff, text/plain, 2015-06-20 12:19:57 +0000, 1080 bytes)
Reported in version: 2.0.0 Reported for operating system, platform: Mac OS X (All), x86_64
Comments on the original bug report:
On 2015-06-20 12:11:27 +0000, Jason Felds wrote:
Created attachment 2195 Patch to indicate to users that many audio file types can be used for sound effects.
I wish to use SDL2 for a future project, and I observered that the main method calls for loading music and sound effects are Mix_LoadMUS and Mix_LoadWAV respectively. According to http://sdl.beuc.net/sdl.wiki/Mix_LoadWAV, however, LoadWAV should be able to work with more than WAV files.
Version 2.0.4 of SDL should be out soon if it's not already. Changing the function names would not be the best plan. Instead, I'm offering the idea of alternative defines that should be clearer for most people coming into SDL to understand.
There is a chance that other defines should be added, but I wanted to focus on the ones that I believe most users would use at first.
On 2015-06-20 12:19:57 +0000, Jason Felds wrote:
Created attachment 2196 Improved version of the SFX patcher: only three spots in play when I thought more.
I only missed one other WAV call. This should cover them all. For some reason, I was thinking there was Mix_FreeWAV instead of Mix_FreeChunk.
On 2017-10-13 06:09:11 +0000, Sam Lantinga wrote:
This is not a bad idea, I think when we rev the API we'll switch to these names.
Thanks!