audiowave-progressbar icon indicating copy to clipboard operation
audiowave-progressbar copied to clipboard

given array of bytes

Open MohammedElotol opened this issue 9 years ago • 7 comments

Hi Thank you for the great library. I wonder where I can find the required array of bytes that I must pass to setRawData(), if I want to play a mp3 file. should I get file input stream and then get the byte array? I tried to do that but the created waves were not Compatible with the voice.

MohammedElotol avatar Dec 07 '16 07:12 MohammedElotol

Yeah, just saw this with large mp3 file, trying to fix it right now.

Thanks for the note and sorry for it not working properly

alxrm avatar Dec 07 '16 09:12 alxrm

I noticed that if the items of the array are less than or equal the wave view capacity it will be drawn correctly, otherwise it won't.

MohammedElotol avatar Dec 07 '16 10:12 MohammedElotol

Probably I've fixed this, I'm not sure, gonna push the update in an hour

alxrm avatar Dec 07 '16 19:12 alxrm

Updated the release, you might want to check it out

alxrm avatar Dec 07 '16 21:12 alxrm

Hi Alxrm, and thank you for your help. I tried 0.7 version, but it is still not precise. The byte array that I set as an argument is containing at least 2000 item for each second, each item has a value from -128 to 128. should I pass it as it is? or should I minimize the number of bytes per second somehow?

please see below screenshots, the first one from the recorder, and the second is that recording viewed by our library. https://drive.google.com/open?id=0B_2cJHPZixL0MmlPZTVCMjdUVlE https://drive.google.com/open?id=0B_2cJHPZixL0OXJxZmRPSUY1VzQ

MohammedElotol avatar Dec 08 '16 07:12 MohammedElotol

If the precision is something you're searching for, you might want to check out another solution, which handles every sound format and tries to give you the most precise results.

Hope it helps.

alxrm avatar Dec 08 '16 08:12 alxrm

Yet still want to find the solution. So I leave this issue opened.

Thanks for the screenshots, they might be very helpful

alxrm avatar Dec 08 '16 08:12 alxrm