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

Limit on number of audio samples processed is hardcoded #4

Open
unvermuthet opened this issue Jan 28, 2025 · 1 comment
Open

Limit on number of audio samples processed is hardcoded #4

unvermuthet opened this issue Jan 28, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@unvermuthet
Copy link
Owner

int processed_samples = Math::min(audio_frame.no_samples, 4096); // FIXME: dont hardcode this

This line of code clamps the number of processed samples to 4096. Pass too many samples to mix_audio and the following error is triggered. Note that 4096 refers to number of Float32 samples per audio channel.

gERROR: Condition "p_frames >= rb_len" is true.
   at: write (./servers/audio/audio_rb_resampler.h:119)

The max number of samples shouldn’t be hardcoded because it depends on the size of the audio buffer. Which audio buffer is unclear though. It could be related to the ms value in the Project settings under Audio Driver, it could be related to the „Buffering MSec“ value on the VideoStreamPlayer or it might even be limited by the buffer size on Godots Resampler. This would need some testing and engine code inspection, but the minimum between the first and second value mentioned might be a good start.

@unvermuthet unvermuthet added enhancement New feature or request good first issue Good for newcomers labels Jan 28, 2025
@unvermuthet
Copy link
Owner Author

unvermuthet commented Feb 6, 2025

The "Buffering Msec" property on the VideoStreamPlayer is inaccessible from inside the VideoStreamPlayerNDI Resource. Output latency value from ProjectSettings can be obtained thought.

@unvermuthet unvermuthet removed the good first issue Good for newcomers label Feb 6, 2025
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