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

Fix resample audio buffer bug #37

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

aiaimimi0920
Copy link
Contributor

@aiaimimi0920 aiaimimi0920 commented Jan 10, 2024

hello, @fire @Ughuuu

I have not tested whether this code has issues in the project because I encountered the problem of silent audio when using similar code in another project

The specific reason for the issue is that, according to this documentation

"output_frames" corresponds to the Maximum number of frames pointed to by "data_out."

For example, when resampling from 16000 to 48000, you may encounter long segments of silent audio later on. In such cases, you need to use this code:
src_data.output_frames = int(p_src_frame_count * src_data.src_ratio);

@Ughuuu
Copy link
Collaborator

Ughuuu commented Jan 10, 2024

Ill test locally if it still works. Thanks for the pr.

@Ughuuu Ughuuu merged commit 46d3b2a into V-Sekai:main Jan 10, 2024
@aiaimimi0920 aiaimimi0920 deleted the fix_resample_audio_buffer_bug branch January 16, 2024 17:58
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.

2 participants