Hello, After much bitbanging, poking around in the mono JIT, bugging people, and doing some code edits, I would like to announce that the C# implementation of Ogg Vorbis is now in mono CVS.
The module is csvorbis. I've been using VS.NET and the MS runtime to compile the code, so I don't know if it will compile with mcs (it should however). It does run, however, with the mono JIT and class libs. The performance of the code still needs to be tested, but on the mono runtime on my large hammer of a computer (1900+ MP class box), I can decode a 6 minute ogg in about 50 seconds. Other data points would be nice... (which raises a question, does the x86 JIT emit floating point instructions?) The code is far from complete, however, there are a number of things to be done: - I just have project files for VS.NET. If anyone is familiar with nant, I'd appreciate it if people could do some build files for it. - Casting. I've done a lot of it. Some of the functions should be cleaned up with that regard, to make them look more like their C counterparts. - Threading issues. If I came across a synchronization() block in the Jorbis code...I just kinda ignored it. :) That needs to be fixed. - internal methods/variables. Java and C# are different in regard to default accessibility. So, a lot of the code has internal methods tagged on. I think many of them should be cleaned up in some way, I just went through whole classes and mass-marked functions internal. Some of the classes might need to be cleaned up in that regard. The Ogg parser (csogg) is really bad in this accord. - Math errors. There's some math error somewhere in the code. The resulting raw PCM seems tohave the lowest order bit missing/set in some cases. This doesn't result in a easily detectable audio error (it only appears for one sample at most), however it does spew output that is different from the reference code. This is a bug, but I have no idea where it is coming from. - Documentation. This is a necessity. The sample code in OggDecode.cs shows the general flow of how to use the decoder. - TODO items. They're marked in the code. Mostly converting Ogg comments (byte arrays) into Strings. Shouldn't be too hard. Wishlist items: - Checking to see if the decoder has changed from when Jorbis was done to what 1.0rc3 does now. I doubt there is a difference, but it should be checked. - The classes could be cleaner. See internal bit above. - Encoder work. Harder to do, since someone will need to convert the codebooks over. Look at the libvorbis code for that. - Gtk# demo program. This would rock for Miguel's demoing of mono. If anyone is interested in the above, or has any other ideas on how to (ab)use the code, let me know. Thanks, Mark Crichton
msg00428/pgp00000.pgp
Description: PGP signature
