Alfie Goodacre
Alfie Goodacre

Reputation: 2793

Test for audio with no speakers

I am currently debugging some code in C# which plays a noise (in this case a beep) under certain conditions.

The computer I am using has no speakers or working headphone jack, is there any way in which I can detect sound being played without actually being able to hear it?

The code that plays the sound is:

else System.Media.SystemSounds.Exclamation.Play();

Upvotes: 0

Views: 612

Answers (3)

Sorashi
Sorashi

Reputation: 931

If you don't have any device in the device manager, you can install a Realtek Driver. It creates a virtual playback device.

After that, go to sound-playing devices, choose the virtual device and set it as default playback device. Open your app and check whether a sound is played by looking at the volume visualisation next to the device in the device manager.


(source: eightforums.com)

Upvotes: 4

II ARROWS
II ARROWS

Reputation: 518

Search "Sound" in Windows (Control Panel), it shows you all your devices with the volume it outputs to that device. You can see if your sound works by looking the current volume (the bar on the right of each device).

Sound panel (Win 7)

If your PC has no audio out device (I don'think it's the case), maybe you can add "virtual" output devices.

Upvotes: 1

wally
wally

Reputation: 3592

In Windows, I believe (provided the audio drivers are loaded, and Windows thinks there's at least some form of audio output device) - you can open the volume setting (from the system tray) and see the bar bounce up and down when sound is being generated.

Alternatively, if the box is running Windows Professional, RDP to it from a remote device? The audio will be passed over the RDP session and played on the client.

Upvotes: 2

Related Questions