Пример #1
0
    //==========================================================================//
    //================= Wrapper methods for the native plugin ==================//
    //==========================================================================//

    public void addPhraseFromData(string label, string[] colNames, float[] phrase,
                                  int dimIn, int dimOut)
    {
        IntPtr unmanagedFArray = Marshal.AllocHGlobal(phrase.Length * sizeof(float));

        Marshal.Copy(phrase, 0, unmanagedFArray, phrase.Length);

        XmmInterface.addPhraseFromData(label, colNames, unmanagedFArray,
                                       dimIn, dimOut, phrase.Length / (dimIn + dimOut));

        Marshal.FreeHGlobal(unmanagedFArray);
    }