bool doPlayNext() { if (uriList.Count > 0) { playItem item = uriList.Dequeue(); fLoop = item.loop; soundElem.Source = item.uri; replay(); return(true); } else { return(false); } }
public void playUri(bool stop, bool _loop, Uri AudioUri) { if (stop) { uriList.Clear(); } else { playItem item = new playItem(AudioUri, _loop); if (uriList.Contains(item)) { return; } } uriList.Enqueue(new playItem(AudioUri, _loop)); if (stopped || stop || fLoop) { doPlayNext(); } }