0
0

I’ve created a script in Unity for implementing the NetStream example for FMOD using FMod 3.42 from http://www.squaretangle.com/FMODUnity.html

However, the net stream example that I’ve converted only works for Windows. It doesn’t really matter what URL I pass in there, the same error comes up. FMOD error! ERR_FILE_NOTFOUND – File not Found

I would love to be able to do this on a Mac!! I can give more source, but I think if you’re the person to answer this, you probably already know how to test it.

Would someone please shed some light on what might be causing the problem?

[code:18c1ncyp]
result = system.createSound(url, (FMOD.MODE.HARDWARE | FMOD.MODE._2D | FMOD.MODE.CREATESTREAM | FMOD.MODE.NONBLOCKING), ref sound);

Update()
{
if (soundcreated)
{
result = sound.getOpenState(ref openstate, ref percentbuffered, ref starving, ref diskBusy);
ERRCHECK(result);
}
...
}
[/code:18c1ncyp]

  • You must to post comments
0
0

Which .dylib is responsible for creating a streaming sound? Could it be that they aren’t properly compiled in this example? Any help would be greatly appreciated.

  • You must to post comments
0
0

createSound() is in fmodex.dll / libfmodex.dylib
No positive but your problem could be in passing a relative url.
What is the url you are passing?
try to hardcode it as a check
eg: result = system.createSound("Assets/FMOD/drumloop.wav", FMOD.MODE.HARDWARE, ref sound1);
if that works then try passing your url starting with "Assets/……"
You may have to play with where you put your sound assets. You could try the Resources folder or a path that unity will automatically include.

johnny

  • You must to post comments
0
0

Thanks for letting me know that the .dylib is exactly as compiled by FMOD. That could mean that this particular issue is caused by FMOD itself. I’m sure with your skills and those of the forum moderators, this is a solvable issue.

[quote="JohnnyTangle":2hs5d80b]
Not positive but your problem could be in passing a relative url.
What is the url you are passing?
[/quote:2hs5d80b]
Here is what I was trying to do: as interpreted from what I saw in the NetStream example. The next thing I will try is to stream in an asset as you’ve stated. The assets from the demo worked, but seeing as those aren’t streamed (due to their small size), it’s worth a check.

[code:2hs5d80b]string url = @"http://ogg2.as34763.net/vr160.ogg";

result = system.createSound(url, (FMOD.MODE.HARDWARE | FMOD.MODE._2D | FMOD.MODE.CREATESTREAM | FMOD.MODE.NONBLOCKING), ref sound);[/code:2hs5d80b]

  • You must to post comments
0
0

I just tried this [code:11cvjr6h]result = system.createSound("Assets/FMOD/jaguar.wav", (FMOD.MODE.HARDWARE | FMOD.MODE._2D | FMOD.MODE.CREATESTREAM | FMOD.MODE.NONBLOCKING), ref sound);[/code:11cvjr6h]

The hardcoded path does work on both windows and mac. Although at the end (after it plays) it gives ERR_INVALID_HANDLE an invalid object handle was used. But, I suppose that probably has more to do with the fact that it ran out of file to load before it thought that might happen.

  • You must to post comments
0
0

Seems like a problem passing the url.
Does this happen on both win and mac?
if all else fails you could try getting your asset through unity’s WWW class and passing it to fmod.
j

  • You must to post comments
0
0

[quote="JohnnyTangle":2lqjxcx5]Seems like a problem passing the url.
Does this happen on both win and mac?[/quote:2lqjxcx5]
It works absolutely fine on windows, so there is no need for Unity’s WWW. Maybe it’s some kind of formatting issue with the url, but I think it’s something more complicated. It could be a Unity security setting.

Maybe the function call for this is completely different than in windows. That would mean that it is not wrapped the same as what is done in this project.

Is their a guru who knows if that is a possibility?

  • You must to post comments
0
0

The solution to this problem is in a newer (more specific) post that I made.

viewtopic.php?f=7&t=15637

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.