| Summary: | Add FLAC audio support | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Austen Dicken <cvpcsm> |
| Component: | misc | Assignee: | Austen Dicken <cvpcsm> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: |
Patch to add/modify files for FLAC support
Patch to add/modify files for FLAC support |
||
|
Description
Austen Dicken
2008-01-28 19:53:29 UTC
Sure, why not? Thanks! :) Good news! FLAC files are currently playing using the bundled "playmus" program! I still need to do a bit more testing as I know the load_flac.c file isn't working right, but I should have a patch for you by tonight or tomorrow! Great, thanks! Created attachment 247 [details]
Patch to add/modify files for FLAC support
Ok, here is the patch I made for FLAC support.
I have tested it relatively thoroughly and currently the patch allows:
1. Pre-loading FLAC files and playing them via LoadWAV
2. The patch allows for FLAC support in the LoadMUS setting as well as:
* Pause / Resume
* Volume control
* Seeking
I also did a little benchmarking by comparing memory/cpu usage of playmus to that of mplayer, and the results were very good. playmus typically took about half the RAM as mplayer, though that may be attributed to mplayer being a more "bulky" program. As such I would say that the two are probably about equal in efficiency.
Also, it is important to note that, similar to the OGG support currently built-in, my FLAC patch only supports 16 bit stereo-encoded sound. Also, it
is only for Native FLAC (standard) and not the derivative, Ogg-FLAC.
I have tried to find a simple way to detect Ogg-FLAC files, as the only difference between Ogg-FLAC and Native FLAC support is changing the init_ function call, but after digging a little deeper it seems that Ogg-FLAC is basically FLAC wrapped in an Ogg transport layer, so it would be better to have a way to read the Ogg transport layer which then reads the inner audio files according to the proper codec.
But anyway, that's another job for another day! For now this should provide Native FLAC support!
Created attachment 248 [details]
Patch to add/modify files for FLAC support
I was continuing my testing of this patch and noticed an error where I was calling .ogg instead of .flac in a particular music union structure.
I just had a quick question. I noticed that I have been assigned to this bug and was wondering what connotations that brings along with it. I am relatively new to the community development model and am not entirely sure of what my role is so far as what I should be doing to resolve this feature and the like. It's just an internal note so we don't assume that we're responsible for implementing the functionality. By providing a patch and serving as a contact for related bugs, you're fulfilling your role as assignee. We'll apply the patch and run some basic testing and verification of it. Thanks! This has been added to subversion. Thanks! Glad to be of assistance. :) |