itinance / itinance/react-native-fs

Conversion of Int16 to .wav

Open
#1,178 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hey!

I am currently working on converting array of Int16's into .wav file.

While I could convert it into .wav using JS's FS library, I could not do that using this library for React Native.

The code below is what I was looking for, but it just puts array's data as it is into a.wav file. Although it is .wav file, inside I have plain text, not an audio as I expected it to be.
```
// write the file
RNFS.writeFile(./a.wav, arrOfInt16, 'utf8')
.then((success) => {
console.log('FILE WRITTEN!');
})
.catch((err) => {
console.log(err.message);
});
```

So I thought maybe I should but something else instead of 'utf8'. Do you know any other parameters I can put there?

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.