OzkanAbdullahoglu / react-native-audio-trimmer

audio recorder and trimmer with react native and expo
6 stars 2 forks source link

ArrayBuffer length minus the byteOffset is not a multiple of the element size #65

Open Ferin79 opened 3 years ago

Ferin79 commented 3 years ago

I'm getting this error here both on iOS and Android.

import { encode, decode } from "base64-arraybuffer";
import toWav from "audiobuffer-to-wav";
import util from "audio-buffer-utils";

....
 const fileData = await FileSystem.readAsStringAsync(data.uri, {
            encoding: FileSystem.EncodingType.Base64,
          });
const decodeData = decode(fileData);
const arrayBufferTrim = decodeData;
const audioBufferTrim = createBuffer(
            arrayBufferTrim,
            "int32 le mono 44100"
          );
ashishAmz commented 2 years ago

getting same message while trimming in the console,