Decibel]
Quoted 15 lines · James Courtier-Dutton
Quoted 11 lines · Dino Puller
Hi all,
only a simple question: How to obtainmin_dBvalue for my device or
pcm channel? I found the apisnd_mixer_selem_get_playback_dB_rangebut i didn't understand how to use it. Is it the right api? I've found alsosndo_mixer_io_get_dBi'm a bit confused.thanks,
Dino Puller
Quoted 9 lines
Those api commands are not supported yet. The alsa-lib to user application api is there and fixed. The support needs to be added to alsa-driver and some modifications to alsa-lib to make it work. I am working on it.
James
Ok. Any way i'm doing something very similar to pcm_softvol plugin and i want to make a conversion from linear to dB scale
here is the point:
(taken from pcm_soft_vol.c)
...
svol->min_dB = min_dB;
for (i = 1; i < svol->max_val; i++) {
double db = svol->min_dB - ((i - 1) * svol->min_dB) /
(svol->max_val - 1);
double v = (pow(10.0, db / 20.0) * (double)(1 <<
VOL_SCALE_SHIFT));
svol->dB_value[i] = (unsigned short)v;
}...
in this plugin the default min_dB value is -48 but the volume is too low, now witch value should i use? Is there a default value for a pcm channel?
thanks,
Dino Puller
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click