5
我試圖從播放音樂,從手機中收集歌曲。在windows phone 7中的音效
音效屬性是否支持從歌曲集合播放?
以前我用媒體播放器播放歌曲,但我想設置音樂不能暫停。
聲音效果代碼: SoundEffect效果; SoundEffectInstance實例;
effect = SoundEffect.FromStream(ml.Songs[songSelectedIndex]);
instance = effect.CreateInstance();
instance.IsLooped = true;
instance.Volume = 1.0f;
instance.Pitch = 1.0f;
instance.Play();
守則媒體庫:
using (var ml = new MediaLibrary())
{
FrameworkDispatcher.Update();
MediaPlayer.Play(ml.Songs[songSelectedIndex]);
MediaPlayer.IsRepeating = true;
}
我試圖就如何使用mediaStateChanged研究,但我沒有真正找到它的一個樣本。你有一個例子嗎? –
@ben tan - 已更新回答 – keyboardP