|
libwebsockets
Lightweight C library for HTML5 websockets
|
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) |
| struct lws_audio_vu_info |
Definition at line 28 of file lws-audio-features.h.
| Data Fields | ||
|---|---|---|
| double | squelch_level | |
| double | max_energy | |
| int | sample_stride | |
| typedef struct lws_audio_vu_info lws_audio_vu_info_t |
| 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)
| info | pointer to lws_audio_vu_info_t containing config |
| pcm | pointer to signed 16-bit PCM samples |
| len_samples | number of samples in pcm buffer |
| result | pointer to integer to hold the result (0-100) |
Returns 0 on success, or non-zero on error.