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

FLAC playback initially stutters #262

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

FLAC playback initially stutters #262

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

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: 2.0.4
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2019-06-21 10:06:47 +0000, Braden Obrzut wrote:

When playing a FLAC file the first frame will be repeated. This is caused by FLAC__stream_decoder_seek_absolute automatically processing a frame, which in turn causes the callback to be run which puts data on the audio stream. Since FLAC_Play calls FLAC_Seek the frame is decoded there, and then music_internal_play decides to also seek to 0 with music_internal_position causing the frame to be decoded a second time.

Given that all of the Play functions call Seek I'm not sure why music_internal_play needs to do a seek to 0. But removing that won't be perfect since if a position besides 0 is given the FLAC player will still decode the first frame before starting at the seeked position. Probably the correct solution is to clear the audio stream in FLAC_Seek.

On 2019-11-18 03:28:23 +0000, Michael Day wrote:

Created attachment 4059
Patch - music_flac.c - Fix Initial Stutter

I think the fix is as simple as clearing the audio stream before seeking. See the attached patch.

On 2019-11-18 04:51:10 +0000, Ozkan Sezer wrote:

Applied this patch: https://hg.libsdl.org/SDL_mixer/rev/7b663db4eef1

Braden Obrzut: Please make sure that this fixes your issue.

On 2019-12-03 11:59:37 +0000, Ozkan Sezer wrote:

No response from original bug reporter since two weeks. Closing
as fixed. Drop a note here if problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant