What does the /devices command do?
2010-01-17 21:01
The /devices gives you a list of the sound cards that are installed in your computer and, using the related commands /play and /record, lets you independently select the sound card that Hamsphere will use for the playback (“Volume control”) channel, and for the record (“Mic gain”) channels.


Do I need to use those commands?

Generally, no. If you’re connecting an analog microphone to your computer, and are listening to Hamsphere on your computer’s speakers, it’s likely that everything will work OK and you’ll never have to change your sound card settings, either in your operating system or in Hamsphere. If you can hear Hamsphere’s audio, and can talk to folks on the air, everything is working and you can ignore the rest of this article.

When you launch the Hamsphere program, it will normally use your computer’s main sound card, called the default or primary sound card. If you have only one sound card installed in your computer, that’s the only card that Hamsphere can use, and everything will work OK.

Problems can arise, though, if you have installed more than one sound card in your computer, particularly if you add the second (or third, or fourth…) sound card on the fly, after you have launched the Hamsphere program.

That exact situation arises if you use a USB headset or external USB sound card, and plug it into your system while the Hamsphere program is running.
(USB headsets incorporate a little built-in sound card.)
When you add the sound card that you’d like to use, Hamsphere won’t detect it or automatically switch over to it. You’ll continue to hear Hamsphere’s audio over your computer speakers, not through your USB headset. To get your new audio device working with Hamsphere, you must tell the program, yourself, that the sound card has changed.
You’ll use the /devices, /play, and /record commands to switch Hamsphere over to your new sound card.

For Example:
First you need to know what sound cards are available to Hamsphere.

Unplug any external sound devices, such as USB headsets or external USB sound cards, from your computer. Start the Hamsphere program.

Go to the chat text entry area, and type the following command:

/devices

You should see a list that looks something like this:


Available playback devices:
0: Primary Sound Driver
1: SigmaTel Audio
2: Java Sound Audio Engine

Available recording devices:
0: Primary Sound Capture Driver
1: SigmaTel Audio

Current playback device: 2
Current recording device: 0

This list tells you that you have one hardware sound card installed in your system -- the SigmaTel sound card -- and that Hamsphere is using the Primary Sound Driver for both playback and record. So you now know that your computer’s built-in sound card is a SigmaTel.

If you have a USB headset or external USB sound card, plug it in and issue the /devices command once again. You should see that a new card has appeared in the device list:
Available playback devices:

Available playback devices:
0: Primary Sound Driver
1: C-Media USB Audio Device
2: SigmaTel Audio
3: Java Sound Audio Engine

Available recording devices:
0: Primary Sound Capture Driver
1: C-Media USB Audio Device
2: SigmaTel Audio

Current playback device: 2
Current recording device: 0

Our new contestant is the C-Media USB Audio Device.

You’ve now learned to identify your built-in sound card and your external sound card.

In addition to listing the available sound devices, Hamsphere lets you change sound cards, independently, for both the playback channels and the receive channels, using the /play and /record commands.

You can change the sound card used for playback audio using the /play command, switching to any of the listed devices, using the device number to identify the card to Hamsphere. For instance, if you type the following command…
/play 1

…the program will switch its playback audio to the C-Media device, which you learned during your experiment above, is your USB headset. You’ll hear folks chatting, now, through your headset.

To switch your headset’s microphone over to Hamsphere, you’d use the /record command, once again giving it the number of the sound device you’d like to use for your transmitted audio:
/record 1


Now Hamsphere is using your USB headset for both playback and record.

You can confirm that by issuing the /devices command once again.

Available playback devices:
0: Primary Sound Driver
1: C-Media USB Audio Device
2: SigmaTel Audio
3: Java Sound Audio Engine

Available recording devices:
0: Primary Sound Capture Driver
1: C-Media USB Audio Device
2: SigmaTel Audio

Current playback device: 1
Current recording device: 1

The two lines at the bottom tell me that Hamsphere is now using playback device 1, the C-Media card, for its playback audio. You’ll hear Hamsphere’s audio in your headset, not through the speakers. Likewise, the program is using recording device 1, again the C-Media card, for its record audio. Therefore, you know that Hamsphere is taking its audio from your headset’s microphone, and sending its playback audio to your headset’s earphones.

/play and /record are most useful for changing your audio devices on the fly after, say, plugging in a USB headset, and switching over to it without having to shut down and re-launch Hamsphere.

These commands are also useful if you have more than one internal sound card installed in your system. You can tell Hamsphere to use the card to which you’ve connected your microphone and speakers.