在 Silverlight 中反向播放 mp3

发布于 2024-07-17 22:46:03 字数 188 浏览 3 评论 0原文

因此,考虑到 Silverlight 拥有 .net 框架的一个很好的子集,您可能会认为反向播放音频不会很困难,对吗? 好吧,不。 我什至找不到一个好的起点。 MediaElement 似乎没有能力反向播放音频。

有谁知道如何做到这一点? 在 .net winforms 应用程序中这会更容易吗?

TIA。

So considering that Silverlight has a nice subset of the .net framework, you would think that it wouldn't be very difficult to play audio in reverse, right? Well no. I can't even find a good place to start. It doesn't seem like the MediaElement has the ability to play audio in reverse.

Does anyone have ANY CLUE how this can be done? Would this be easier to do in a .net winforms app?

TIA.

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

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

发布评论

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

评论(4

怎会甘心 2024-07-24 22:46:04

mp3 格式不可逆,

将 mp3 解码为 wav,颠倒样本顺序,重新编码为 mp3,然后播放

the mp3 format is not reversible

decode the mp3 to wav, reverse the order of the samples, re-encode to mp3, then play it

囚我心虐我身 2024-07-24 22:46:04

DirectX 具有相当多的音频功能。 我会检查那个或新的 XNA 框架。

DirectX had quite a bit of audio abilities. I would check that or the new XNA framework.

醉酒的小男人 2024-07-24 22:46:04

MP3 格式未编码为反向播放。 它需要您解码、反转,然后重新编码,这将需要一些时间和 CPU。

如果我是您,我会在音频编辑器程序中反转 MP3,保存它,然后在您的应用程序中播放该 MP3。

MP3 format is not encoded to be played in reverse. It would require you to decode, reverse, then re-encode, which will take a bit of time and CPU.

If I were you, I would just reverse the MP3 in an audio editor program, save it, then play that one in your application.

妞丶爷亲个 2024-07-24 22:46:04

应该可以倒放MP3。 音频数据以块的形式存储。 这些块需要以相反的顺序读取、解码并以相反的 PCM 样本顺序传递到 MediaStreamSource。

唯一的问题是必须首先完全读取流才能稍后向后读取。

我在这里编写了一个Silverlight的MP3解码器(源代码很快就会上传
)。 我想你应该很容易重写它来反向播放 MP3。

It should be possible to play MP3 in reverse. The audio data is stored in chunks. The chunks will need to be read in reverse order, decoded and passed to the MediaStreamSource in reverse PCM sample order.

The only issue is that the stream has to be first read in fully to be able to read it backwards later.

I've written an MP3 decoder for Silverlight here (source code will be uploaded shortly
). I think it should be easy for you to rewrite it to play an MP3 in reverse.

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