public Wavetable GetWavetable(int tableIndex)
        {
            WavetableNative* data = GetWavetable(instance, tableIndex);

            Wavetable managed = new Wavetable();
            managed.Count = data->Count;
            managed.WavetableDataSize = data->WavetableDataSize;
            managed.WavetableData = new float[managed.WavetableDataSize];

            for (int i = 0; i < managed.WavetableDataSize; i++)
            {
                managed.WavetableData[i] = data->WavetableData[i];
            }

            return managed;
        }
Example #2
0
        public Wavetable GetWavetable(int tableIndex)
        {
            WavetableNative *data = GetWavetable(instance, tableIndex);

            Wavetable managed = new Wavetable();

            managed.Count             = data->Count;
            managed.WavetableDataSize = data->WavetableDataSize;
            managed.WavetableData     = new float[managed.WavetableDataSize];

            for (int i = 0; i < managed.WavetableDataSize; i++)
            {
                managed.WavetableData[i] = data->WavetableData[i];
            }

            return(managed);
        }