Gagravarr / VorbisJava

A library for working with Ogg Vorbis files
Apache License 2.0
126 stars 26 forks source link

fixed bug which prevented granule position to be set for longer audio files #33

Open mozzbozz opened 5 years ago

mozzbozz commented 5 years ago

I think the bug was introduced in commit edc92734ed461922b82ab81e21e1f2883cc03506.

Basically, the contributor just forgot to reset the doneFlush-flag to false again after a flush was done. That resulted in pageSize being reset to 0 after every packet (after the first flush; which was at around 2 seconds for me). Therefore the granule position was only calculated correctly for the first page. After that it stayed fixed to one value and coursed audio players to freak out and display a wrong length for the file...

Also I fixed a small spelling mistake in one of the source code comments. Additionally, my editor automatically stripped trailing spaces in some lines (of course I could've deactivated that feature but I think it makes sense).

sebma commented 2 years ago

@mozzbozz Congratulation for this PR. I'm in wait for this PR to be merged. It's been a little more than 2 years now and this PR is still not merged and last commit was done last year, has Gagravarr abandoned this project ?

This issue is related to the bug fixed by this PR : https://gitlab.com/axet/android-audio-recorder/-/issues/208