mirror of
https://gitee.com/openharmony/third_party_alsa-utils
synced 2024-11-23 07:00:15 +00:00
34bb514b5f
Instead of mapping the raw volume values linearly to the screen, use a mapping where the bar height is proportional to the audible volume, i.e., where the amplitude is the cube of the bar height. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
20 lines
608 B
C
20 lines
608 B
C
#ifndef VOLUME_MAPPING_H_INCLUDED
|
|
#define VOLUME_MAPPING_H_INCLUDED
|
|
|
|
#include <alsa/asoundlib.h>
|
|
|
|
double get_normalized_playback_volume(snd_mixer_elem_t *elem,
|
|
snd_mixer_selem_channel_id_t channel);
|
|
double get_normalized_capture_volume(snd_mixer_elem_t *elem,
|
|
snd_mixer_selem_channel_id_t channel);
|
|
int set_normalized_playback_volume(snd_mixer_elem_t *elem,
|
|
snd_mixer_selem_channel_id_t channel,
|
|
double volume,
|
|
int dir);
|
|
int set_normalized_capture_volume(snd_mixer_elem_t *elem,
|
|
snd_mixer_selem_channel_id_t channel,
|
|
double volume,
|
|
int dir);
|
|
|
|
#endif
|