Need help: control master volume

Lubos Lunak l.lunak at suse.cz
Sat Mar 13 10:36:55 GMT 2004


Dne pá 12. března 2004 11:43 Jonathan Riddell napsal(a):
> > On Thursday 11 March 2004 23:30, Mirko Boehm wrote:
> > > Hi everybody,
> > >
> > > I need help with the following issue:
> > >
> > > Usually, notebooks ship with volume control buttons. Some models rely
> > > on software to actually change the module, for example some Sony
> > > models. Now in kdeutils/kmilo/kmilo_kvaio/kvaio.cpp, you will find the
> > > following method:
> > >
> > > bool KVaio::modifyVolume(int /* step */)
> > > {
> > >     // we increase the volume if step is gt zero, and decrease it if
> > >     // step is lt zero:
> > >     if(mClient.isAttached())
> > >     {
> > > 	// add a DCOP call here
> > >     }
> > >     return false;
> > > }
> > >
> > > I tried a couple of ways to implement it, but nothing seems to work
> > > relyably. For example, my prefered method (calling kmix via dcop)
> > > depends on kmix actually running.
>
> On Fri, Mar 12, 2004 at 11:02:44AM +0100, Benoit Walter wrote:
> > Perhaps having a look at the thinkpad milo plugin can help, it is
> > developped by Jonathan Riddell and rely on software volume, too. It is
> > already in CVS.
>
> I just stole the code from the generic kmilo plugin.  It starts kmix
> if kmix is not already started and uses that to adjust the volume.
>
> It works well for me but some people prefer not to use kmix (for
> example if they use kmixapplet).  It should probably also hide the
> mixer window on startup.
>
> What's really needed is a nice interface between kmilo and khotkeys so
> you can customise any button to do whatever you want.

 I thought we already agreed (http://lists.kde.org/?t=107550649700014&r=1&w=2) 
that KMilo should simply translate those hardware-specific keys that aren't 
visible as normal X key events to normal X key events, so that people can 
bind them to whatever they want, be it KMix, KMixApplet, KHotKeys or MyFoo. 
Is there a problem with that?

>
> Since this code is already duplicated with generic and thinkpad kmilo
> plugins it should really be in the core kmilo code so and plugin can
> call it.

-- 
 Lubos Lunak
 KDE Developer




More information about the kde-core-devel mailing list