AudioTrack及其AlbumArt [英] AudioTrack and its AlbumArt

查看:88
本文介绍了AudioTrack及其AlbumArt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图 运行背景音频播放器示例  - 音乐正在播放,一切正常,但没有可见的AlbumArt。

I'm trying to run Background Audio Player Sample - the music is playing, everything ok, except that there is no AlbumArt visible.

我检查的所有内容似乎都没问题 - 文件被复制到共享/媒体/,它们具有正确的分辨率(根据最佳实践),Uri Relative 等等。我尝试了几乎所有我想到的东西,但我没能让它发挥作用。

Everything as I've checked seems to be all right - files are copied to Shared/media/, they have correct resolution (according to best practices), Uri Relative and so on. I tried almost everything what came to my mind but I've failed to get it working.

是否可以设置BAP的AudioTrack以便还有AlbumArt?

Is it possible to set AudioTrack of BAP so that there is also AlbumArt?

AudioTrack myTrack = new AudioTrack(track.source, track.Title, track.Artist, track.Album, new Uri("shared/media/Episode29.jpg", UriKind.Relative));

推荐答案

你好,

您的代码看起来没问题。对于无法访问的路径,这可能是一个问题。

Your code looks okay. It is likely a problem with an unreachable path.

在寻址路径中的本地文件夹时,使用 isostore ms-appdata URI方案名称。虽然您可以使用这两种URI方案来访问本地文件夹,但它们不能互换使用。使用" ms-appdata:/// local / "
来解决使用Windows命名空间中的API的本地文件夹的根目录。对于所有其他API,请使用" isostore:/ "来寻址本地文件夹的根目录。以下代码显示了如何使用这些URI方案的一些示例。

Use the isostore or ms-appdata URI scheme names when addressing the local folder in a path. Although you can use both of these URI schemes to access the local folder, they cannot be used interchangeably. Use "ms-appdata:///local/" to address the root of the local folder with APIs that are in the Windows namespace. For all other APIs, use "isostore:/" to address the root of the local folder. The following code shows some examples of how to use these URI schemes.

您还可以使用"隔离存储资源管理器"。验证你需要使用的路径。

You can also use the "isolated storage explorer" to verity the path that you need to use.

Windows Phone的数据

Data for Windows Phone

http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402541(v=vs.105 ).aspx

如何使用Windows Phone的Isolated Storage Explorer工具

How to use the Isolated Storage Explorer tool for Windows Phone

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286408(v = vs.105).aspx

我希望这会有所帮助,

James


这篇关于AudioTrack及其AlbumArt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆