class Device
Defined at line 6728 of file fidling/gen/sdk/fidl/fuchsia.virtualaudio/fuchsia.virtualaudio/hlcpp/fuchsia/virtualaudio/cpp/fidl.h
This protocol represents the base functionality of active audio devices. A
device is active until this protocol is closed, at which point the device is
automatically removed.
Public Methods
void ~Device ()
void GetFormat (GetFormatCallback callback)
Returns the format selected by the client, or `NO_RING_BUFFER` if the
client has not yet selected a ring buffer format.
void GetGain (GetGainCallback callback)
Returns the current gain state for this device.
void GetBuffer (GetBufferCallback callback)
Returns details about the ring buffer. Returns `NO_RING_BUFFER` if the
client has not yet created the ring buffer.
void SetNotificationFrequency (uint32_t notifications_per_ring, SetNotificationFrequencyCallback callback)
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.
void GetPosition (GetPositionCallback callback)
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.
void ChangePlugState (int64_t plug_change_time, bool plugged, ChangePlugStateCallback callback)
Hot-plugs or hot-unplugs an active virtual device, at the specified
time.
void AdjustClockRate (int32_t ppm_from_monotonic, AdjustClockRateCallback callback)
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.