Skip to main content

AndroidAutoAudioOutputTrait

Trait AndroidAutoAudioOutputTrait 

Source
pub trait AndroidAutoAudioOutputTrait {
    // Required methods
    fn open_output_channel<'life0, 'async_trait>(
        &'life0 self,
        t: AudioChannelType,
    ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn close_output_channel<'life0, 'async_trait>(
        &'life0 self,
        t: AudioChannelType,
    ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn receive_output_audio<'life0, 'async_trait>(
        &'life0 self,
        t: AudioChannelType,
        data: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start_output_audio<'life0, 'async_trait>(
        &'life0 self,
        t: AudioChannelType,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stop_output_audio<'life0, 'async_trait>(
        &'life0 self,
        t: AudioChannelType,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

This trait is implemented by users that have audio output capabilities

Required Methods§

Source

fn open_output_channel<'life0, 'async_trait>( &'life0 self, t: AudioChannelType, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Opens the specified channel

Source

fn close_output_channel<'life0, 'async_trait>( &'life0 self, t: AudioChannelType, ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Closes the specified channel

Source

fn receive_output_audio<'life0, 'async_trait>( &'life0 self, t: AudioChannelType, data: Vec<u8>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receive a chunk of audio data for the specified channel

Source

fn start_output_audio<'life0, 'async_trait>( &'life0 self, t: AudioChannelType, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The specified audio channel will start

Source

fn stop_output_audio<'life0, 'async_trait>( &'life0 self, t: AudioChannelType, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The specified audio channel will stop

Implementors§