0
0

Hello,

I have problem seeking through a streamed mp3. The documentation around Channel::setPosition() didn’t help me. The stream is via HTTP URL, the mp3 is CBR. The error I always get is (FMOD_Channel_SetPosition):

quote:2yj99f6d Couldn’t perform seek operation. This is a limitation of the medium (ie netstreams) or the file format. [/quote:2yj99f6d]

I am unable to seek if the file is paused, playing, or opened paused, seeked and then unpaused, I always get this error. I am opening the file and then trying to play it this way:

[code:2yj99f6d]CString location="http://server:port/path/cbr_file.mp3";
FMOD_SYSTEM *system;
FMOD_SOUND *sound;
FMOD_CHANNEL *channel;
FMOD_System_CreateStream(system,location,FMOD_HARDWARE|FMOD_LOOP_OFF|FMOD_2D,0,&sound);
FMOD_System_PlaySound(system,FMOD_CHANNEL_FREE,sound,false,&channel);[/code:2yj99f6d]

And I am trying to seek this way:

[code:2yj99f6d]unsigned int msec=5000;
FMOD_Channel_SetPosition(channel,msec,FMOD_TIMEUNIT_MS);[/code:2yj99f6d]

Am I doing something wrong or is FMOD unable to seek through HTTP streamed mp3s? I suppose I am mistaken, because HTTP seeking is normally possible and if I am using CBR mp3s, there souldn’t be any problem.

  • You must to post comments
0
0

I don’t know for sure. But, given the normal definition of “streams” they are sequential only and cannot be randomly accessed. That is, if you could seek within the stream it would only be within the current buffer window.

But don’t take my word for it. I’m just taking a stab in the dark.

  • You must to post comments
0
0

Sounds quite possible. As I am trying to get it work (if possible at all) I’m beginning to think that Channel::setPosition() refuses to seek for network streams – URLs.

I will keep trying to get it work, though it would be helpful to know for sure what is FMOD natively able to to and what it is not. And I think there could be ways for implementing this – with filesystem callbacks or seekData(). I hope there is some way to be able to seek through a stream. At least, to be able to start playback from a certain position, not always from 0.

  • You must to post comments
0
0

Just another odd thing I noted is that the old Channel::setTime() [b:3jwc5raf]was able[/b:3jwc5raf] to seek through streams or at least didn’t give any error messages (as I have tested it), but the old Channel::setPosition() gave the same error message. And although setTime() was removed and setPosition() took over its job, setPosition() kept displaying the same error message when called for streamed playback.

  • You must to post comments
0
0

Is there any way I could seek a HTTP stream?
Maybe defining my filesystem callback functions?

It is not impossible if I can tell the web server the position I want to download from. I think winamp’s and realplayer’s seeking through a HTTP stream is based on this. And if they can do it, why couldn’t FMOD do it, being a great piece of work, as I find it?

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.