We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3028

Summary: [patch] Add LoadSFX macro due to naming concerns.
Product: SDL_mixer Reporter: Jason Felds <jafelds>
Component: miscAssignee: Sam Lantinga <slouken>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: 2.0.0   
Hardware: x86_64   
OS: Mac OS X (All)   
Attachments: Patch to indicate to users that many audio file types can be used for sound effects.
Improved version of the SFX patcher: only three spots in play when I thought more.

Description Jason Felds 2015-06-20 12:11:27 UTC
Created attachment 2195 [details]
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.
Comment 1 Jason Felds 2015-06-20 12:19:57 UTC
Created attachment 2196 [details]
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.
Comment 2 Sam Lantinga 2017-10-13 06:09:11 UTC
This is not a bad idea, I think when we rev the API we'll switch to these names.

Thanks!