Skip to content

[Fix] When m_audio_pos overflows, m_audio_len should also increase in… #2855

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

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

Ivy233
Copy link
Contributor

@Ivy233 Ivy233 commented Mar 1, 2025

In audio_sync, m_audio_pos records the position that should be written from the SDL buffer callback, and m_audio_len records the length of the buffer that has been written.
When the m_audio buffer overflows, m_audio_len is directly set to the buffer length. Is it more reasonable to change this behavior to increase with m_audio_pos until the maximum value? Although this change cannot be realized when the audio stream is read-only or cleared, it seems to be more in line with its meaning?

… length instead of setting it directly to the buffer length.
@ggerganov ggerganov merged commit ef40950 into ggml-org:master Mar 7, 2025
@Ivy233 Ivy233 deleted the fix_common_sdl_m_audio_len branch March 10, 2025 01:53
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

Successfully merging this pull request may close these issues.

None yet

2 participants