Progress bar not animating #12
Comments
Hey @JeremyPacker, that's pretty odd, I'll check this issue ASAP and will reply with more concrete explanation(or fix) |
Thanks for the quick response @alxrm , if you need any more information let me know and i'll get you anything you need! |
After some more debugging I realized the file that I was calling this method on the path prior to it being decoded to PCM / Raw data. Assuming it wouldn't work for encoded data, I switched that up, I was able to get it to display! |
Glad everything ended up good |
Hi @JeremyPacker could you explain what did you do eventually? I'm getting the same flat bars. Tried a 200kb mp3 and 1.5mb wav, resulting byte array looks okay but the bars stay flat. These are the 2 different methods I tried to use to get the byte array:
And when I set the raw data, onComplete does not get called:
Thanks in advance! |
@laurentiusandre hey, let me test the sample app first |
@laurentiusandre so I just tested this and it worked just as intended: final Random random = new Random();
final byte[] data = new byte[1024 * 200];
random.nextBytes(data);
waveView.setRawData(data, new OnSamplingListener() {
@Override public void onComplete() {
Log.e("DBG", "Done downsampling");
}
}); Logs showed:
|
I'm going to update sample activities a bit, so they will make a bit more sense |
Okay so I tried your code with Random byte array but I still couldn't get it work. I did some testing and it seems like the bars isn't getting updated because I placed it inside a ViewAnimator (inside a nested RecyclerView but I don't think RV is the problem). Could you take a look at this? I can use other ViewGroup for a workaround, but you may want to solve this odd bug for future users. Thanks for the great library! |
Hello,
I tried running this in an application and for whatever reason I can't get the progress bar to animate up. It just stays flat. I have checked the bytes, and things look good. I even tried the static bytes array in your sample app with no prevail. Thank you!
Here is my code
` mBeatWaveFormIV.setRawData(getByte(mAudioFile.getAbsolutePath()), new OnSamplingListener() {
@OverRide
public void onComplete() {
Log.d("audio", "Completed");
}
});
private byte[] getByte(String path) {
byte[] getBytes = {};
try {
File file = new File(path);
getBytes = new byte[(int) file.length()];
InputStream is = new FileInputStream(file);
is.read(getBytes);
is.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Log.d("Bytes", getBytes.length+"");
return getBytes;
}
03-04 02:06:52.760 18245-18245/me.rapchat.rapchat D/Bytes: 3048734
`
The text was updated successfully, but these errors were encountered: