[Mono-bugs] [Bug 82551][Wis] New - When constructing a SoundPlayer with a stream as sound data source, which refers to a resource, nothing happens.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 23 14:43:36 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by stacheldraht at interia.pl.

http://bugzilla.ximian.com/show_bug.cgi?id=82551

--- shadow/82551	2007-08-23 14:43:35.000000000 -0400
+++ shadow/82551.tmp.4807	2007-08-23 14:43:35.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 82551
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: Linux 2.6.18 i686 [openSuSE 10.2] + KDE 3.5
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: stacheldraht at interia.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: When constructing a SoundPlayer with a stream as sound data source, which refers to a resource, nothing happens.
+
+Description of Problem:
+
+The code affected is the following one:
+
+using System;
+using System.Media;
+using System.IO;
+using System.Reflection;
+using Gtk;
+
+public static void PlaySuccessSound()
+{
+	Assembly a = Assembly.GetExecutingAssembly();
+	Stream s = a.GetManifestResourceStream("success.wav");
+	System.Media.SoundPlayer sp = new System.Media.SoundPlayer(s);
+	sp.Stop();
+	sp.LoadAsync();
+	sp.Play();
+}
+
+sp.Play() has no effects at all (even if I omit the Stop() and LoadAsync()
+methods). No error message is given.
+
+Actual Results: Nothing happens, not even an error message!
+
+Expected Results: That the wavesound "success.wav", which is a resource
+embedded in the same assembly as the code listed above, will be output
+through the LINE OUT interface of my sound card.
+
+
+How often does this happen? Every time I call the method (fully reproducible).
+
+Additional Information: Some sources (eg
+http://www.codeproject.com/cs/media/soundplayerbug.asp) report that this
+bug is also found in the Microsoft .net class library.


More information about the mono-bugs mailing list