rorywalsh / CsoundUnity

GNU Lesser General Public License v2.1
72 stars 20 forks source link

Can't find "/Assets/StreamingAssets/CsoundUnityNativePlugin.dll" #6

Closed bellicapax closed 5 years ago

bellicapax commented 5 years ago

Hi!

When using Unity 2018.2.14f1 and calling the setInputSample()method (which in turn calls setCsoundInputSample()), Unity can no longer find the CsoundUnityNativePlugin.dll with the relative path specified. I assume this was a change in some version, but the solution is to take out the path and simply qualify that .dll file the same way you qualify the csound64.dll file, just with it's name.

internal const string _dllVersionCsUnity = "CsoundUnityNativePlugin.dll";

rorywalsh commented 5 years ago

Hi @bellicapax, the latest version doesn't require that dll at all now that Csound itself provides access to these. Leave it with me a moment and I'll see if I can fix this.

rorywalsh commented 5 years ago

Can you try pulling the new scripts from the develop branch. Just replace the ones you have in your project's CsoundUnityScripts folder. It's completely untested so if you want to use Csound to process audio that Unity is reading from a clip then you might hit issues. If all your doing is using Csound to generate audio on the fly, or even read files itself from the assets folder it should work fine. Let me know.

bellicapax commented 5 years ago

Hi! Sorry I went dark on this, but your solution did work with the exception of line 207 in CSoundUnity.cs

It currently is:

        csound.setInputSample(pos, channel, sample);

It should be:

        csound.setSpinSample(pos, channel, sample);
giovannibedetti commented 1 year ago

@all-contributors add @bellicapax for bug

allcontributors[bot] commented 1 year ago

@giovannibedetti

I've put up a pull request to add @bellicapax! :tada: