pub enum AudioRecordingControlRequest {
PutInputAudio {
index: i32,
audio_data: Vec<u8>,
responder: AudioRecordingControlPutInputAudioResponder,
},
ClearInputAudio {
index: i32,
responder: AudioRecordingControlClearInputAudioResponder,
},
GetOutputAudio {
responder: AudioRecordingControlGetOutputAudioResponder,
},
StartInputInjection {
index: i32,
responder: AudioRecordingControlStartInputInjectionResponder,
},
StopInputInjection {
responder: AudioRecordingControlStopInputInjectionResponder,
},
StartOutputSave {
responder: AudioRecordingControlStartOutputSaveResponder,
},
StopOutputSave {
responder: AudioRecordingControlStopOutputSaveResponder,
},
}
Expand description
A protocol that supports audio input injection and audio capture.
Variants§
PutInputAudio
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.
ClearInputAudio
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.
GetOutputAudio
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.
Fields
StartInputInjection
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.
StopInputInjection
Stops inject audio data.
- response
error
a AudioRecordingError value indicating success or failure.
Fields
StartOutputSave
Start capturing audio output
- response
error
a AudioRecordingError value indicating success or failure.
Fields
StopOutputSave
Stops capturing the audio output.
Use GetOutputAudio
to get the latest audio capture.
- response
error
a AudioRecordingError value indicating success or failure.
Fields
Implementations§
Source§impl AudioRecordingControlRequest
impl AudioRecordingControlRequest
pub fn into_put_input_audio( self, ) -> Option<(i32, Vec<u8>, AudioRecordingControlPutInputAudioResponder)>
pub fn into_clear_input_audio( self, ) -> Option<(i32, AudioRecordingControlClearInputAudioResponder)>
pub fn into_get_output_audio( self, ) -> Option<AudioRecordingControlGetOutputAudioResponder>
pub fn into_start_input_injection( self, ) -> Option<(i32, AudioRecordingControlStartInputInjectionResponder)>
pub fn into_stop_input_injection( self, ) -> Option<AudioRecordingControlStopInputInjectionResponder>
pub fn into_start_output_save( self, ) -> Option<AudioRecordingControlStartOutputSaveResponder>
pub fn into_stop_output_save( self, ) -> Option<AudioRecordingControlStopOutputSaveResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioRecordingControlRequest
impl !RefUnwindSafe for AudioRecordingControlRequest
impl Send for AudioRecordingControlRequest
impl Sync for AudioRecordingControlRequest
impl Unpin for AudioRecordingControlRequest
impl !UnwindSafe for AudioRecordingControlRequest
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