How to do Alsa configuration (asoundrc) on-the-run while an application is running?



Hi,
I am new to alsa and need to know if i can contorl the volume on
different channels dynamically or on-the-fly by modifying file
asoundrc.
We have written the following lines of code-

<code>
pcm.mycard {
type hw
card 0
device 0
}

pcm.dshare {
type dmix
ipc_key 2048
slave{
pcm mycard
rate 44100
period_time 1024
buffer_size 8192
channels 2
}
bindings{
0 0
1 1
}
}

pcm.conf1 {
type plug
slave{
pcm "dshare"
channels 2
}
ttable.0.0 0.9
ttable.1.1 0.1
}
</code>

This does the volume control statically (one time) the application
(mplayer) starts using this device mentioned as 'conf1'. Now, i make
following changes to the asoundrc file to change the volume level on
the channels while the application is running.

<code>
ttable.0.0 0.1
ttable.1.1 0.9

</code>

But the changes do not reflect. I need to restart the application for
the changes to take effect.

Is there any way i can achieve this without having to restart the
application?
Kindly reply.
.



Relevant Pages

  • odd permissions(??) issue (was: Re: sound sample rate issue: alsa/jack (ubuntu 9.04))
    ... That didn't seem to want to work here as it stood, so I took the bits about virtual devices and put them into my own ..asoundrc, and it works very nicely -- to a point. ... If I boot up and log in as xyz, the front channels remain silent, and I get sound from the remaining four. ...
    (uk.comp.os.linux)
  • Re: c++ header implementation
    ... more channels, ... The way to solve this is to close LABVIEW ... and restart it again, and now I'm going to solve this problem. ... Koert ...
    (comp.lang.labview)