I’m having a look at the Csound for Android code.
I found something that is not so clear to me.
In the native interface (csndJNI.java) there are two different methods of the GetSpoutSample, and just one of the SetSpinSample.
This is what I found at line 342:
public final static native float csoundGetSpoutSample(long jarg1, int jarg2, int jarg3);
and line 813:
public final static native float Csound_GetSpoutSample(long jarg1, Csound jarg1_, int jarg2, int jarg3);
while for the SetSpinSample there is just a native method, at line 340:
public final static native void csoundSetSpinSample(long jarg1, int jarg2, int jarg3, float jarg4);
This makes me a bit confused. What’s the difference between these native methods?
In Csound.java there is the implementation for GetSpoutSample, line 583:
public float GetSpoutSample(int frame, int channel) {
return csndJNI.Csound_GetSpoutSample(swigCPtr, this, frame, channel);
}
There I can also see an implementation for AddSpinSample, but not for SetSpinSample.
I’ll have to add the SetSpinSample method to do some tests for the crash we have in CsoundUnity when targeting Android.
Maybe I should ask on Slack?
EDIT:
I just read that Csound.java, csndJNI.java and all the referenced code are generated using SWIG.
I don’t know how it works