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 - [patch] Add LoadSFX macro due to naming concerns.
Summary: [patch] Add LoadSFX macro due to naming concerns.
Status: ASSIGNED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.0
Hardware: x86_64 Mac OS X (All)
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-20 12:11 UTC by Jason Felds
Modified: 2017-10-13 06:09 UTC (History)
0 users

See Also:


Attachments
Patch to indicate to users that many audio file types can be used for sound effects. (1.04 KB, text/plain)
2015-06-20 12:11 UTC, Jason Felds
Details
Improved version of the SFX patcher: only three spots in play when I thought more. (1.05 KB, patch)
2015-06-20 12:19 UTC, Jason Felds
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!