Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug Sound gets quiet after first play
3 replies. Latest Post by seemar on March 27, 2008.
(0)
kaseg
Member
26 points
15 Posts
05-22-2007 8:24 PM |
I have a canvas with a mouse click, here's the code on the back:
MediaElement _mediaElement; public void Page_Loaded(object o, EventArgs e) { _mediaElement = new MediaElement(); _mediaElement.AutoPlay = false; _mediaElement.Source = new Uri("Media/click.mp3", UriKind.Relative); _mediaElement.MediaEnded += new EventHandler(_mediaElement_MediaEnded); Children.Add(_mediaElement); } void MouseClick(object sender, MouseEventArgs me) { _mediaElement.Stop(); _mediaElement.Play(); }
The first time, the sound plays fine...every time thereafter, it plays really quietly. The volume property only seems to effect the first play. If you click often, you'll get a mix of loud and quiet sounds.
seemar
128 points
39 Posts
06-08-2007 12:48 AM |
we'll take a peek, thx!
y_makram
Contributor
6172 points
1,233 Posts
06-08-2007 10:15 AM |
I have the same issue, and I am using Silverlight 1.0, and JavaScript. I use the same technique of stopping the media element then playing it. There is no specific pattern for the sound volume, sometimes it is up, and sometimes down.
03-27-2008 5:51 PM |
Thank you for reporting.
Can someone please share their application out? We would like to drill in
-Seema(email works: seemar@microsoft) [msft]