Fix voice_simple example
This commit is contained in:
parent
feb2b1b64c
commit
539460a552
File diff suppressed because it is too large
Load Diff
|
@ -22,11 +22,9 @@ use simplelog::{TermLogger, Config, WriteLogger};
|
||||||
use std::{net::SocketAddrV4, sync::Arc, fs::File, time::Duration};
|
use std::{net::SocketAddrV4, sync::Arc, fs::File, time::Duration};
|
||||||
|
|
||||||
use chorus::{
|
use chorus::{
|
||||||
gateway::{Observer, Gateway},
|
gateway::{Gateway, GatewayOptions, Observer},
|
||||||
types::{
|
types::{
|
||||||
GatewayReady, SelectProtocol, SelectProtocolData, SessionDescription, Snowflake, Speaking,
|
GatewayIdentifyPayload, GatewayReady, SelectProtocol, SelectProtocolData, SessionDescription, Snowflake, Speaking, SpeakingBitflags, SsrcDefinition, UpdateVoiceState, VoiceEncryptionMode, VoiceIdentify, VoiceProtocol, VoiceReady, VoiceServerUpdate
|
||||||
SpeakingBitflags, SsrcDefinition, VoiceEncryptionMode, VoiceIdentify, VoiceProtocol,
|
|
||||||
VoiceReady, VoiceServerUpdate, GatewayIdentifyPayload, UpdateVoiceState,
|
|
||||||
},
|
},
|
||||||
voice::{
|
voice::{
|
||||||
gateway::{VoiceGateway, VoiceGatewayHandle},
|
gateway::{VoiceGateway, VoiceGatewayHandle},
|
||||||
|
@ -219,7 +217,7 @@ impl Observer<Speaking> for VoiceHandler {
|
||||||
println!(
|
println!(
|
||||||
"Received Speaking! (SRRC: {}, flags: {:?})",
|
"Received Speaking! (SRRC: {}, flags: {:?})",
|
||||||
data.ssrc,
|
data.ssrc,
|
||||||
SpeakingBitflags::from_bits(data.speaking).unwrap()
|
SpeakingBitflags::from_bits(data.speaking.into()).unwrap()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,7 +251,7 @@ async fn main() {
|
||||||
])
|
])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let gateway = Gateway::spawn(GATEWAY_URL.to_string())
|
let gateway = Gateway::spawn(GATEWAY_URL.to_string(), GatewayOptions::default())
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue