FMOD_DSP_GetOutput() private method

private FMOD_DSP_GetOutput ( IntPtr dsp, int index, IntPtr &output, IntPtr &outputconnection ) : RESULT
dsp System.IntPtr
index int
output System.IntPtr
outputconnection System.IntPtr
return RESULT
Beispiel #1
0
        public RESULT getOutput(int index, ref DSP output, ref DSPConnection outputconnection)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;
            IntPtr raw2   = IntPtr.Zero;

            try
            {
                rESULT = DSP.FMOD_DSP_GetOutput(dspraw, index, ref raw, ref raw2);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (output == null)
                {
                    DSP dSP = new DSP();
                    dSP.setRaw(raw);
                    output = dSP;
                }
                else
                {
                    output.setRaw(raw);
                }
                if (outputconnection == null)
                {
                    DSPConnection dSPConnection = new DSPConnection();
                    dSPConnection.setRaw(raw2);
                    outputconnection = dSPConnection;
                }
                else
                {
                    outputconnection.setRaw(raw2);
                }
                result = rESULT;
            }
            return(result);
        }