# uint8ListToFloat32List method

List<Float32List> uint8ListToFloat32List(

1. List<Uint8List> buf, {
2. Endian endian = Endian.little,

})

Transform a Uint8List to a Float32List

## Parameters

- buf: is the buffer you want to convert
- endian: is the endianness of your data

## Return

- a `Float32List` containing the transformed buffer

## Example

    List<Float32List> myFloat32List = uint8ListToFloat32List(myUint8List);

## Implementation

    List<Float32List> uint8ListToFloat32List(
      List<Uint8List> buf, {
      Endian endian = Endian.little,
    }) {
      List<Float32List> r = [];
      for (Uint8List channelData in buf) {
        int ln = ((channelData.length) / 4).floor();
        final bd = ByteData.sublistView(channelData);
        Float32List f32List = Float32List(ln);
        //int ix = 0;
        for (int offset = 0, ix = 0; offset < ln; offset += 4, ++ix) {
          f32List[ix] = bd.getFloat32(offset, endian);
        }
        r.add(f32List);
      }
      return r;
    }