locked
Sound in Emulator but not Device RRS feed

  • Question

  • Hello,

    My app plays a sound when a certain button is pressed.  The sound plays fine in the emulator, but not on the device (Samsung Focus).  When my app starts, I have a popup message that appears and the "pop up" sound plays that is associated with popups, but my other sounds do not work.

    Here is some code:

    <MediaElement x:Name="BellSound" Height="100"  
                              VerticalAlignment="Bottom" Margin="176,0,204,69"  
                              AutoPlay="False"/> 



                //play sound 
                BellSound.Stop(); 
                BellSound.Source = new System.Uri("bell.wma", System.UriKind.Relative); 
     
                System.Threading.Thread.Sleep(50); 
                BellSound.Play(); 


    Thank you in advance.
    Wednesday, June 22, 2011 1:13 AM

All replies

  • Hi,

    You might want to characterize the issue further by trying a different phone brand and by trying different audio formats.  Inspect the audio file to ensure it adheres to the supported media codecs.  See if reformatting the audio file using tools such as Audacity helps.

    Hope this helps,
    Mark
    Wednesday, June 22, 2011 5:14 PM
  • When you are trying to play it on the device, is the device connected to the PC with Zune running?  Media playback is disabled while Zune is running.  Disconnect the device from the PC or use the WPConnect tool.  You will find help on using WPConnect in the 7.0 documentation.
    Thursday, June 23, 2011 12:31 AM