pub struct DeviceProxy { /* private fields */ }
Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_format(
&self,
) -> QueryResponseFut<DeviceGetFormatResult, DefaultFuchsiaResourceDialect>
pub fn get_format( &self, ) -> QueryResponseFut<DeviceGetFormatResult, DefaultFuchsiaResourceDialect>
Returns the format selected by the client, or NO_RING_BUFFER
if the
client has not yet selected a ring buffer format.
Sourcepub fn get_gain(
&self,
) -> QueryResponseFut<DeviceGetGainResult, DefaultFuchsiaResourceDialect>
pub fn get_gain( &self, ) -> QueryResponseFut<DeviceGetGainResult, DefaultFuchsiaResourceDialect>
Returns the current gain state for this device.
Sourcepub fn get_buffer(
&self,
) -> QueryResponseFut<DeviceGetBufferResult, DefaultFuchsiaResourceDialect>
pub fn get_buffer( &self, ) -> QueryResponseFut<DeviceGetBufferResult, DefaultFuchsiaResourceDialect>
Returns details about the ring buffer. Returns NO_RING_BUFFER
if the
client has not yet created the ring buffer.
Sourcepub fn set_notification_frequency(
&self,
notifications_per_ring: u32,
) -> QueryResponseFut<DeviceSetNotificationFrequencyResult, DefaultFuchsiaResourceDialect>
pub fn set_notification_frequency( &self, notifications_per_ring: u32, ) -> QueryResponseFut<DeviceSetNotificationFrequencyResult, DefaultFuchsiaResourceDialect>
Overrides the position notification frequency for this stream.
This affects the frequency of OnPositionNotify
events only. It does
not affect the frequency of notification events sent through the audio
driver APIs.
Sourcepub fn get_position(
&self,
) -> QueryResponseFut<DeviceGetPositionResult, DefaultFuchsiaResourceDialect>
pub fn get_position( &self, ) -> QueryResponseFut<DeviceGetPositionResult, DefaultFuchsiaResourceDialect>
Returns the current position (in bytes) within the ring buffer, along
with the time (per MONOTONIC clock) that corresponds with that position.
This can only be called after the ring buffer is established. Returns
NOT_STARTED
if the device has not yet Started streaming.
Sourcepub fn change_plug_state(
&self,
plug_change_time: i64,
plugged: bool,
) -> QueryResponseFut<DeviceChangePlugStateResult, DefaultFuchsiaResourceDialect>
pub fn change_plug_state( &self, plug_change_time: i64, plugged: bool, ) -> QueryResponseFut<DeviceChangePlugStateResult, DefaultFuchsiaResourceDialect>
Hot-plugs or hot-unplugs an active virtual device, at the specified time.
Sourcepub fn adjust_clock_rate(
&self,
ppm_from_monotonic: i32,
) -> QueryResponseFut<DeviceAdjustClockRateResult, DefaultFuchsiaResourceDialect>
pub fn adjust_clock_rate( &self, ppm_from_monotonic: i32, ) -> QueryResponseFut<DeviceAdjustClockRateResult, DefaultFuchsiaResourceDialect>
Immediately change the virtual device’s clock rate, as expressed in the timing and content of position notifications the driver emits. ‘ppm_monotonic’ cannot exceed [-1000,+1000]. Each rate change in rate is standalone; i.e. successive rate changes are not cumulative.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type GetFormatResponseFut = QueryResponseFut<Result<(u32, u32, u32, i64), Error>>
type GetGainResponseFut = QueryResponseFut<Result<(bool, bool, f32), Error>>
type GetBufferResponseFut = QueryResponseFut<Result<(Vmo, u32, u32), Error>>
type SetNotificationFrequencyResponseFut = QueryResponseFut<Result<(), Error>>
type GetPositionResponseFut = QueryResponseFut<Result<(i64, u32), Error>>
type ChangePlugStateResponseFut = QueryResponseFut<Result<(), Error>>
type AdjustClockRateResponseFut = QueryResponseFut<Result<(), Error>>
fn get_format(&self) -> Self::GetFormatResponseFut
fn get_gain(&self) -> Self::GetGainResponseFut
fn get_buffer(&self) -> Self::GetBufferResponseFut
fn set_notification_frequency( &self, notifications_per_ring: u32, ) -> Self::SetNotificationFrequencyResponseFut
fn get_position(&self) -> Self::GetPositionResponseFut
fn change_plug_state( &self, plug_change_time: i64, plugged: bool, ) -> Self::ChangePlugStateResponseFut
fn adjust_clock_rate( &self, ppm_from_monotonic: i32, ) -> Self::AdjustClockRateResponseFut
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
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
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for DeviceProxy
impl !RefUnwindSafe for DeviceProxy
impl Send for DeviceProxy
impl Sync for DeviceProxy
impl Unpin for DeviceProxy
impl !UnwindSafe for DeviceProxy
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
)