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 401 of file audio.h.

Field Documentation

struct audio_stream common

Common methods of the audio stream in. This must be the first member of audio_stream_in as users of this structure will cast a audio_stream to audio_stream_in pointer in contexts where it's known the audio_stream references an audio_stream_in.

Definition at line 407 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 430 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 417 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 411 of file audio.h.


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