Closed diwu86 closed 6 years ago
What version of WaveFile are you using? Also, could you give me more information about how WaveFile is being used in your React Native app?
Cheers! Rafael
wavefile": "^6.13.0
import WaveFile from 'wavefile'
import RNFS from 'react-native-fs'
RNFS.readFile(path, 'base64').then(data => {
let wav = new WaveFile()
wav.fromBase64(data)
}
the path is the wav file path.
I try to load data to buffer and get the same error
Could you try installing wavefile@7.0.0-alpha.9 and see if this is still an issue on your build?
Cheers! Rafael
Now when I do let wav = new WaveFile()
, I got TypeError: _wavefile2.default is not a constructor
In version 6: WaveFile = require('wavefile');
In version 7: WaveFile = require('wavefile').WaveFile;
Sorry not to mention that earlier. Did this help?
Yes it's working now. Thank you very much! Are you going to release 7 with the fix?
:D
Yes, but there are more things to do before the release. I'm actually working on byte-data and riff-chunks (dependencies of WaveFile) to fix memory issues. Version 7 will be out after that.
Cheers! Rafael
Fixed in 7.0.0
Hi I use this in my react native project. When I try to load wav file from data no matter base64 or a buffer, I always got error that byteData is an empty so things like byteData.types is undefined. I had to change all other byteData to byteData in file except the definition one here. I also had to do the same thing for riffChunks. Can someone help me with this? I don't quite get why byteData without the underscore has all the information. Thanks