Update utils.dart (#2275)

Fix normalizer for int16_t samples in flutter_examples.
This commit is contained in:
flying-forever
2025-06-03 20:28:33 +08:00
committed by GitHub
parent 6cb44d44e9
commit 818b3f6d6c

View File

@@ -32,7 +32,7 @@ Float32List convertBytesToFloat32(Uint8List bytes, [endian = Endian.little]) {
for (var i = 0; i < bytes.length; i += 2) {
int short = data.getInt16(i, endian);
values[i ~/ 2] = short / 32678.0;
values[i ~/ 2] = short / 32768.0;
}
return values;