I'm trying to control the volume and/or the mute function of the line-in on my soundcard.
I've google, searched in the forum, tried a couple of things but I can't seem to get it working.
I think I need to get the correct structure from somewhere (just like they do in the soundmixer.py file)
but I can't get to that structure. Could anybody help me?
This is what I allready did:
Code: Select all
#################################################
COMMAND:
-----------
print eg.WinApi.SoundMixer.GetMixerDevices()
RESULT:
--------
[u'C-Media Wave Device']
#################################################
COMMAND:
-----------
print eg.WinApi.SoundMixer.GetDeviceLines()
RESULT:
--------
Destination: 0 Volumeregeling
Control: (u'Hoofdvolume', 'Fader', 'Volume', '')
Control: (u'Hoofdniveau dempen', 'Switch', 'Mute', '')
Source: 0 Wave
Control: (u'Volume', 'Fader', 'Volume', '')
Control: (u'Dempen', 'Switch', 'Mute', '')
Source: 1 SW-synthesizer
Control: (u'Volume', 'Fader', 'Volume', '')
Control: (u'Dempen', 'Switch', 'Mute', '')
Source: 2 Microfoon
Control: (u'Microfoonversterking', 'Switch', 'OnOff', 'Uniform')
Control: (u'Microfoonvolume', 'Fader', 'Volume', 'Uniform')
Control: (u'Microfoon dempen', 'Switch', 'Mute', 'Uniform')
Source: 3 Cd-speler
Control: (u'Volume van lijn', 'Fader', 'Volume', '')
Control: (u'Lijn dempen', 'Switch', 'Mute', '')
Source: 4 Aux/Phone
Control: (u'Volume van aux', 'Fader', 'Volume', '')
Control: (u'Aux dempen', 'Switch', 'Mute', '')
Source: 5 Lijningang
Control: (u'Volume van lijningang', 'Fader', 'Volume', '')
Control: (u'Lijn dempen', 'Switch', 'Mute', '')
Destination: 1 Opnameregeling
Control: (u'Opnamebron', 'List', 'Mux', 'Multiple(6), Uniform')
Source: 0 Stereo Mix
Control: (u'Volume van stereo-mix', 'Fader', 'Volume', '')
Source: 1 Microfoon
Control: (u'Microfoonversterking', 'Switch', 'OnOff', 'Uniform')
Control: (u'Microfoonvolume', 'Fader', 'Volume', 'Uniform')
Source: 2 Cd-speler
Control: (u'Volume van lijningang', 'Fader', 'Volume', '')
Source: 3 Aux/Phone
Control: (u'Volume van aux', 'Fader', 'Volume', '')
Source: 4 Lijningang
Control: (u'Volume van lijningang', 'Fader', 'Volume', '')
Source: 5 Wave
Control: (u'Volume van wave', 'Fader', 'Volume', '')
None
Code: Select all
#################################################
COMMAND:
-----------
print eg.WinApi.SoundMixer.SetControlValue(u'Hoofdvolume', u'Dempen', 1)
RESULT:
--------
Fout in Actie: "print eg.WinApi.SoundMixer.SetControlValue(u'Hoofdvolume', u'Dempen', 1)"
Traceback (most recent call last) (1476):
File "<string>", line 1, in <module>
File "C:\Program Files\EventGhost\eg\WinApi\SoundMixer.py", line 139, in SetControlValue
AttributeError: 'unicode' object has no attribute 'dwControlID'
Thx in advance,
Nick