pub struct AudioRecordingControlSynchronousProxy { /* private fields */ }
Implementations§
Source§impl AudioRecordingControlSynchronousProxy
impl AudioRecordingControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<AudioRecordingControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<AudioRecordingControlEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn put_input_audio(
&self,
index: i32,
audio_data: &[u8],
___deadline: MonotonicInstant,
) -> Result<i32, Error>
pub fn put_input_audio( &self, index: i32, audio_data: &[u8], ___deadline: MonotonicInstant, ) -> Result<i32, Error>
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,
___deadline: MonotonicInstant,
) -> Result<AudioRecordingControlClearInputAudioResult, Error>
pub fn clear_input_audio( &self, index: i32, ___deadline: MonotonicInstant, ) -> Result<AudioRecordingControlClearInputAudioResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<Vmo, Error>
pub fn get_output_audio( &self, ___deadline: MonotonicInstant, ) -> Result<Vmo, Error>
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,
___deadline: MonotonicInstant,
) -> Result<AudioRecordingControlStartInputInjectionResult, Error>
pub fn start_input_injection( &self, index: i32, ___deadline: MonotonicInstant, ) -> Result<AudioRecordingControlStartInputInjectionResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<AudioRecordingControlStopInputInjectionResult, Error>
pub fn stop_input_injection( &self, ___deadline: MonotonicInstant, ) -> Result<AudioRecordingControlStopInputInjectionResult, Error>
Stops inject audio data.
- response
error
a AudioRecordingError value indicating success or failure.
Sourcepub fn start_output_save(
&self,
___deadline: MonotonicInstant,
) -> Result<AudioRecordingControlStartOutputSaveResult, Error>
pub fn start_output_save( &self, ___deadline: MonotonicInstant, ) -> Result<AudioRecordingControlStartOutputSaveResult, Error>
Start capturing audio output
- response
error
a AudioRecordingError value indicating success or failure.
Sourcepub fn stop_output_save(
&self,
___deadline: MonotonicInstant,
) -> Result<AudioRecordingControlStopOutputSaveResult, Error>
pub fn stop_output_save( &self, ___deadline: MonotonicInstant, ) -> Result<AudioRecordingControlStopOutputSaveResult, Error>
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 SynchronousProxy for AudioRecordingControlSynchronousProxy
impl SynchronousProxy for AudioRecordingControlSynchronousProxy
Source§type Proxy = AudioRecordingControlProxy
type Proxy = AudioRecordingControlProxy
Source§type Protocol = AudioRecordingControlMarker
type Protocol = AudioRecordingControlMarker
Proxy
controls.