Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FLAC audio support #38

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

Add FLAC audio support #38

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: unspecified
Reported for operating system, platform: Linux, x86

Comments on the original bug report:

On 2008-01-28 19:53:29 +0000, Austen Dicken wrote:

I was thinking it would be great to add support for the Free Lossless Audio Codec (FLAC), so I have been working on a patch to the current SVN checkout of SDL_mixer that would add support for it.

I am just kind of curious as to whether anyone thinks this would be a good idea? I am about 1/2 way done with the patch and then was going to start testing.

Any thoughts and/or suggestions would be greatly appreciated. ^.^

On 2008-01-28 21:13:16 +0000, Sam Lantinga wrote:

Sure, why not? Thanks! :)

On 2008-01-30 11:23:35 +0000, Austen Dicken wrote:

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!

On 2008-01-30 13:05:34 +0000, Sam Lantinga wrote:

Great, thanks!

On 2008-01-30 19:14:05 +0000, Austen Dicken wrote:

Created attachment 247
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!

On 2008-02-03 21:33:44 +0000, Austen Dicken wrote:

Created attachment 248
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.

On 2008-02-03 21:36:04 +0000, Austen Dicken wrote:

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.

On 2008-02-04 11:44:21 +0000, Sam Lantinga wrote:

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!

On 2008-02-26 23:31:58 +0000, Sam Lantinga wrote:

This has been added to subversion. Thanks!

On 2008-02-27 00:24:50 +0000, Austen Dicken wrote:

Glad to be of assistance. :)

@SDLBugzilla SDLBugzilla added the enhancement New feature or request label Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant