0

I wrote a WinForm application that will be remotely accessed via RDP. I am having issues with the sound being transmitted to the client.

I am using the following to trigger a Beep. It is working as expected when I launch the app from my development box. However, when I access it via RDP, It is not beeping.

 Console.Beep();

I am wondering if there is a better alternative or anybody aware of a workaround.

Sam
  • 813
  • 9
  • 19
  • Did you enable "Play at my machine" in the RDP client? – Dai Nov 17 '14 at 01:13
  • 1
    Also, see here: https://support.microsoft.com/kb/2495012?wa=wsignin1.0 – Dai Nov 17 '14 at 01:13
  • thanks for your link I"ll forward it to the Sys Admin. – Sam Nov 17 '14 at 02:14
  • It looks like it was enabled. I came up with a solution. I'll update the thread shortly. – Sam Nov 17 '14 at 03:37
  • 1
    `Console.Beep` runs at a different level than `RDP`. It uses the old Bios Speaker instead. So in all likelyhood the remote box was beeping away happily. :) – Aron Nov 17 '14 at 03:44

1 Answers1

1

The solution was to directly play an audio file. I tried Console.Beepand System.Media.SystemSounds.Beep.Play with no luck!

 Console.Beep(); // It didn't work. 


 System.Media.SystemSounds.Beep.Play(); // IT didn't work either 


  // Playing directly a wave file produced audio. 
  using (var soundPlayer = new SoundPlayer(@"c:\Windows\Media\ding.wav"))
  {
    soundPlayer.Play(); // can also use soundPlayer.PlaySync()
  }
Sam
  • 813
  • 9
  • 19