pub struct AudioOutput { /* private fields */ }Expand description
Audio output state. The audio is received from each client over the network, decoded, merged and finally played to an AudioOutputDevice (e.g. speaker, headphones, …).
Implementations§
Source§impl AudioOutput
impl AudioOutput
pub fn new(output_volume: f32) -> Result<Self, AudioError>
Sourcepub fn load_sound_effects(&mut self, overrides: &[SoundEffect])
pub fn load_sound_effects(&mut self, overrides: &[SoundEffect])
Sets the sound effects according to some overrides, using some default value if an event isn’t overriden.
Sourcepub fn decode_packet_payload(
&self,
stream_type: VoiceStreamType,
session_id: u32,
payload: VoicePacketPayload,
)
pub fn decode_packet_payload( &self, stream_type: VoiceStreamType, session_id: u32, payload: VoicePacketPayload, )
Decodes a voice packet.
Sourcepub fn set_volume(&self, output_volume: f32)
pub fn set_volume(&self, output_volume: f32)
Sets the volume of the output device.
Sourcepub fn set_user_volume(&self, id: u32, volume: f32)
pub fn set_user_volume(&self, id: u32, volume: f32)
Sets the incoming volume of a user.
Sourcepub fn play_effect(&self, effect: NotificationEvents)
pub fn play_effect(&self, effect: NotificationEvents)
Queues a sound effect.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioOutput
impl !RefUnwindSafe for AudioOutput
impl !Send for AudioOutput
impl !Sync for AudioOutput
impl Unpin for AudioOutput
impl !UnwindSafe for AudioOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more