It appears that using voice receive has an unintuitive if not errornous requirement. Before being able to receive anything through the established UDP connection the client is expected to send an Opcode 5 Speaking update. The documentation does not reflect this in the slightest and this was unknown to me for weeks until someone mentioned this from the docs:
You must send at least one Opcode 5 Speaking payload before sending voice data, or you will be disconnected with an invalid SSRC error.
This got me curious and I decided to send a speaking update after finishing the session setup, where all i send is the ssrc and speaking set to 0 (none). All of a sudden no more issues were present and voice receive worked as "expected" once again. I'm not sure if this is at all intended behavior but this certainly should be documented together with voice receive (see #365).
Commit that fixed voice receive in JDA
It appears that using voice receive has an unintuitive if not errornous requirement. Before being able to receive anything through the established UDP connection the client is expected to send an Opcode 5 Speaking update. The documentation does not reflect this in the slightest and this was unknown to me for weeks until someone mentioned this from the docs:
This got me curious and I decided to send a speaking update after finishing the session setup, where all i send is the ssrc and speaking set to 0 (none). All of a sudden no more issues were present and voice receive worked as "expected" once again. I'm not sure if this is at all intended behavior but this certainly should be documented together with voice receive (see #365).
Commit that fixed voice receive in JDA