libwebsockets
Lightweight C library for HTML5 websockets
Loading...
Searching...
No Matches
lws-audio-features.h File Reference

Go to the source code of this file.

Data Structures

struct  lws_audio_vu_info
 

Typedefs

typedef struct lws_audio_vu_info lws_audio_vu_info_t
 

Functions

LWS_VISIBLE LWS_EXTERN int lws_media_audio_calc_energy (const lws_audio_vu_info_t *info, const int16_t *pcm, size_t len_samples, int *result)
 

Data Structure Documentation

◆ lws_audio_vu_info

struct lws_audio_vu_info

Definition at line 28 of file lws-audio-features.h.

+ Collaboration diagram for lws_audio_vu_info:
Data Fields
double squelch_level
double max_energy
int sample_stride

Typedef Documentation

◆ lws_audio_vu_info_t

Function Documentation

◆ lws_media_audio_calc_energy()

LWS_VISIBLE LWS_EXTERN int lws_media_audio_calc_energy ( const lws_audio_vu_info_t * info,
const int16_t * pcm,
size_t len_samples,
int * result )

lws_media_audio_calc_energy() - Calculate audio energy level (0-100)

Parameters
infopointer to lws_audio_vu_info_t containing config
pcmpointer to signed 16-bit PCM samples
len_samplesnumber of samples in pcm buffer
resultpointer to integer to hold the result (0-100)

Returns 0 on success, or non-zero on error.