首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

SoundEffect有关问题

2013-11-19 
SoundEffect问题public partial class Round2 : PhoneApplicationPage{Stream stream nullStreamResour

SoundEffect问题
public partial class Round2 : PhoneApplicationPage
    {
        Stream stream = null;
        StreamResourceInfo info = Application.GetResourceStream(new Uri("Music/rain.wav", UriKind.Relative));
        DispatcherTimer timer = new DispatcherTimer();
        public Round2()
        {
            InitializeComponent();
            if (info != null)
            {
                stream = info.Stream;
            }
            SoundEffect sound = SoundEffect.FromStream(stream);
            SoundEffectInstance soundInstance = sound.CreateInstance();
        }
    }

为什么在运行SoundEffect sound = SoundEffect.FromStream(stream);时会出错,求告知原因,谢谢~SoundEffect有关问题
[解决办法]
报什么错呢?http://www.cnblogs.com/huizhang212/archive/2012/03/12/SoundEffect.html

热点排行