inside my connect() function and that seems to get me the events. I did the mapping by hand and it seems to work, even if what I did is probably the worst way to do it:
val userSsrcToUserIdMapping = ConcurrentHashMap<UInt, Snowflake>()
voiceConnection.streams
.incomingAudioFrames
.onEach { (userSsrc, audioFrame) ->
val userId = userSsrcToUserIdMapping[userSsrc] ?: run {
voiceGatewayEvents
.filterIsInstance<Speaking>()
.first { it.ssrc == userSsrc }
.userId
.also {
userSsrcToUserIdMapping[userSsrc] = it
}
}
val userSsrcToUserIdMapping = ConcurrentHashMap<UInt, Snowflake>()
voiceConnection.streams
.incomingAudioFrames
.onEach { (userSsrc, audioFrame) ->
val userId = userSsrcToUserIdMapping[userSsrc] ?: run {
Is that just using voiceConnection.voiceGateway.on<Speaking> { }? Doesn't seem to fire for me, is there something I need to configure to get that event?
Sorry for the late reply, but it does work. It seems like the issue was the size parameter in the ChannelProvider. If I just remove it, it works again. How weird... Thanks anyways.