mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
alsa-utils: moved to /sound and Sound category, fix minor bugs
Moved source folder in /sound folder, and changed all packages in the makefile to be shown in Sound category (not in Sound subcategory of Utilities). Removed a line calling a non-existent Package/alsa-utils/Default and site URL to the package alsa-utils-tests. Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
--- a/alsamixer/volume_mapping.c
|
||||
+++ b/alsamixer/volume_mapping.c
|
||||
@@ -114,9 +114,9 @@ static double get_normalized_volume(snd_
|
||||
if (use_linear_dB_scale(min, max))
|
||||
return (value - min) / (double)(max - min);
|
||||
|
||||
- normalized = exp10((value - max) / 6000.0);
|
||||
+ normalized = pow(10, (value - max) / 6000.0);
|
||||
if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
|
||||
- min_norm = exp10((min - max) / 6000.0);
|
||||
+ min_norm = pow(10, (min - max) / 6000.0);
|
||||
normalized = (normalized - min_norm) / (1 - min_norm);
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ static int set_normalized_volume(snd_mix
|
||||
}
|
||||
|
||||
if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
|
||||
- min_norm = exp10((min - max) / 6000.0);
|
||||
+ min_norm = pow(10, (min - max) / 6000.0);
|
||||
volume = volume * (1 - min_norm) + min_norm;
|
||||
}
|
||||
value = lrint_dir(6000.0 * log10(volume), dir) + max;
|
||||
Reference in New Issue
Block a user