mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
Mega patch:
* implement inner loops using liboil * drop "typeid" stuff * add support for channel maps * add support for seperate volumes per channel * add support for hardware mixer settings (only module-oss implements this for now) * fix a lot of types for _t suffix git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@463 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
759721cbbc
commit
dd10c98241
114 changed files with 2584 additions and 1329 deletions
|
|
@ -2,14 +2,19 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <polyp/sample.h>
|
||||
#include <polyp/volume.h>
|
||||
#include "gccmacro.h"
|
||||
|
||||
int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char *argv[]) {
|
||||
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));
|
||||
pa_volume_t v;
|
||||
|
||||
for (v = PA_VOLUME_MUTED; v <= PA_VOLUME_NORM*2; v += 256) {
|
||||
|
||||
double dB = pa_sw_volume_to_dB(v);
|
||||
double f = pa_sw_volume_to_linear(v);
|
||||
|
||||
printf("Volume: %3i; percent: %i%%; decibel %0.2f; linear = %0.2f; volume(decibel): %3i; volume(linear): %3i\n",
|
||||
v, (v*100)/PA_VOLUME_NORM, dB, f, pa_sw_volume_from_dB(dB), pa_sw_volume_from_linear(f));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue