从流播放MP3 [英] Play MP3 from stream

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

问题描述

使用VB.NET或C#有没有办法直接从内存流播放MP3(不带任何温度的文件)?或者从SQLCE数据库玩?

Is there any way to play MP3 directly from a memory stream (without any temp. files) using VB.NET or C#? or play from SQLCe database?

感谢

推荐答案

我会建议你试试 Mp3Sharp 。这是JavaLayer的一个端口,它是用C#编写。我目前使用它,SlimDX玩的Shoutcast MP3流。到目前为止,它工作得很好。
还有您可以使用它读取流并返回字节PCM预定数量的Mp3Stream类。你可以写这些字节为如果你想播放一个DirectSound的缓冲区。

I'll suggest you try Mp3Sharp. It is a port of JavaLayer and it is written in C#. I am currently using it and SlimDX to play ShoutCast Mp3 streams. So far it works very well.
There is an Mp3Stream class which you use to read the stream and return a predetermined number of PCM bytes. You can write those bytes to a DirectSound buffer for playback if you wish.

这篇关于从流播放MP3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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