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 1481 - Sound_GetDuration() backport to stable-1.0
Summary: Sound_GetDuration() backport to stable-1.0
Status: NEW
Alias: None
Product: SDL_sound
Classification: Unclassified
Component: everything (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Assignee: Ryan C. Gordon
QA Contact: Ryan C. Gordon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-22 16:47 UTC by Nikos Chantziaras
Modified: 2012-04-22 16:47 UTC (History)
0 users

See Also:


Attachments
Backport of Sound_DecodeAll() from development branch (24.72 KB, patch)
2012-04-22 16:47 UTC, Nikos Chantziaras
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2012-04-22 16:47:38 UTC
Created attachment 848 [details]
Backport of Sound_DecodeAll() from development branch

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

Note that binary compatibility with SDL_sound 1.0 is preserved.