You are not logged in.

1

Saturday, October 2nd 2004, 3:30pm

dcop with kmix

Hello, I am trying to control kmix through the shell with dcop.
I write:
dcop kmix
and get a list of options. amid all there is Mixer0 which is the only Mixer I have.
But I can't do anything with it, like change the volume, get it's name or anything else. If I run isAvalibale device and probe all the devices from -10 to 10 I get false result.
What I can do is to control kmix-menuwindow#1, but that only changes the gui, not the essential parts.

I use kde (debian) 3.3 with kmix 2.1
I am trying to follow these examples:
http://docs.kde.org/en/3.3/kdemultimedia…p-examples.html
but all what concerns Mixer0 won't work.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Saturday, October 2nd 2004, 3:51pm

Hmm.

Does mixerName return a name string?

For the deviceindex negative numbers are not very likely, I guess 0 is the first device.

Cheers,
_
Qt/KDE Developer
Debian User

3

Saturday, October 2nd 2004, 3:54pm

That's wierd but it does not return name.
it prints blank line and goes to the next one.
like that:

Quoted


alexrait@localhost:#dcop kmix Mixer0 mixerName

alexrait@localhost:#

0 device doesn't work too.

This post has been edited 1 times, last edit by "alexrait1" (Oct 2nd 2004, 3:57pm)


djanubis

Beginner

Posts: 29

Location: Moulins France

Occupation: Software ingeneering

  • Send private message

4

Sunday, October 3rd 2004, 7:28am

It should have something like:

Quoted

[anubis@anubis anubis]$ dcop kmix
qt
KDebug
MainApplication-Interface
Mixer0
kmix

And:

Quoted

[anubis@anubis anubis]$ dcop kmix Mixer0
QCStringList interfaces()
QCStringList functions()
void setVolume(int deviceidx,int percentage)
void setMasterVolume(int percentage)
void increaseVolume(int deviceidx)
void decreaseVolume(int deviceidx)
int volume(int deviceidx)
int masterVolume()
void setMute(int deviceidx,bool on)
bool mute(int deviceidx)
void setRecordSource(int deviceidx,bool on)
bool isRecordSource(int deviceidx)
void setBalance(int balance)
bool isAvailableDevice(int deviceidx)
QString mixerName()

Using dcop interface

Quoted

[anubis@anubis anubis]$ dcop kmix Mixer0 mixerName
SiS SI7012
[anubis@anubis anubis]$ dcop kmix Mixer0 masterVolume
48
[anubis@anubis anubis]$ dcop kmix Mixer0 setMasterVolume 75
[anubis@anubis anubis]$ dcop kmix Mixer0 masterVolume
74


If you don't get anything consistent, you should revise your setup.
Never patch not working code. Rewrite it !
Never patch badly designed classes. Recreate them cleanly.
(Excerpts from Computing Bible)

Home of the Lab project