First I converted a byte array to a double array to make same math operations (see code below):
private double[] bytesToDouble(File file){
InputStream in = null;
if (file.isFile()) {
long size = file.length();
try {
in = new FileInputStream(file);
return readStreamAsDoubleArray(in, size);
} catch (Exception e) {
}
}
return null;
}
Now I would like to convert it back into a byte array to save it again to a wav file. How do I do that? The problem is that I have a double array and in the answer the use a double value, but not a double array. Thats why the following answer doesn
t help me: How can I convert a byte array into a double and back?