[Mono-dev] Mono 2.0 problem (is it me though?)
Jonathan Chambers
joncham at gmail.com
Fri Aug 29 13:55:08 EDT 2008
Hi,
I don't think you want Application.ExecutablePath do you? You'd get
C:\...\test.exenoise.wav
- Jonathan
2008/8/29 Paul <paul at all-the-johnsons.co.uk>
> Hi,
>
> 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";
> sp.Play();
> }
> }
> }
>
> 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(); } )
>
> TTFN
>
> Paul
>
> --
> Sie können mich aufreizen und wirklich heiß machen!
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080829/017c9108/attachment.html
More information about the Mono-devel-list
mailing list