0
0

Hello,
I’m very new to FMOD, and still figuring things out, but I’m just trying a simple project, of streaming an MP3 file from the internet, like http://www.mysite.com/mymp3file.mp3.

I’m trying to get a hang of things using the netstream example, but every mp3 I try to stream I get this error.

Couldn’t perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.

That error is the result of this line
[code:1xl6qlg4]
result = system->createSound(argv[1], FMOD_HARDWARE | FMOD_2D | FMOD_CREATESTREAM | FMOD_NONBLOCKING, 0, &sound);
[/code:1xl6qlg4]

I have tried with various files, I guess I don’t really understand what this error message means, and why I’m getting it. I’m just trying to play the file, not do any seeking? If this is not the way to stream a simple file, what is the way?

Any help or pointers would be great.

Thanks,

Kyle

  • You must to post comments
0
0

The file will contain large tag data, FMOD is happy to read over that stuff but for the MPEG codec to work it needs to do some small seeks. Since you cannot seek a netstream all the seeks must be contained inside the low level file buffer. If you tweak the file buffer size, make it a bit larger you can overcome this restriction. See System::setFileSystem "blockalign" parameter.

  • You must to post comments
0
0

Awesome, thanks mathew.

Just curious, why is it that you cannot seek a netstream?

  • You must to post comments
0
0

The netstream is simply a socket connection to a website, all we do is read from the socket and data comes into our buffers. If the seek destination is within the buffer it’s okay, but once data has been read and discarded we cannot go back (or seek the socket), we would need to reopen the stream and read through the (potentially different) data to the desired position. The concept of seeking a netstream is like trying to fast forward or rewind radio.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.