[Mono-list] System.Media.SoundPlayer performing badly on Linux?

Paul paul at all-the-johnsons.co.uk
Mon Apr 20 16:38:36 EDT 2009


Hi,

> I've been experimenting with SoundPlayer as a possible cross-platform
> backend for notifications in Gazebo.  Unfortunately it seems quite
> lacking on Linux.  When playing a sound, no matter the source, it
> skips very badly, making the sound agonizing to listen to.

On mono-2.4 and using this code, it sounds like the audio file is being
dragged through cold tar with a broken skate!

using System;
using System.Media;

namespace playsound
{
  public class playsound
  {
    public static void Main()
    {
      SoundPlayer sp = new SoundPlayer();
      sp.SoundLocation = @"noise.wav";
      Console.WriteLine(sp.SoundLocation);
      sp.Load();
      sp.PlaySync();
      Console.WriteLine("Finished");
      Console.ReadKey();
    }
  }
}

TTFN

Paul
-- 
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-list/attachments/20090420/65167f2e/attachment.bin 


More information about the Mono-list mailing list