Home » Questions » FSOUND_STREAM_OPENFILE does not work under Delphi (fmod 3.7)

0

0

I want to play a MP3 using FSOUND_STREAM_OPENFILE but I got a message that the function does not exsits in the library. The documentation says I should use FSOUND_STREAM_OPEN to play streams but this does not work too.
How do I play MP3s with the stream functions?

In order for your problem to be solved you should post the code you are using. Most of these problems are caused by improper use of the function. In FMOD 3.7 it changed from FSOUND_Stream_OpenFile to FSOUND_Stream_Open, because an extra parameter was put in (offset).

That’s just odd because the version of fmod.pas that is in the distribution already has that function renamed. You also have the old parameter names with an incorrect number of parameters. This is the correct declaration of FSOUND_Stream_Open from FMOD 3.70

Note the parameter name name_or_data and there are four parameters, not three. Your code sample plainly tells me that you have a header file from an older version of FMOD because the function declaration you showed was from 3.63 and earlier.

Ooh… hang on, Brett. I just downloaded the Linux distro and it contains the Delphi headers from 3.63. Ace was right. The Linux distro contains the 3.63 Delphi files.

Sorry, Ace. The Win32 distro has the correct Delphi files, but it seems the Linux distro got missed. Until the Linux distro is fixed, I would recommend downloading the Win32 distro and extracting the Delphi files from there.

FSOUND_STREAM_OPEN / FSOUND_Stream_Open = I can compile it but i got the message that this function is not available in the lib. Kylix unregisters my component in which I will use that code. So I can’t use it.
FSOUND_STREAM_OPENFILE / FSOUND_Stream_OpenFile = can’t compile it – function not found

Why is the function not found in the lib? Can this be a mistake in the lib file?

I don’t use Linux, but I did download the Linux version of 3.70 and did a search through libfmod-3.70.so using a hex editor. I found the text “FSOUND_Stream_Open” as I expected to. So I do not know what else to suggest.