开发者

Streaming a remote file

i'm开发者_StackOverflow中文版 new to fmod, and I'm trying to use it for a simple application. I just need to open a remote music file (mostly mp3, and if that can help I can transcode on the server to always have mp3).

When I try to

FMOD_System_CreateSound(system, "http://somewhere.com/song.mp3", FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM, 0, &song);

That works fine, it open and play the mp3 fine.

But, when I try to do what I realy need :

FMOD_System_CreateSound(system, "http://somewhere.com/somepage.view?id=4324324324556546456457567456ef3345&var=thing", FMOD_SOFTWARE | FMOD_2D | FMOD_CREATESTREAM, 0, &song);

It just don't works. That link for example would return a stream.mp3 file, but FMOD just fail on it. Is there a way to make it works ? I guess the problem is FMOD just don't find the filename in the link, but I can't change the link :/

If it's not possible, is there a way to make fmod works with curl (curl download the file perfectly), like a function to call for each part of the file ? Thanks


The main issue with session ID based URLs is they can get quite long. Old versions of FMOD only supported 256 characters (causing truncation and failure to load), but any recent supported version allows up to 1024 characters.

I would recommend updating to a more recent version of FMOD and report back if you have any troubles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜