Sign in to follow this  
Followers 0
Kademlia

Change MicInput Volume - possible?

6 posts in this topic

#1 ·  Posted (edited)

Yea, a simple question:

Is it possible to change the Microphone Input Volume via the DllCall("winmm.dll" [...])?

Just can´t get it to work.

Everything i can get is Output volume and which inputdevice should be selected; not the volume.

Edited by Kademlia

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Thanks for the answer but i already checked those links.

My mainproblem is controling the Input Microphone Volume (and if possible setting the Micboost). As most Computers i got to see use OnboardSonund and "Realtek AC97 Audio" is often used i can´t get around optimizing for that device.

The Mainproblem here is: None of the Scripts if found were able to change the Input Volume. Only the Output.

Here are some examples of the structure of Mixerdevices i got from some friends (computerlanguage:german)

I tried to sneak around this problem with the "VolumeLine" tool but this is just a realy bad way so i will try again on the DllCalls.

CODE
VolumeLine version 1.0 © 2002 by Slava Glory, Omsk, Russia

------------------------------------------------------------

[mixer:0] Conexant HD Audio output

[group:0] Lautstärkeregelung

[control:-1] Master Volume volume:100% mute:off

Master Volume

[control: 0] Wave volume: 44% mute:off

Wave

[control: 1] SW-Synthesizer volume:100% mute:off

SW-Synthesizer

[control: 2] CD-Audio volume:100% mute:off

CD-Audio

[control: 3] Line-Eingangslautstärkevolume:100% mute:off

Line-Eingangslautstärke

[control: 4] Mikrofon-Eingangslautstärkevolume: 86% mute:off

Mikrofon-Eingangslautstärke

[control: 5] PC-Lautsprecher volume: 0% mute:on

PC-Lautsprecher

[mixer:1] Conexant HD Audio input

[group:0] Aufnahme

[control:-1] Master Volume volume: 0% mute:on

Master Volume

[control: 0] CD-Audio volume: 50% select:off

CD-Audio

[control: 1] Mikrofon volume: 0% select:off

Mikrofon

[control: 2] Line-In volume: 50% select:off

Line-In

[control: 3] Waveausg.-Mix volume: 78% select:on

Waveausg.-Mix

CODE
VolumeLine version 1.0 © 2002 by Slava Glory, Omsk, Russia

------------------------------------------------------------

[mixer:0] Realtek AC97 Audio

[group:0] Lautstärkeregelung

[control:-1] Master Volume volume:100% mute:off

[control: 0] Wave volume: 12% mute:off

[control: 1] SW-Synthesizer volume:100% mute:off

[control: 2] Front volume:100% mute:on

[control: 3] Subwoofer volume:100% mute:on

[control: 4] Center volume:100% mute:on

[control: 5] Rear volume:100% mute:on

[control: 6] SPDIF volume: 0% mute:off

[control: 7] Aux volume: 50% mute:off

[control: 8] TV-Empfänger (Audio)volume: 50% mute:off

[control: 9] CD-Player volume: 16% mute:off

[control:10] Line-In volume: 50% mute:off

[control:11] Mikrofon volume: 45% mute:on

[control:12] Telefonleitung volume: 50% mute:off

[control:13] PC-Lautsprecher volume: 50% mute:off

[group:1] Aufnahme

[control: 0] Mono Mix volume: 7% select:off

[control: 1] Stereo Mix volume: 7% select:off

[control: 2] SPDIF volume: 0% mute:on

[control: 3] Aux volume: 7% select:off

[control: 4] TV-Empfänger (Audio)volume: 7% select:off

[control: 5] CD-Player volume: 7% select:off

[control: 6] Line-In volume: 7% select:off

[control: 7] Mikrofon volume: 92% select:on

[control: 8] Telefonleitung volume: 7% select:off

CODE
VolumeLine version 1.0 © 2002 by Slava Glory, Omsk, Russia

------------------------------------------------------------

[mixer:0] Realtek HD Audio output

[group:0] Summe

[control:-1] Master Volume volume: 56% mute:off

[control: 0] Wave volume: 84% mute:off

[control: 1] SW-Synthesizer volume: 57% mute:off

[control: 2] CD-Player volume: 76% mute:off

[control: 3] Mikrofon volume: 22% mute:off

[control: 4] PC Beep volume: 34% mute:off

[mixer:1] Realtek HD Audio input

[group:0] Aufnahme

[control:-1] Master Volume volume: 72% mute:off

[control: 0] Mikrofon volume: 0% mute:off

[control: 1] Stereomix volume: 0% mute:on

CODE
VolumeLine version 1.0 © 2002 by Slava Glory, Omsk, Russia

------------------------------------------------------------

[mixer:0] Realtek AC97 Audio

[group:0] Lautstärkeregelung

[control:-1] Master Volume volume:100% mute:off

Master Volume

[control: 0] Wave volume:100% mute:off

Wave

[control: 1] SW-Synthesizer volume:100% mute:off

SW-Synthesizer

[control: 2] Front volume:100% mute:on

Front

[control: 3] Side volume:100% mute:on

Side

[control: 4] Subwoofer volume:100% mute:on

Subwoofer

[control: 5] Center volume:100% mute:on

Center

[control: 6] Rear volume:100% mute:on

Rear

[control: 7] SPDIF volume: 0% mute:off

SPDIF

[control: 8] CD-Player volume: 88% mute:off

CD-Player

[control: 9] Line-In volume:100% mute:off

Line-In

[control:10] Mikrofon volume: 33% mute:on

Mikrofon

[control:11] Telefonleitung volume: 50% mute:off

Telefonleitung

[control:12] PC-Lautsprecher volume: 28% mute:off

PC-Lautsprecher

[group:1] Aufnahme

[control: 0] Mono Mix volume: 7% select:off

Mono Mix

[control: 1] Stereo Mix volume: 47% select:off

Stereo Mix

[control: 2] SPDIF volume: 0% mute:on

SPDIF

[control: 3] CD-Player volume:100% select:off

CD-Player

[control: 4] Line-In volume:100% select:off

Line-In

[control: 5] Mikrofon volume: 32% select:on

Mikrofon

[control: 6] Telefonleitung volume: 7% select:off

Telefonleitung

Edited by Kademlia

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

And the Mixer.au3 from GaryFrost mentioned here:

http://www.autoitscript.com/forum/index.ph...st&p=264605

only returns:

CODE
;~ DST

;~ Digital: 0

;~ Line: 0

;~ Monitor: 0

;~ Speakers: 75

;~ HeadPhones: 0

;~ Phone: 0

;~ WaveIn: 0

;~ VoiceIn: 0

;~ SRC

;~ Digital: 0

;~ Line: 0

;~ Microphone: 54 <- this is OUTPUT microphone

;~ Synthesizer: 100

;~ CompactDisc: 0

;~ Phone: 0

;~ PcSpeaker: 0

;~ WaveOut: 96

;~ Aux: 0

;~ Analog: 100

Edit: Got it...damn these DLLs nearly killed me

Edited by Kademlia

Share this post


Link to post
Share on other sites

Hi there,

I am trying to find a way of setting the Microphone record or Input setting and have failed.

When you say, "Got it", HOW??????

Best regards,

David

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I only got the half way, i tought no one was interested so i stopped posting about this topic.

I need to be able to to two things:

1. Change Mic volume

2. Change MIC Boost ON/OFF (This is more important because on most computers you will nearly not hear a person speaking just by changing Mic volume to 100%)

to 1: I managed to get he IDs of the InputLines. I stopped at that point because i knew changing the MIC BOOST is more difficult. So i started working there.

You can see the IDs for the INPUTLines by doing this to MXSelectInputSrc.au3

CODE

Func GetLineConnectionsNames(ByRef $mixers,ByRef $mxInList,$index)

Local $i,$x,$n,$hmxobj,$ret

If $mixers[0][0] Then

$hmxobj=$mixers[$index][$MIX_HMXOBJ]

$x=0

For $n=0 To $mixers[$index][$MIX_CCONNECTIONS]-1

zeroline($mxline)

$mxline[$dwDestination]=$mixers[$index][$MIX_DWLINEID]

$mxline[$dwSource]=$n

$ret=MixerGetLineInfo($hmxobj,$mxline,BitOR($MIXER_OBJECTF_HMIXER,$MIXER_GETLINEINFOF_SOURCE)) ;ask for source lines

If NOT @error Then

$mxInList[$x][$lst_destname]=$mxline[$szName] & " ID= " & $mxline[4]

$mxInList[$x][$lst_dwComponentType]=$mxline[$dwComponentType]

$x=$x+1

If UBound($mxInList)<$x+1 Then ReDim $mxInList[$x+2][uBound($mxInList,2)]

Else

SetError(1)

Return False

EndIf

Next ;n

$mxInList[0][0]=$x

Return True

Else

SetError(1)

Return False

EndIf

EndFunc

2: Tried a long time...but i just cant get it to work - i compared with some examples at codeproject, at expert-exchange aso... just don´t know whats going wrong

The code i tried to port can be found here (bottom of page): http://www.experts-exchange.com/Programmin...l?eeSearch=true

I added this to MXSelectInputSrc_include.au3

CODE

Const $MIXERCONTROL_CT_CLASS_SWITCH =0x20000000

Const $MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = 0

Const $MIXERCONTROL_CONTROLTYPE_BOOLEAN = BitOR($MIXERCONTROL_CT_CLASS_SWITCH , $MIXERCONTROL_CT_SC_SWITCH_BOOLEAN , $MIXERCONTROL_CT_UNITS_BOOLEAN)

Const $MIXERCONTROL_CONTROLTYPE_ONOFF = ($MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)

Const $MIXERCONTROL_CONTROLTYPE_MUTE = ($MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)

Const $MIXERCONTROL_CONTROLTYPE_MONO = ($MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)

Const $MIXERCONTROL_CONTROLTYPE_LOUDNESS = ($MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)

Const $MIXERCONTROL_CONTROLTYPE_STEREOENH = ($MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)

Attached the not working Micboost :-/

Start it and click "TEST" - you will get a consoleoutput including the ControlID. But im not able to change the setting always getting an error (11).

MicBoost_notworking.au3

Edited by Kademlia

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0