[sdlsound] Sound_GetDuration() backport to stable-1.0

Nikos Chantziaras realnc at gmail.com
Sun Apr 22 19:38:02 EDT 2012


I was previously using SDL_sound for audio decoding in my apps and 
simply used Sound_DecodeAll() for the job.  That meant I could calculate 
the duration easily.  This was a horrible memory waster though (playing 
a few layered tracks simultaneously would eat up anywhere between 100 
and 300MB RAM.)

So I switched to Sound_Decode().  However, being able to tell the 
duration of the sample is critical.  Since SDL_sound might need some 
time for a proper release, I ported Sound_DecodeAll() from the 
development branch to the stable-1.0 branch.  It's a backport of these:

http://hg.icculus.org/icculus/SDL_sound/rev/c66080364dff
http://hg.icculus.org/icculus/SDL_sound/rev/3e705c9180e5

I am attaching the patch.  If possible, please push it to stable-1.0. 
Hopefully we will see a 1.0.4 release soon for distros to pick up?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample_duration.patch
Type: text/x-patch
Size: 25310 bytes
Desc: not available
URL: <http://icculus.org/pipermail/sdlsound/attachments/20120423/6b66f6ce/attachment.bin>


More information about the sdlsound mailing list