[][src]Trait serenity::voice::AudioSource

pub trait AudioSource: Send {
    fn is_stereo(&mut self) -> bool;
fn get_type(&self) -> AudioType;
fn read_pcm_frame(&mut self, buffer: &mut [i16]) -> Option<usize>;
fn read_opus_frame(&mut self) -> Option<Vec<u8>>;
fn decode_and_add_opus_frame(
        &mut self,
        float_buffer: &mut [f32; 1920],
        volume: f32
    ) -> Option<usize>; }

A readable audio source.

Required methods

fn is_stereo(&mut self) -> bool

fn get_type(&self) -> AudioType

fn read_pcm_frame(&mut self, buffer: &mut [i16]) -> Option<usize>

fn read_opus_frame(&mut self) -> Option<Vec<u8>>

fn decode_and_add_opus_frame(
    &mut self,
    float_buffer: &mut [f32; 1920],
    volume: f32
) -> Option<usize>

Loading content...

Implementors

Loading content...