[Mono-dev] Mono 2.0 problem (is it me though?)

Paul paul at all-the-johnsons.co.uk
Fri Aug 29 13:41:58 EDT 2008


Really simple test for a problem using System.Media.PlaySound - it gives
nothing under Win32 or Mono so I'm thinking it's me!

using System;
using System.Media;
using System.Windows.Forms;

namespace playsound
  public class playsound
    public static void Main()
      SoundPlayer sp = new SoundPlayer();
      sp.SoundLocation = Application.ExecutablePath + @"noise.wav";

gmcs playsound.cs -r:System.Windows.Forms;
mono playsound.exe (Linux)
playsound (Win32 - from the command line)

No runtime error, but no sound either. Can SoundPlayer be called
directly from within Main or does it need to be called from there via
another function (e.g. public static void Main() { dosound(); } )



Sie können mich aufreizen und wirklich heiß machen!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080829/31cde881/attachment.bin 

More information about the Mono-devel-list mailing list