vyrru5 / audioswitch

Automatically exported from code.google.com/p/audioswitch
0 stars 0 forks source link

command line options #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create desktop shortcut with ""C:\Program Files 
(x86)\AudioSwitch\AudioSwitch.exe" -i 0 -m Control,Alt -k p"

What is the expected output? What do you see instead?
AudioSwitch starts with the defined hotkey.

There is displayed an error (translated from German, maybe wrong):
unexpected exception: System.NullReferenceException: The object pointer was not 
defined on an object device.
at AudioSwitch.Classes.Entpoints.SetDefaultDevice(String devID)
at AudioSwitch.Classes.Program.Main(String[] args)

What version of the product are you using? On what operating system?
Win8 64bit, audioswitch 2.0 RC2

Please provide any additional information below.
It seems that there is a problem in getting the args.

Original issue reported on code.google.com by qu...@lincksdrachen.de on 18 Jun 2013 at 6:54

GoogleCodeExporter commented 9 years ago
Maybe in Program.cs starts the counter wrong:
var purecmd = arg.Length > 1 ? arg.Substring(1, arg.Length - 1).Trim() : 

What about
var purecmd = arg.Length > 1 ? arg.Substring(0, arg.Length - 1).Trim() : 

Original comment by qu...@lincksdrachen.de on 21 Jun 2013 at 11:18

GoogleCodeExporter commented 9 years ago
In 2.0 versions, when operating command-line, have to:
1) always define render type as first command, like
-r playback or -r recording
2) you were missing the function definition

D:\source\AudioSwitch\trunk\bin\Debug>AudioSwitch.exe -r playback -i 0 -m 
Control,Alt -k p -f SwitchPlaybackDevice

D:\source\AudioSwitch\trunk\bin\Debug>
Hot key saved:  SwitchPlaybackDevice => Alt, Control + P

Original comment by tanelte...@gmail.com on 23 Aug 2013 at 8:10

GoogleCodeExporter commented 9 years ago
Hi,
I tested again and got the same error.
I truncated the parameter chain i.e. 
"C:\Program Files (x86)\AudioSwitch\AudioSwitch.exe" -r playback -i 0 -f 
SwitchPlaybackDevice

Changing the output device works fine, but then the error message pops up.

The error disappears if there are no parameters, like 
"C:\Program Files (x86)\AudioSwitch\AudioSwitch.exe"

What version of the product are you using? On what operating system?
Win8.1 64bit, audioswitch 2.0 RC2

Original comment by technikw...@gmail.com on 6 Feb 2014 at 1:46