csoundGetTable function

List<double> csoundGetTable(
  1. Pointer<Void> csound,
  2. int table
)

Implementation

List<double> csoundGetTable(Pointer<Void> csound, int table) {
  Pointer<Pointer<Double>> ptr = Pointer.fromAddress(nullptr.address);
  int res = csoundGetTableC(csound, ptr, table);
  Pointer<Double> myfltPtr = ptr[0];
  List<double> l = List.generate(res, (index) => 0.0);
  for (int i = 0; i < res; i++) l[i] = myfltPtr[i];
  return l;
}