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

Feature Request: Configurable audio receive tick interval #1009

Closed
tt2468 opened this issue Nov 19, 2023 · 6 comments · Fixed by #1040
Closed

Feature Request: Configurable audio receive tick interval #1009

tt2468 opened this issue Nov 19, 2023 · 6 comments · Fixed by #1040
Assignees

Comments

@tt2468
Copy link

tt2468 commented Nov 19, 2023

Is your feature request related to a problem? Please describe.
The current audio system processes new voice channel audio data on a hardcoded 500ms interval. For applications intending to use the resulting audio data as real-time as possible, this is a total blocker, as it results in a minimum of 500ms of audio latency.

Line in question:

constexpr std::chrono::milliseconds iteration_interval(500);

Describe the solution you'd like
Having the ability to set this interval manually would be very helpful. I've tested down to 10ms intervals and dpp::on_voice_receive with no issues.

Describe alternatives you've considered
There's no way to even receive the raw opus payloads directly. Alternative for me is to go back to discordgo (what I was previously using) in order to get realtime access to the RTP payloads as they come in.

Additional context
None

@Jaskowicz1
Copy link
Contributor

Hm, I like the sound of this! I guess it wouldn't be too hard to have something where the cluster could have something like bot.audio_interval(10). I'd like to see what others think of this and how we could implement it.

@Jaskowicz1
Copy link
Contributor

My only concern with implementing this is what you stated in #1008, it caused the audio data to be "completely garbled". Of course, we'd need to figure how to fix that 😅

@tt2468
Copy link
Author

tt2468 commented Nov 22, 2023

My only concern with implementing this is what you stated in #1008, it caused the audio data to be "completely garbled". Of course, we'd need to figure how to fix that 😅

Well I'm not sure that it's the tick rate causing garbled audio... I think it's probably something else, considering the release binaries don't work either.

@Jaskowicz1
Copy link
Contributor

Jaskowicz1 commented Nov 22, 2023 via email

@Jaskowicz1 Jaskowicz1 self-assigned this Dec 8, 2023
@Jaskowicz1 Jaskowicz1 linked a pull request Dec 8, 2023 that will close this issue
5 tasks
@Jaskowicz1
Copy link
Contributor

I've released a PR for this :)

@Jaskowicz1
Copy link
Contributor

The PR has been merged to implement this!

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 a pull request may close this issue.

2 participants