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

Playback hiccups with FLAC decoder #507

Open
jlama opened this issue Jan 8, 2025 · 3 comments
Open

Playback hiccups with FLAC decoder #507

jlama opened this issue Jan 8, 2025 · 3 comments

Comments

@jlama
Copy link
Contributor

jlama commented Jan 8, 2025

I randomly get a single audio hiccup (short pause) at the start of playback with the FLAC decoder.

Insufficient audio in ring buffer: 432 frames available, 470 requested

Not sure how to track this down. Any advice?

@sbooth
Copy link
Owner

sbooth commented Jan 8, 2025

Can you define hiccup? Does the decoding queue seem to starve the rendering block or does the decoder just take a minute to get started? Is this using debug or release mode?

@jlama
Copy link
Contributor Author

jlama commented Jan 8, 2025

The hiccup is a very small pause in the audio. I guess it's the extra padding added in the render block.
I only tested in debug mode so far. Last time it happened with the very first track played, so it's not a queuing issue.

The logs look like this when it happens:

Decoding started for <SFBFLACDecoder 0x60000217c480: "01 - Overture.flac">
Now playing changed to <SFBFLACDecoder 0x60000217c480: "01 - Overture.flac">
playback state changed: .playing
Rendering will start in 12.31 msec for <SFBFLACDecoder 0x60000217c480: "01 - Overture.flac">
Created <SFBFLACFile 0x6000009b3b80: "01 - Overture.flac"> based on score of 95
Rendering started notification for <SFBFLACDecoder 0x60000217c480: "01 - Overture.flac"> arrived 0.53 msec late
Insufficient audio in ring buffer: 96 frames available, 471 requested

It already happened 4-5 times but it's hard to reproduce.

@sbooth
Copy link
Owner

sbooth commented Jan 8, 2025

It's interesting that only 96 frames are in the ring buffer. Normally writes are chunked so that number seems a bit strange. The FLAC decoder should always produce the number of frames requested if they're in the file.

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

2 participants