wp7 SoundEffect 播放绑定到滚动条

发布于 2024-10-06 16:51:18 字数 96 浏览 5 评论 0原文

我正在思考如何播放音乐并在滚动条上显示当前的播放时间。我使用 SoundEffectInstance 类,因为我从 MemoryStream 播放它。

请帮助我。

I'm wandering how to play music and show the current playing time on scrollbar. I'm using the SoundEffectInstance class because I play it from MemoryStream.

pleas help me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等待我真够勒 2024-10-13 16:51:18

创建一个计时器,当您开始播放声音/音乐时启动该计时器。

然后您可以使用此计时器来显示经过的时间。如果您知道音乐的长度,您还可以计算剩余时间。

当用户暂停和停止音乐(如果适用)时,请务必考虑暂停和停止计时器。另外,请务必在逻辑删除时适当暂停并保存当前经过的时间。

Create a timer which you start when you start playing the sound/music.

You can then use this timer to show elapsed time. If you know the length of the music you can also calculate the remaining time.

Be sure to account for pausing and stopping the timer when the user pauses and stops the music (if applicable). Also be sure to pause and save the current elapsed time appropriately when tombstoned.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文