2008-08-01, 22:37
I was talking in the forum about dynamic range compression(which sometimes comes in handy) in the chatroom.
I was told it was planned, but not implemented yet.
Searching for a temporary solution i found out it was possible to do it through Alsa..
Since there is no need to invent the wheel twice, maybe it would be better to implement it in xbmc to just use the Alsa plugin..
According to
http://alsa.opensrc.org/index.php/Ladspa_(plugin)
what is needed is the following in the .asoundrc
And then tell the program to use the output "alsa:device=ladcomp".
I don't know how your feeling are about an implementation like this. But i would think it was fine to have xbmc update "/etc/asound.conf" on install(or rather, have the package manager do it), possible call it "xbmcCompression" instead of ladcomp. And then it is a simple toggle in the GUI to enable or disable it(choose which output to use).
It seems rather easy and doable to implement it this way. But i don't know if it is against any current guidelines.
Also, since some(many?) distro's are moving to pulseaudio, this might just be a temporary solution, i haven't found any compressor or limiter for pulseaudio, but that doesn't mean it isn't there.
Sincerely
Tobias Ussing
I was told it was planned, but not implemented yet.
Searching for a temporary solution i found out it was possible to do it through Alsa..
Since there is no need to invent the wheel twice, maybe it would be better to implement it in xbmc to just use the Alsa plugin..
According to
http://alsa.opensrc.org/index.php/Ladspa_(plugin)
what is needed is the following in the .asoundrc
Code:
pcm.ladcomp {
type plug
slave.pcm "ladcomp_compressor";
}
pcm.ladcomp_compressor {
type ladspa
slave.pcm "ladcomp_limiter";
path "/usr/lib/ladspa";
plugins [
{
label dysonCompress
input {
#peak limit, release time, fast ratio, ratio
controls [0 1 0.5 0.99]
}
}
]
}
pcm.ladcomp_limiter {
type ladspa
slave.pcm "plughw:0,0";
path "/usr/lib/ladspa";
plugins [
{
label fastLookaheadLimiter
input {
#InputGain(Db) -20 -> +20 ; Limit (db) -20 -> 0 ; Release time (s) 0.01 -> 2
controls [ 20 0 0.8 ]
}
}
]
}
I don't know how your feeling are about an implementation like this. But i would think it was fine to have xbmc update "/etc/asound.conf" on install(or rather, have the package manager do it), possible call it "xbmcCompression" instead of ladcomp. And then it is a simple toggle in the GUI to enable or disable it(choose which output to use).
It seems rather easy and doable to implement it this way. But i don't know if it is against any current guidelines.
Also, since some(many?) distro's are moving to pulseaudio, this might just be a temporary solution, i haven't found any compressor or limiter for pulseaudio, but that doesn't mean it isn't there.
Sincerely
Tobias Ussing