简体   繁体   English

播放加密的mp3文件

[英]Play an encrypted mp3 file

I am currently trying to play a encrypted .mp3 file. 我目前正在尝试播放加密的.mp3文件。 The way I am currently using is: 我目前使用的方式是:

loading the encrypted file -> decrypting it -> save it to ISO -> play it with the backgroundaudioplayer . loading the encrypted file -> decrypting it -> save it to ISO -> play it with the backgroundaudioplayer

But this can take up to 10-15 seconds to start one .mp3 file. 但这可能需要10到15秒才能启动一个.mp3文件。 Is there any other way to do this faster ? 还有其他方法可以更快地做到这一点吗? For example is there a way to play from a stream and somehow decrypt it while playing ? 例如,是否有一种方法可以从流中播放并在播放时以某种方式对其进行解密?

And is there actually the need for encrypting the files on the IsolatedStorage ? 并且实际上是否需要对IsolatedStorage上的文件进行加密? Since nobody should be able to touch them anyways ?! 既然没有人应该能够触摸它们呢?

好吧,因为它已经使用了很长时间了,所以我建议“缓冲”它的确很简单,让解密流从文件的前20秒左右为您提供一个大小合适的缓冲区,这应该比等待最多快几秒钟。整个文件,然后只需使用解密的缓冲区简单地将backgroundplayer送入,其余的仍在解密。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM