J-Ogg

J-Ogg は Pure Java のライブラリで Ogg ファイルの demux や decode を支援してくれる。
現在の所 Ogg Vorbis と Ogg FLAC に対応している模様。

ライセンス

使用、改変、再配布、自作ソフト(フリー、商用を問わない)への include を自由に行って良いとの事。
ただし、 どこか適当な所(dialog や docoument)に、以下の一文を含める事が条件。

"This software is based on or using the J-Ogg library available from http://www.j-ogg.de and copyrighted by Tor-Einar Jarnbjo."

詳細は download libraries を参照。

公式ページ


既知の問題

小さなファイルの読み込み

少なくとも、2007-03-20 現在、公式サイトで配布されている j-ogg.zip に含まれるコードは、CachedUrlStream でファイルを読み込む際 pageOffsets.size() < 20 の小さなファイルを読み込むと無限ループに陥ってしまう。
対策としては CachedUrlStream のコンストラクタで loaderThread で eos に達したら読み込み待ちのループを終了するようパッチを当てる必要がある。

公式版の update を期待したい所だが、現状で配布されているアーカイブのタイムスタンプが 2003-08-08 のままである事と download libraries の所に以下の記述がある事を考えると、個別対処する他ない気が、、、(- -;;;)
I'm having a few problems with my CVS server and the libraries, which were available here had a few bugs, so until I have time to get the CVS server running and upload the fixed versions of the separate libraries, I've made a zip file available, containing both the current sources and libraries:

関連

2007年03月21日(水) 00:41:40 Modified by kou1okada