Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

The waves doesn't match the sound? #6

Closed
tolgayavuz opened this issue Jun 11, 2017 · 6 comments
Closed

The waves doesn't match the sound? #6

tolgayavuz opened this issue Jun 11, 2017 · 6 comments

Comments

@tolgayavuz
Copy link

I'm getting bytes with this style;

`byte[] soundBytes = null;

            try {
                InputStream inputStream =
                        getContentResolver().openInputStream(Uri.fromFile(new File(suanki_playlist.get(id).path)));

                soundBytes = new byte[inputStream.available()];
                soundBytes = toByteArray(inputStream);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }

            seekbar2.setRawData(soundBytes);`

Is it the problem?

@alxrm
Copy link
Owner

alxrm commented Jun 11, 2017

Seems okay, but I have 2 questions so far:

  1. What is the size of yout file? (Asking because there is currently an issue with the files bigger than 10 mb and I'm too much of a lazy ass to fix it)
  2. Are you sure your app has all permissions it needs? (Like WRITE_EXTERNAL_STORAGE or something like that)

@tolgayavuz
Copy link
Author

My test file is 7.5 MB and yeah my app got the permission for WRITE_EXTERNAL_STORAGE, does it need more permissions for process?

@tolgayavuz
Copy link
Author

tolgayavuz commented Jun 11, 2017

Couple of screenshots for better understanding,

http://www.ucanhollandali.com/thedifference.jpg

edit: updated link

@alxrm
Copy link
Owner

alxrm commented Jun 11, 2017

I guess you're pointing towards the difference of the wave produced by this library and the proper one from SoundCloud, there's already an issue about it. (Yeah, I haven't read the title of the issue)

As a solution I offered there to use another library which supports different music formats and was written by someone smarter than me, so consider using it

P. S. Right now I don't have that much time to add the support of all the popular music formats (like mp3, which has headers and some another compression-related crap inside it), sorry for that

@tolgayavuz
Copy link
Author

Oh okay, thanks for the your time by the way your library is grea

@alxrm
Copy link
Owner

alxrm commented Jun 11, 2017

Thanks, I'll try to improve it some time

@carmocca carmocca mentioned this issue Sep 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants