Android Hardware Abstraction Layer
Data Fields
audio_stream_in Struct Reference

#include <audio.h>

Data Fields

struct audio_stream common
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)

Detailed Description

Definition at line 382 of file audio.h.

Field Documentation

struct audio_stream common

Definition at line 383 of file audio.h.

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

Definition at line 406 of file audio.h.

ssize_t(* read)(struct audio_stream_in *stream, void *buffer, size_t bytes)

Read audio buffer in from audio driver. Returns number of bytes read, or a negative status_t. If at least one frame was read prior to the error, read should return that byte count and then return an error in the subsequent call.

Definition at line 393 of file audio.h.

int(* set_gain)(struct audio_stream_in *stream, float gain)

set the input gain for the audio driver. This method is for for future use

Definition at line 387 of file audio.h.

The documentation for this struct was generated from the following file: