audio_stream_in Struct Reference
|int(*||set_gain )(struct audio_stream_in *stream, float gain)|
|ssize_t(*||read )(struct audio_stream_in *stream, void *buffer, size_t bytes)|
|uint32_t(*||get_input_frames_lost )(struct audio_stream_in *stream)|
|int(*||get_capture_position )(const struct audio_stream_in *stream, int64_t *frames, int64_t *time)|
|struct audio_stream common|
|int(* get_capture_position)(const struct audio_stream_in *stream, int64_t *frames, int64_t *time)|
Return a recent count of the number of audio frames received and the clock time associated with that frame count.
frames is the total frame count received. This should be as early in the capture pipeline as possible. In general, frames should be non-negative and should not go "backwards".
time is the clock MONOTONIC time when frames was measured. In general, time should be a positive quantity and should not go "backwards".
The status returned is 0 on success, -ENOSYS if the device is not ready/available, or -EINVAL if the arguments are null or otherwise invalid.
|uint32_t(* get_input_frames_lost)(struct audio_stream_in *stream)|
Return the amount of input frames lost in the audio driver since the last call of this function. Audio driver is expected to reset the value to 0 and restart counting upon returning the current value by this function call. Such loss typically occurs when the user space process is blocked longer than the capacity of audio driver buffers.
Unit: the number of input audio frames
|ssize_t(* read)(struct audio_stream_in *stream, void *buffer, size_t bytes)|
|int(* set_gain)(struct audio_stream_in *stream, float gain)|
The documentation for this struct was generated from the following file:
- hardware/libhardware/include/hardware/ audio.h