template <>

class NaturalClientImpl

Defined at line 1518 of file fidling/gen/sdk/fidl/fuchsia.hardware.audio/fuchsia.hardware.audio/cpp/fidl/fuchsia.hardware.audio/cpp/natural_messaging.h

Public Methods

::fidl::internal::NaturalThenable< ::fuchsia_hardware_audio::PacketStreamSink::PutPacket> PutPacket (::fidl::Request< ::fuchsia_hardware_audio::PacketStreamSink::PutPacket> request)

Submits a packet to be processed by the server.

The client may queue multiple packets by calling `PutPacket` repeatedly.

Packets are processed in the order they were submitted. This call

blocks until the payload is processed. When this call returns, the

buffer region is guaranteed to be available for reuse.

Returns `ZX_ERR_BAD_STATE` if the stream is not started or configured.

Returns `ZX_ERR_CANCELED` if `FlushPackets` was called.

Returns `ZX_ERR_INVALID_ARGS` if the packet is invalid. This includes:

* The payload is missing.

* `inline_data` is used but `supported_buffer_types` does not include `INLINE`.

* `vmo_transfer` is used but `supported_buffer_types` does not include `CLIENT_OWNED` or

`DRIVER_OWNED`.

* `vmo_id` is unrecognized, or `vmo_offset` + `payload_size` exceeds the VMO size.

Note: The server is not required to detect if a VMO region is currently in use by a

previous pending packet. Clients are responsible for managing buffer usage.

::fidl::internal::NaturalThenable< ::fuchsia_hardware_audio::PacketStreamSink::FlushPackets> FlushPackets ()

Flushes all packets currently pending without processing them.

This call waits until all pending packets are completed or canceled.

Note: A packet may be partially processed (e.g. if it contains multiple

audio frames, or if the data does not align with encoded frame boundaries)

before it is canceled.