Support for BufferedInputStream
ddeisadze opened this issue · 0 comments
ddeisadze commented
Does Horizon support sound recorded with MediaRecorder (separate activity) and then loaded in a fragment using BufferedInputStream from a file?
This is how I load it in but I get weird results, it initializes the wave and then the wave disappears after a second.
int size = (int) audio_file.length();
byte[] bytes = new byte[size];
BufferedInputStream buf = new BufferedInputStream(new FileInputStream(audio_file));
buf.read(bytes, 0, bytes.length);
buf.close();
if( isRecording){
mHorizon.updateView(bytes);
}
Any tips would be awesome!