Hi!
I'm trying to port the Wavpack decoder to Dart. I've used the Java version as the starting point and i've actually made it compile very quickly. I'm trying to test it first with the standalone Dart VM and when that's working i'm trying to make it compatible with Javascript compilation to run in the browser.
When i started debugging the code i've realized that bit shifting in Dart is not working the same way as in Java because Dart doesn't have such fixed point integer formats because it uses a similar numeric system as Javascript. (there's a signed int type for generic integer handling, afaik its a 64bit signed integer, and num for double precision like format). The decoder fails very quickly in the beginning when it tries to calculate header CRCs. As i see there's a lot of bit manipulations in the code so i guess there's plenty of this kind of errors awaiting for me.
I'm wondering if there's a floating point version of the decoder available? Maybe that would be easier to port. I guess an even better way would be to understand the format and write a Dart decoder from scratch but that's a lot of work although it would be very interesting.
What do you think?![smile.gif]()
Thanks!
Mod: i'll upload my current code to a code hosting site tonight if i won't forget it.
I'm trying to port the Wavpack decoder to Dart. I've used the Java version as the starting point and i've actually made it compile very quickly. I'm trying to test it first with the standalone Dart VM and when that's working i'm trying to make it compatible with Javascript compilation to run in the browser.
When i started debugging the code i've realized that bit shifting in Dart is not working the same way as in Java because Dart doesn't have such fixed point integer formats because it uses a similar numeric system as Javascript. (there's a signed int type for generic integer handling, afaik its a 64bit signed integer, and num for double precision like format). The decoder fails very quickly in the beginning when it tries to calculate header CRCs. As i see there's a lot of bit manipulations in the code so i guess there's plenty of this kind of errors awaiting for me.
I'm wondering if there's a floating point version of the decoder available? Maybe that would be easier to port. I guess an even better way would be to understand the format and write a Dart decoder from scratch but that's a lot of work although it would be very interesting.
What do you think?

Thanks!
Mod: i'll upload my current code to a code hosting site tonight if i won't forget it.
