mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
add user volume API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@255 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a6471e2602
commit
da45617efc
6 changed files with 45 additions and 2 deletions
12
polyp/voltest.c
Normal file
12
polyp/voltest.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include <polyp/sample.h>
|
||||
|
||||
int main() {
|
||||
int p;
|
||||
for (p = 0; p <= 200; p++) {
|
||||
pa_volume_t v = pa_volume_from_user((double) p/100);
|
||||
double dB = pa_volume_to_dB(v);
|
||||
printf("%3i%% = %u = %0.2f dB = %u = %3i%%\n", p, v, dB, pa_volume_from_dB(dB), (int) (pa_volume_to_user(v)*100));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue