Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for BufferedInputStream #26

Open
ddeisadze opened this issue Feb 27, 2018 · 0 comments
Open

Support for BufferedInputStream #26

ddeisadze opened this issue Feb 27, 2018 · 0 comments

Comments

@ddeisadze
Copy link

ddeisadze commented Feb 27, 2018

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant