pub struct AudioRecordingControlProxy { /* private fields */ }
Implementations§
Source§impl AudioRecordingControlProxy
impl AudioRecordingControlProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.test.audio.recording/AudioRecordingControl.
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 protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn put_input_audio(
&self,
index: i32,
audio_data: &[u8],
) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
pub fn put_input_audio( &self, index: i32, audio_data: &[u8], ) -> QueryResponseFut<i32, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn clear_input_audio( &self, index: i32, ) -> QueryResponseFut<AudioRecordingControlClearInputAudioResult, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn get_output_audio( &self, ) -> QueryResponseFut<Vmo, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn start_input_injection( &self, index: i32, ) -> QueryResponseFut<AudioRecordingControlStartInputInjectionResult, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn stop_input_injection( &self, ) -> QueryResponseFut<AudioRecordingControlStopInputInjectionResult, DefaultFuchsiaResourceDialect>
Stops inject audio data.
- response
error
a AudioRecordingError value indicating success or failure.
Sourcepub fn start_output_save(
&self,
) -> QueryResponseFut<AudioRecordingControlStartOutputSaveResult, DefaultFuchsiaResourceDialect>
pub fn start_output_save( &self, ) -> QueryResponseFut<AudioRecordingControlStartOutputSaveResult, DefaultFuchsiaResourceDialect>
Start capturing audio output
- response
error
a AudioRecordingError value indicating success or failure.
Sourcepub fn stop_output_save(
&self,
) -> QueryResponseFut<AudioRecordingControlStopOutputSaveResult, DefaultFuchsiaResourceDialect>
pub fn stop_output_save( &self, ) -> QueryResponseFut<AudioRecordingControlStopOutputSaveResult, DefaultFuchsiaResourceDialect>
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>
type ClearInputAudioResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
type GetOutputAudioResponseFut = QueryResponseFut<Vmo>
type StartInputInjectionResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
type StopInputInjectionResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
type StartOutputSaveResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
type StopOutputSaveResponseFut = QueryResponseFut<Result<(), AudioRecordingError>>
fn put_input_audio( &self, index: i32, audio_data: &[u8], ) -> Self::PutInputAudioResponseFut
fn clear_input_audio(&self, index: i32) -> Self::ClearInputAudioResponseFut
fn get_output_audio(&self) -> Self::GetOutputAudioResponseFut
fn start_input_injection( &self, index: i32, ) -> Self::StartInputInjectionResponseFut
fn stop_input_injection(&self) -> Self::StopInputInjectionResponseFut
fn start_output_save(&self) -> Self::StartOutputSaveResponseFut
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
Source§type Protocol = AudioRecordingControlMarker
type Protocol = AudioRecordingControlMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Auto Trait Implementations§
impl Freeze for AudioRecordingControlProxy
impl !RefUnwindSafe for AudioRecordingControlProxy
impl Send for AudioRecordingControlProxy
impl Sync for AudioRecordingControlProxy
impl Unpin for AudioRecordingControlProxy
impl !UnwindSafe for AudioRecordingControlProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)