How to read an ogg file in Java without JNI

  1. Import jorbis as a dependenyc of your project
  2. Read the howto :
  3. Copy the source code. It will work, but will only be able to play a sound (not to convert it)
  4. Look at my JorbisCleanConverter. ( and copy everything (you will need to change the catch clauses).
  5. You are now able to transform an ogginputstream into a wav outputstream using a ByteArrayInputStream class. To get the stream entirely, just do .toByteArray(), you can write that in a file and use it as a real wav file.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.