pub struct AudioRecordingControlProxy { /* private fields */ }
Implementations§
source§impl AudioRecordingControlProxy
impl AudioRecordingControlProxy
sourcepub fn take_event_stream(&self) -> AudioRecordingControlEventStream
pub fn take_event_stream(&self) -> AudioRecordingControlEventStream
Get a Stream of events from the remote end of the AudioRecordingControl protocol
Panics
Panics if the event stream was already taken.
sourcepub fn put_input_audio(
&self,
index: i32,
audio_data: &[u8]
) -> QueryResponseFut<i32>
pub fn put_input_audio( &self, index: i32, audio_data: &[u8] ) -> QueryResponseFut<i32>
Writes and appends audio_data
at index
.
The first time this is called, an empty vector will be created, subsequent calls will
append to audio_data
to the same vector.
Use ClearInputAudio
to clear audio input data stored at index
.
- request
index
refers a specificaudio_data
input record. We can have multiple records. - request
audio_data
vector containing audio_data bytes.
- response
byte_count
the total number of bytes stored.
sourcepub fn clear_input_audio(
&self,
index: i32
) -> QueryResponseFut<AudioRecordingControlClearInputAudioResult>
pub fn clear_input_audio( &self, index: i32 ) -> QueryResponseFut<AudioRecordingControlClearInputAudioResult>
Clears audio data stored at index
.
If no data exists at index
nothing will get cleaned.
- request
index
refers a specificaudio_data
input record to clear.
- response
error
a AudioRecordingError value indicating success or failure.
sourcepub fn get_output_audio(&self) -> QueryResponseFut<Vmo>
pub fn get_output_audio(&self) -> QueryResponseFut<Vmo>
Returns the captured audio data in zx.handle.VMO
.
User should have first called StartOutputSave
and StopOutputSave
.
- request
audio_data
vmo containing the full captured audio data.
sourcepub fn start_input_injection(
&self,
index: i32
) -> QueryResponseFut<AudioRecordingControlStartInputInjectionResult>
pub fn start_input_injection( &self, index: i32 ) -> QueryResponseFut<AudioRecordingControlStartInputInjectionResult>
Starts inject audio data stored at index
.
Use PutInputAudio
to store audio data.
- request
index
refers a specificaudio_data
input record to clear.
- response
error
a AudioRecordingError value indicating success or failure.
sourcepub fn stop_input_injection(
&self
) -> QueryResponseFut<AudioRecordingControlStopInputInjectionResult>
pub fn stop_input_injection( &self ) -> QueryResponseFut<AudioRecordingControlStopInputInjectionResult>
Stops inject audio data.
- response
error
a AudioRecordingError value indicating success or failure.
sourcepub fn start_output_save(
&self
) -> QueryResponseFut<AudioRecordingControlStartOutputSaveResult>
pub fn start_output_save( &self ) -> QueryResponseFut<AudioRecordingControlStartOutputSaveResult>
Start capturing audio output
- response
error
a AudioRecordingError value indicating success or failure.
sourcepub fn stop_output_save(
&self
) -> QueryResponseFut<AudioRecordingControlStopOutputSaveResult>
pub fn stop_output_save( &self ) -> QueryResponseFut<AudioRecordingControlStopOutputSaveResult>
Stops capturing the audio output.
Use GetOutputAudio
to get the latest audio capture.
- response
error
a AudioRecordingError value indicating success or failure.
Trait Implementations§
source§impl AudioRecordingControlProxyInterface for AudioRecordingControlProxy
impl AudioRecordingControlProxyInterface for AudioRecordingControlProxy
type PutInputAudioResponseFut = QueryResponseFut<i32>
fn put_input_audio( &self, index: i32, audio_data: &[u8] ) -> Self::PutInputAudioResponseFut
type ClearInputAudioResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
fn clear_input_audio(&self, index: i32) -> Self::ClearInputAudioResponseFut
type GetOutputAudioResponseFut = QueryResponseFut<Vmo>
fn get_output_audio(&self) -> Self::GetOutputAudioResponseFut
type StartInputInjectionResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
fn start_input_injection( &self, index: i32 ) -> Self::StartInputInjectionResponseFut
type StopInputInjectionResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
fn stop_input_injection(&self) -> Self::StopInputInjectionResponseFut
type StartOutputSaveResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
fn start_output_save(&self) -> Self::StartOutputSaveResponseFut
type StopOutputSaveResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
fn stop_output_save(&self) -> Self::StopOutputSaveResponseFut
source§impl Clone for AudioRecordingControlProxy
impl Clone for AudioRecordingControlProxy
source§fn clone(&self) -> AudioRecordingControlProxy
fn clone(&self) -> AudioRecordingControlProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AudioRecordingControlProxy
impl Debug for AudioRecordingControlProxy
source§impl Proxy for AudioRecordingControlProxy
impl Proxy for AudioRecordingControlProxy
§type Protocol = AudioRecordingControlMarker
type Protocol = AudioRecordingControlMarker
Proxy
controls.