Mp3文件隔离存储

时间:2012-10-09 12:46:54

标签: c# silverlight windows-phone-7

我想影响我在Microsoft.FrameWorck.Media.Song中读取forme隔离存储的流我完成了这段代码:

  public void Restory()
{
        `  Media.ClearValue(MediaElement.SourceProperty);
          using (IsolatedStorageFile ISF = solatedStorageFile.GetUserStoreForApplication())
          {
              if (ISF.FileExists(MainPage.filename))
                  using (IsolatedStorageFileStream FS = ISF.OpenFile(MainPage.filename,FileMode.Open))
                  {

                      this.Media.SetSource(FS);
                      Media.Play();
                  //Media is Mediaenlement But in this step
                     i want to put that stream in Microsoft.Xna.FrameWorck.Media.Song
                  }
          }
        }

2 个答案:

答案 0 :(得分:0)

听起来像一个tee-stream(为2个消费者分割流)在这里可能很有用,尽管如果读取的速度不同,你就会消耗内存。

Here's an implementationhere's another

答案 1 :(得分:0)

那是不可能的。 Song仅适用于存储在用户的MediaLibrary,远程URI或XAP文件本身中的曲目,但不适用于隔离存储中的曲目。