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 156

Summary: Add function to define a raw sample for application-generated audio
Product: SDL_mixer Reporter: Patrice Mandin <patmandin>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: unspecified   
Hardware: All   
OS: All   
URL: http://www.libsdl.org/pipermail/sdl/2005-July/069516.html

Description Patrice Mandin 2006-03-07 13:48:13 UTC
SDL_mixer is meant to be a generic API to mix fx samples and music, but
there are two things in it that are missing (from my pov):

- the ability to define raw samples (i.e. not necessarily in one of
supported sample formats, like wav, aiff, voc, etc..): it just needs a
function where you pass a pointer to sample start, length, freq, format.

- the ability to play fx samples at the freq of the audio device,
whatever the fx freq is (i.e. specially when not a multiple of audio
device freq), like playing a 15KHz sample on a 48KHz device.
(See https://bugzilla.libsdl.org/show_bug.cgi?id=58 for more info)
Comment 1 Sam Lantinga 2006-05-07 13:34:02 UTC
(In reply to comment #0)
> SDL_mixer is meant to be a generic API to mix fx samples and music, but
> there are two things in it that are missing (from my pov):
> 
> - the ability to define raw samples (i.e. not necessarily in one of
> supported sample formats, like wav, aiff, voc, etc..): it just needs a
> function where you pass a pointer to sample start, length, freq, format.

You mean something like Mix_QuickLoad_RAW()?
The only difference here is that Mix_QuickLoad_RAW() assumes you've already converted the audio data to the output format, which IMHO is a good assumption - either you have pre-converted the data for efficiency, or your data is already all in the same format and you've opened the mixer with that format.
Comment 2 Sam Lantinga 2006-05-07 13:38:03 UTC

*** This bug has been marked as a duplicate of 58 ***