Sign in to follow this  
Followers 0
Insolence

Audio Properties

11 posts in this topic

Does anyone know where I can change the recording control from "Microphone" to "Wave" easily? Without opening up the actual audio properties exe?


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites



bump*


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

bump*

I'm not sure, but maybe you can find a key in the registry and have it regwrite it

Just a guess

Share this post


Link to post
Share on other sites

I'm not sure, but maybe you can find a key in the registry and have it regwrite it

Just a guess

Well, yeah, exactly, but what key?--that's what I'm asking :P

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Volume Control\Your sound cards name\Volume Control

LineStates

problem is LineStates is binary and your cards name is part of the path

this looks like same thing but no card name but still binary

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\Audio\VolumeControl

LineStates

nope they're here

problem is the clsid will be different for every card

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{6994AD04-93EF-11D0-A3CC-00A0C9223196}\##?#PCI#VEN_1106&DEV_3059&SUBSYS_80B01043&REV_60#3&61AAA01&0&8D#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\#Wave\Device Parameters\Mixer\0\Controls\0]

Edited by CWorks

Share this post


Link to post
Share on other sites

I found some things, but nothing conclusive. Is there any way to take a snap-shot of my registry, change my recording device, and then come back to see which values have changed?


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I use (in Windows 7 and Vista use Windows XP Compatibility Mode!)

VolumeLine 1.0 © 2002, by Slava Glory (Omsk, Russia)

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

June 24, 2002

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

VolumeLine is a command line utility for adjusting volume level through

command line parameters.Supports all available volume, recording and other

mixer controls (master volume, wave, midi, line-in, etc).

How to use:

To get all audio mixers, groups and controls information use:

VolumeLine.exe GET:ALL

To get info about specified audio mixer, group or control use:

VolumeLine.exe GET:<MixerId>[:<GroupId>[:<ControlId>]]

To set volume level for specified audio control use:

VolumeLine.exe SET:<MixerId>:<GroupId>:<ControlId> VOLUME:<0-100>

To set mute for specified audio control use:

VolumeLine.exe SET:<MixerId>:<GroupId>:<ControlId> MUTE:<ON|OFF>

To select specified audio control use:

VolumeLine.exe SET:<MixerId>:<GroupId>:<ControlId> SELECT

Contacts:

E-Mail: slava_glory@mail.ru

Web: http://glorysoft.omsk.ru

VolumeLine IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED

OR IMPLIED. USE AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA

LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR

MISUSING THIS SOFTWARE.

Greetings from MSchindi! :)

Edited by MSchindi

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I use

VolumeLine

Can you share code to use its output?

Example:

VolumeLine version 1.0 (c) 2002 by Slava Glory, Omsk, Russia
------------------------------------------------------------
[mixer:0] SoundMAX Digital Audio
    [group:0] Controllo volume
        [control:-1] Master Volume    volume: 75%  mute:off
        [control: 0] Wave              volume:100%  mute:off
        [control: 1] Sintetizzatore SW  volume:100%  mute:off
        [control: 2] BassBoost        volume: 18%  mute:off
        [control: 3] Lettore CD      volume: 25%  mute:off
        [control: 4] Microfono        volume: 75%  mute:off
        [control: 5] Aux                volume: 23%  mute:off
        [control: 6] Linea in ingresso  volume: 23%  mute:off
        [control: 7] Phone            volume: 23%  mute:off
        [control: 8] Mono Out          volume: 23%  mute:off
        [control: 9] Wave              volume:  0%  mute:on
    [group:1] Controllo registrazione
        [control: 0] Lettore CD      volume: 23%  select:off
        [control: 1] Microfono        volume: 30%  select:off
        [control: 2] Aux                volume: 23%  select:off
        [control: 3] Linea in ingresso  volume: 47%  select:off
        [control: 4] Phone            volume: 10%  select:on
        [control: 5] Mono Out          volume: 10%  select:off
        [control: 6] Mix wave in uscita volume:  8%  select:off

How to set volume level for control contained in a line that contain "phone" and "select" strings? In other words: how can I match "[control: 4] Phone volume: 10% select:on" line and use it for the next command VolumeLine.exe SET:<MixerId>:<GroupId>:<ControlId> VOLUME:<0-100> ?

Edited by masvil

Share this post


Link to post
Share on other sites

Can you share code to use its output?

Example:

VolumeLine version 1.0 (c) 2002 by Slava Glory, Omsk, Russia
------------------------------------------------------------
[mixer:0] SoundMAX Digital Audio
    [group:0] Controllo volume
        [control:-1] Master Volume    volume: 75%  mute:off
        [control: 0] Wave              volume:100%  mute:off
        [control: 1] Sintetizzatore SW  volume:100%  mute:off
        [control: 2] BassBoost        volume: 18%  mute:off
        [control: 3] Lettore CD      volume: 25%  mute:off
        [control: 4] Microfono        volume: 75%  mute:off
        [control: 5] Aux                volume: 23%  mute:off
        [control: 6] Linea in ingresso  volume: 23%  mute:off
        [control: 7] Phone            volume: 23%  mute:off
        [control: 8] Mono Out          volume: 23%  mute:off
        [control: 9] Wave              volume:  0%  mute:on
    [group:1] Controllo registrazione
        [control: 0] Lettore CD      volume: 23%  select:off
        [control: 1] Microfono        volume: 30%  select:off
        [control: 2] Aux                volume: 23%  select:off
        [control: 3] Linea in ingresso  volume: 47%  select:off
        [control: 4] Phone            volume: 10%  select:on
        [control: 5] Mono Out          volume: 10%  select:off
        [control: 6] Mix wave in uscita volume:  8%  select:off

How to set volume level for control contained in a line that contain "phone" and "select" strings? In other words: how can I match "[control: 4] Phone volume: 10% select:on" line and use it for the next command VolumeLine.exe SET:<MixerId>:<GroupId>:<ControlId> VOLUME:<0-100> ?

Yes it is true, the programme is great but I am also unable to find the exact code to bring this programme to work. I have tried all the possible combinations but programme always gives error.

Can someone please post an example how to get this programme running?

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Can someone please post an example how to get this programme running?

Sure.

My script:

- searches for all microphone devices;

- set to max recording (not playback) volume;

- select the first found as active recording device;

Limitation:

- searching is string based, so... check it. It should work on english, italian, german and swedish PCs.

- I guess it doesn't work on Vista (can anyone test it and fix/feedback?)

Comments:

AutoIT lacks those audio settings capability, and neither Volly's audio.au3 UDFs can do it. I hope developers like that request, so that AutoIT will do it natively.

Volumeline tool attached (it seems to be disappeared from the net).

#include <file.au3>

Dim $i
Dim $DeviceError
$SoundDebug = 1
Dim $FoundedDevice

RunWait(@ComSpec & ' /c "' & @ScriptDir & '\volumeline.exe" GET:ALL > audiotemp.txt', @ScriptDir, @SW_HIDE)

$CountLines = _FileCountLines(@ScriptDir & "\audiotemp.txt")

$file = FileOpen(@ScriptDir & "\audiotemp.txt", 0)
$file2 = FileOpen(@ScriptDir & "\audiodevices.txt", 2)
$i = 2
While 1
   $i = $i + 1
   If $i > $CountLines Then ExitLoop
   $line = FileReadLine($file, $i)
   FileWriteLine($file2, $line)
WEnd
$i = 0
FileClose($file)
FileClose($file2)
FileDelete(@ScriptDir & "\audiotemp.txt")

$CountLines = $CountLines - 2

$file = FileOpen(@ScriptDir & "\audiodevices.txt", 0)
While 1
   $i = $i + 1
   If $i > $CountLines Then
      If $SoundDebug = 1 And $FoundedDevice <> 1 Then
         MsgBox(48, "error", "I can't found microphone device")
         $DeviceError = 1
      EndIf
      ExitLoop
   EndIf
   $line = FileReadLine($file, $i)
   $ControlSearch1 = StringInStr($line, "select:")
   $ControlSearch2 = StringInStr($line, "mic");tedesco = mikrophon, francese = mic, svedese = mik
   $ControlSearch3 = StringInStr($line, "mik")
   $ControlSearch4 = StringInStr($line, "capture"); per i Logitech integrati con la cam
   If $ControlSearch1 <> 0 Then
      If $ControlSearch2 <> 0 Or $ControlSearch3 <> 0 Then
    ;MsgBox(0, "La linea del control è la " & $i, $line)
         $next = $i; così per cercare il prossimo comincia da qui
         $ControlId = StringMid($line, 19, 1)
    ;MsgBox(0, "", "il control è " & $ControlId)
         While 1
            $i = $i - 1
            $line = FileReadLine($file, $i); così torno indietro al primo group
            $GroupSearch = StringInStr($line, "[group:")
            If $GroupSearch <> 0 Then
             ;MsgBox(0, "La linea del group è la " & $i, $line)
               $GroupId = StringMid($line, 12, 1)
             ;MsgBox(0, "", "il group è " & $GroupId)
               While 1
                  $i = $i - 1
                  $line = FileReadLine($file, $i); così torno indietro al primo mixer
                  $MixerSearch = StringInStr($line, "[mixer:")
                  If $MixerSearch <> 0 Then
                ;MsgBox(0, "La linea del mixer è la " & $i, $line)
                     $MixerId = StringMid($line, 8, 1)
                ;MsgBox(0, "", "il mixer è " & $MixerId)
                     RunWait("volumeline.exe SET:" & $MixerId & ":" & $GroupId & ":" & $ControlId & " SELECT", @ScriptDir, @SW_HIDE)
                     RunWait("volumeline.exe SET:" & $MixerId & ":" & $GroupId & ":" & $ControlId & " VOLUME:100", @ScriptDir, @SW_HIDE)
                     $i = $next
                     $FoundedDevice = 1
                     ExitLoop 2
                  EndIf
               WEnd
            EndIf
         WEnd
      EndIf
   EndIf
WEnd
FileClose($file)
$i = 0

If $DeviceError <> 1 Then
   FileDelete(@ScriptDir & "\audiodevices.txt")
EndIf

volumeline.7z

Edited by masvil

Share this post


Link to post
Share on other sites

Thanks for the Program.

To Vista: No this won´t work because vista sets the volume of every program on its own.

Everything that happens is that Volumeline appears for a second in the SoundOptions and dissapears again after setting any soundoption.

This tool is not realy needed because this can be done by DLLCalls - but as i am not able to get it to work for input, even knowing it works (because i run across the "MONO MIX INPUT" and was able to change it). I have to use it until someone finds out how to DLLCall inputlines via winmm.dll

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