Wechseln Sie das Wiedergabegerät mit der Logitech G-Taste

18011
Snæbjørn

Ich habe Lautsprecher und ein USB-Headset (G35). Ich möchte einfach zwischen zwei oder zwei Wiedergabegeräten wechseln, ohne zu den Wiedergabegeräten zu gehen und das Standardwiedergabegerät manuell zu ändern. Vorzugsweise mit den G-Tasten.

9

4 Antworten auf die Frage

14
Snæbjørn

Getting started

First you need to download NirCmd. It doesn't require any installation.

NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface.

NirCmd has a nifty command called setdefaultsounddevice which we need.

Manpage

setdefaultsounddevice [Device Name]

Set the default sound device on Windows 7/Vista/2008. The [Device Name] is the name of the device, as appeared in the sound devices list of windows, for example: Speakers, Line In, Microphone, and so on... The parameter is optional and may countain one of the following values: 0 for Console (the default value), 1 for Multimedia, and 2 for Communications.

Once you've downloaded the program you can put it in either your windows folder or a folder of your choosing. If you put it in your windows folder you don't have to know the location of the nircmd.exe file. More on that later.

Finding [Device Name]

Now we need to find your [Device Name]. Go to: Control Panel\Hardware and Sound\Sound and locate your devices. They'll most likely be called Speakers.

Playback devices

You'll need to change one of the names. I prefer to change the onboard sound device because once you unplug USB headset and plug it back in the device name will have reset to Speakers. You rename a device by choosing properties on the device and typing in the name you want in the top field.

Device properties

When that's done you should have two playback devices, one called Speakers (headset) the other LoudSpeakers.

Using NirCmd

We can now use NirCmd to switch to the desired device. Like so:

> nircmd.exe setdefaultsounddevice Speakers 

However I found that Skype (In my case) doesn't change when this is run. So we need to use the optional parameter as well.

> nircmd.exe setdefaultsounddevice Speakers > nircmd.exe setdefaultsounddevice Speakers 2 

Luckily NirCmd support scripts. So lets create two scripts one that switches to our speakers and one that switches to our headset.

SwitchToHeadset.ncl:

setdefaultsounddevice "Speakers" setdefaultsounddevice "Speakers" 2 

SwitchToSpeakers.ncl:

setdefaultsounddevice "LoudSpeakers" setdefaultsounddevice "LoudSpeakers" 2 

You can create these using Notepad. They're just text files with a .ncl extension instead of .txt. Put them in a convenient location. We'll need the shortly.

Switch playback device using the Logitech G keys

Depending on your decision where to place the nircmd.exe file the following may differ. I'll be using the solution where I don't place nircmd.exe in the windows folder.

Now you need to go to the Logitech Gaming Software (driver) to bind your G keys to these scripts. Select the button you want to bind and choose Shortcut, choose an appropriate name and type in the path to nircmd.exe and the .ncl script in want to run.

"X:/Audio switch/nircmd.exe" script "X:/Audio switch/SwitchToSpeakers.ncl" 

Remember to bind both SwitchToHeadset and SwitchToSpeakers.

G key layout

You're done! Enjoy.

Eine Möglichkeit, nircmd nicht im Windows-Ordner abzulegen, besteht darin, einen separaten Ordner für die Dinge im Pfad zu haben und diesen Pfad in Umgebungsvariablen hinzuzufügen. Ich mache das mit meinen Windows-Boxen, damit ich auf verschiedene GNU-Tools zugreifen kann Journeyman Geek vor 11 Jahren 0
Richtig, ich habe das nicht abgedeckt, da es verwirrend sein kann und Superuser dies bereits wissen :) Snæbjørn vor 11 Jahren 0
Hey, ich denke, dass OP die G-Keys vom Headset selbst bedeutete .... (http://img.hexus.net/v2/lifestyle/logitech/G35/G35buttons-big.jpg) kluka vor 11 Jahren 0
4
Squid

Ich habe eine einfachere Lösung gefunden.

Ich habe diese hilfreiche kleine App hier (Audioswitcher) verwendet und die Toneinstellung einigen Tastenanschlägen und dann den Tasten an der Seite des Headsets zugeordnet.

Gleiches Endergebnis, aber einfacher Weg dorthin, und die App ist ohnehin nützlich, wenn Sie über zahlreiche Soundausgabegeräte verfügen.

1
callan752

Hier ist eine weitere Alternative mit einem anderen Programm namens "Audioswitch":

  • Laden und installieren Sie Audioswitch https://github.com/sirWest/AudioSwitch/releases

  • Öffnen Sie die Audioswitch-Einstellungen über das Taskleistenmenü und deaktivieren Sie alle Audiogeräte, zu denen Sie NICHT wechseln möchten. (Klicken Sie in der rechten unteren Ecke auf "Einstellung speichern", nachdem Sie alle unerwünschten Geräte deaktiviert haben.)

  • Gehen Sie zur Registerkarte "Hot Keys" und wählen Sie entweder "PreviousPlaybackDevice" oder "NextPlaybackDevice" (es spielt keine Rolle), und erstellen Sie einen Hotkey dafür. (Ich verwende " Shift+ F3", kann aber gerne eine beliebige Kombination verwenden.) Beenden Sie das Menü, indem Sie auf "Hotkeys anwenden & Schließen" klicken.

  • Öffnen Sie die Logitech Gaming Software, und stellen Sie Ihre bevorzugte Logitech "G" -Taste ein, um die im "Hot Key" -Menü im vorherigen Schritt ausgewählten Tasten zu imitieren. (Ich entscheide mich dafür, dies der "G3" -Taste zuzuordnen, da es meine nächste verfügbare war.)

Logitech Gaming Software Beispiel-Screenshot

0
Dragon

I tried this with my Steelseries Apex 350 and got it to work as following:

  • I used the AudioSwitcher app mentioned above. link

  • I edited the Hotkeys in the App itself beeing "F1+1" for output 1 and "F2+2" for output 2.

  • I then proceeded to make a macro for the MX1 and MX2 button, setting them to the Hotkeys provided above. (making a macro in the Steelseries Rival Software is pretty easy, further explenation not necessary I guess...)

TL/DR: Set Hotkey in app and set same hotkeys with Rival Software for fast switching