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

Calling .leave() during audio playing blocks audio playing on reconnection #56

Closed
JellyWX opened this issue Apr 9, 2021 · 4 comments · Fixed by #63
Closed

Calling .leave() during audio playing blocks audio playing on reconnection #56

JellyWX opened this issue Apr 9, 2021 · 4 comments · Fixed by #63
Labels
bug Something isn't working driver Relates to the driver or one of its sub-tasks.

Comments

@JellyWX
Copy link
Contributor

JellyWX commented Apr 9, 2021

When calling .leave() on a Call, if that call is already playing audio and the .leave() interrupts it, then upon rejoining the call, the bot will not play audio.

Calling .remove() instead to drop the call is fine

@FelixMcFelix FelixMcFelix added bug Something isn't working driver Relates to the driver or one of its sub-tasks. labels Apr 9, 2021
@FelixMcFelix
Copy link
Member

I updated my main bot to 0.1.5 (since I was awaiting a serenity version update) and have quickly repro'd and confirmed. I have a feeling this was introduced by #46.

@DoumanAsh
Copy link
Contributor

DoumanAsh commented Apr 10, 2021

I encountered similar situation with remove
If I call Call::stop and then Songbird::remove and then attempt to reconnect using Songbird::join

thread '<unnamed>' panicked at 'Shouldn't be mixing packets without access to a cipher + UDP dest.', C:\Users\Douman\data\Soft\Dev\rustup\cargo_home\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\songbird-0.1.5\src\driver\tasks\mixer.rs:492:14
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:493
   1: core::panicking::panic_fmt
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\core\src\panicking.rs:92
   2: core::option::expect_failed
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\core\src\option.rs:1292
   3: core::option::Option<mut songbird::driver::tasks::message::mixer::MixerConnection*>::expect<mut songbird::driver::tasks::message::mixer::MixerConnection*>
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\library\core\src\option.rs:349
   4: songbird::driver::tasks::mixer::Mixer::prep_and_send_packet
             at C:\Users\Douman\data\Soft\Dev\rustup\cargo_home\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\songbird-0.1.5\src\driver\tasks\mixer.rs:489
   5: songbird::driver::tasks::mixer::Mixer::cycle
             at C:\Users\Douman\data\Soft\Dev\rustup\cargo_home\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\songbird-0.1.5\src\driver\tasks\mixer.rs:478
   6: songbird::driver::tasks::mixer::Mixer::run
             at C:\Users\Douman\data\Soft\Dev\rustup\cargo_home\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\songbird-0.1.5\src\driver\tasks\mixer.rs:135
   7: songbird::driver::tasks::mixer::runner
             at C:\Users\Douman\data\Soft\Dev\rustup\cargo_home\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\songbird-0.1.5\src\driver\tasks\mixer.rs:629
   8: songbird::driver::tasks::start_internals::{{closure}}
             at C:\Users\Douman\data\Soft\Dev\rustup\cargo_home\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\songbird-0.1.5\src\driver\tasks\mod.rs:54

It becomes ok if I invoke TrackHandle::stop

@FelixMcFelix
Copy link
Member

I think I've figured out what the issue was: if you get the chance to confirm with this branch then that'd be great. 😄

@JellyWX
Copy link
Contributor Author

JellyWX commented Apr 10, 2021

Seems fixed to me, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working driver Relates to the driver or one of its sub-tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants