0
0

I am not sure if anyone can help me with this, but I might as well check.

I am trying to make FMOD-EX wrappers in REALbasic on MAC OX 10.3. I decided to start out easy by just trying to convert the VB PlaySound Example.

I had been doing ok, until I got to CreateSound.

In short, I keep getting a “FILE NOT FOUND” error from FMOD.

To my knowledge I believe I am passing the C String of the file name correctly, and to keep things simple I put the FMOD library and the sound file in same folder in which I am developing the application.

Below is the code, so does anyone have any idea why FMOD wouldn’t be able to find the sound file?

====

[The Program call]

result = FMODEX.FMOD_System_CreateSound(system, “drumloop.wav”, FMOD_SOFTWARE, 0, sound1)
ERRCHECK (result)

====

[The Declare to FMOD]

FMODEX.FMOD_System_CreateSound:
Protected Function FMOD_System_CreateSound(SystemFMOD As Integer, name_or_data As String, mode As Integer, exinfo As integer, ByRef Sound As Integer) As Integer

#if targetWin32
#elseif targetLinux
#elseif targetMachO

Dim result as Integer

Declare Function FMOD_System_CreateSound Lib FMODdylibLocation (System As Integer, name_or_data As CString, mode As Integer, ByRef exinfo As Integer, ByRef Sound As Integer) As Integer
result = FMOD_System_CreateSound( SystemFMOD, name_or_data, mode, exinfo, Sound )

return result

#endif
End Function

====

Thanks ahead.

Peace

Stan

  • You must to post comments
0
0

I don’t know realbasic programming but try passing the pointer to a string instead of the string itself. (name_or_data param)

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.