summaryrefslogtreecommitdiffstats
path: root/src/tests/voltest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/voltest.c')
-rw-r--r--src/tests/voltest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/voltest.c b/src/tests/voltest.c
index 0c6d2ea6..2dcfa53c 100644
--- a/src/tests/voltest.c
+++ b/src/tests/voltest.c
@@ -9,6 +9,9 @@ int main(int argc, char *argv[]) {
float b;
pa_channel_map map;
+ printf("Attenuation of sample 1 against 32767: %g dB\n", 20.0*log10(1.0/32767.0));
+ printf("Smallest possible attenutation > 0 applied to 32767: %li\n", lrint(32767.0*pa_sw_volume_to_linear(1)));
+
for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
double dB = pa_sw_volume_to_dB(v);