mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Export dB conversion helper functions
Export helper functions to convert dB level and range. snd_tlv_*dB*() are to convert dB level or range directly from TLV data. snd_ctl_*dB*() are to get dB level or range from a control element.
This commit is contained in:
parent
631f7cde82
commit
f38e5feca3
5 changed files with 469 additions and 265 deletions
|
|
@ -442,6 +442,21 @@ const void * snd_ctl_elem_value_get_bytes(const snd_ctl_elem_value_t *obj);
|
|||
void snd_ctl_elem_value_get_iec958(const snd_ctl_elem_value_t *obj, snd_aes_iec958_t *ptr);
|
||||
void snd_ctl_elem_value_set_iec958(snd_ctl_elem_value_t *obj, const snd_aes_iec958_t *ptr);
|
||||
|
||||
int snd_tlv_parse_dB_info(unsigned int *tlv, unsigned int tlv_size,
|
||||
unsigned int **db_tlvp);
|
||||
int snd_tlv_get_dB_range(unsigned int *tlv, long rangemin, long rangemax,
|
||||
long *min, long *max);
|
||||
int snd_tlv_convert_to_dB(unsigned int *tlv, long rangemin, long rangemax,
|
||||
long volume, long *db_gain);
|
||||
int snd_tlv_convert_from_dB(unsigned int *tlv, long rangemin, long rangemax,
|
||||
long db_gain, long *value, int xdir);
|
||||
int snd_ctl_get_dB_range(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id,
|
||||
long *min, long *max);
|
||||
int snd_ctl_convert_to_dB(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id,
|
||||
long volume, long *db_gain);
|
||||
int snd_ctl_convert_from_dB(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id,
|
||||
long db_gain, long *value, int xdir);
|
||||
|
||||
/**
|
||||
* \defgroup HControl High level Control Interface
|
||||
* \ingroup Control
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue