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

Bot Leaves Before Song Finishes #295

Closed
JustOneMoreDog opened this issue Dec 6, 2021 · 2 comments
Closed

Bot Leaves Before Song Finishes #295

JustOneMoreDog opened this issue Dec 6, 2021 · 2 comments

Comments

@JustOneMoreDog
Copy link

Hi There!

I recently finished setting this bot up in my lab. It is working correctly and playing songs from YouTube and Spotify. However the bot will disconnect about 15 seconds prematurely. Is this because I set the buffer to 15 seconds aiode.preferences.native_audio_buffer=15000 ? Or is that just coincidence? Also, is there any way to keep the bot in the chat even when there is are no songs in the queue?

Thank You!

@robinfriedli
Copy link
Owner

That is not a coincidence ;) It most likely also means that pressing pause is delayed by 15 seconds, since it will continue to pull from the buffer. I believe lavaplayer fires the AudioEvent for reaching the end of the track when the last packet is pulled with no way of knowing whether it is buffered or not. A 15 seconds buffer is not exactly pratical, the point of the buffer is to avoid stutters caused by garbage collection pauses, if those reach 15 seconds you have some pretty big problems ;) The default of 400 ms is already really generous for most users. When only streaming to a handful of guilds you can actually easily get away without a native buffer at all. I'd recommend just leaving the default.

The bot always leaves after playing the last track in the queue.

@JustOneMoreDog
Copy link
Author

Sorry for the delayed response I missed the notification on your message. Awesome I will revert the bot back down to 400ms. Thank you!

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