开发者

Uploading / Simulating a Collection of Songs on the Windows Phone 7 Emulator

I am writing a windows phone 7 game that deals with extracting the spectrum out of a song and building the game level based on that. The only problem I have so far, though is that I cannot use any song out of the Zune media library, because there aren't any on the em开发者_如何转开发ulator. I do not have a device yet. I downloaded an unlocked build of the emulator, which has more apps, including zune, but when I open Zune, it seems to be empty.

Can I somehow upload or simulate (add songs to the medialibrary at runtime) a song collection so that I can test the game with the emulator?

P.S. I think that there's a tool that let's you sync your device to the Zune client on the PC, but I'm not sure whether it will work with the emulator.

Please, help.


No you can't sync between your PC and the emulator.

I, however see 3 songs available in the emulator by default though.
You can access them via the MediaLibrary.Songs collection. Simply add a reference to Microsoft.Xna.Framework (Yes, even if you've got a Silverlight based project.) and you're good to go.

using (var myMediaLibrary = new Microsoft.Xna.Framework.Media.MediaLibrary())
{
    foreach (var song in myMediaLibrary.Songs)
    {
        songList.Items.Add(new TextBlock {Text = song.Name});
    }
}

You must have the RTM version of the tools though as they weren't there in the Beta or CTP versions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜