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:
And I am trying to seek this way:
[code:2yj99f6d]unsigned int msec=5000;
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.
- wireman asked 12 years ago
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.
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?
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.
- AngryLlama answered 12 years ago
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.
Please login first to submit.