Vorbisfile documentation

libVorbisfile version 1.65 - 20020702

Setup/Teardown

In order to decode audio using libvorbisfile, a bitstream containing Vorbis audio must be properly initialized before decoding and cleared when decoding is finished. The simplest possible case is to use fopen() to open a Vorbis file and then pass the FILE * to an ov_open() call. A successful return code from ov_open() indicates the file is ready for use. Once the file is no longer needed, ov_clear() is used to close the file and deallocate decoding resources. Do not call fclose() on the file; libvorbisfile does this in the ov_clear() call.
libvorbisfileを使って音声をデコードするために、Vorbis音声データのビットストリームは デコード前に適切に初期化され、デコードが終われば掃除されなければならない。 単純なケースとしては、Vorbisファイルを開くのに fopen() を使い、FILE *ov_open() にわたし、ov_open() から、成功の戻り値 が帰ればファイルを使用するための準備ができたことを示す。 ファイルがもう必要ではなくなったら ov_clear()を使ってファイルをクローズし、デコードのための資源を解放する。 ファイルをクローズするのに fclose() を呼んではならない。 libvorbisfileはこれをov_clear() 呼び出しののときにクローズするからだ。

All libvorbisfile initialization and deallocation routines are declared in "vorbis/vorbisfile.h".
すべてのlibvorbisfileの初期化と解法ルーティンは"vorbis/vorbisfile.h"に含まれている。

function 機能 purpose 目的
ov_open Initializes the Ogg Vorbis bitstream with a pointer to a bitstream and default values. This must be called before other functions in the library may be used.
ビットストリームへのポインタと初期値でOggVorbisビットストリームを初期化する。ライブラリの他の関数を使うより前に呼ばなければならない。
ov_open_callbacks Initializes the Ogg Vorbis bitstream with a pointer to a bitstream, default values, and custom file/bitstream manipulation routines. Used instead of ov_open() when working with other than stdio based I/O.
OggVorbisストリームをビットストリームへのポインタと初期値とカスタマイズされたファイルやビットストリーム操作ルーティンで初期化する。stdioベース以外のI/Oで動かす場合、ov_open() のかわりに使用する。
ov_test Partially opens a file just far enough to determine if the file is an Ogg Vorbis file or not. A successful return indicates that the file appears to be an Ogg Vorbis file, but the OggVorbis_File struct is not yet fully initialized for actual decoding. After a successful return, the file may be closed using ov_clear() or fully opened for decoding using ov_test_open().

This call is intended to be used as a less expensive file open test than a full ov_open().

Note that libvorbisfile owns the passed in file resource is it returns success; do not fclose() files owned by libvorbisfile.
そのファイルがOggVorbisファイルであるか否かを判断するために必要な分だけファイルを開く処理をする。 成功が返ればファイルがOggVorbisファイルであることを示しているが、OggVorbis_File 構造体はまだ実際にデコードできるほど完全には初期化されていない。 成功が返ったあと ov_clear() を使ってファイルを閉じるか、 ov_test_open() を使ってデコードのために完全にファイルを開く。 この呼び出しは ov_open() より少ないコストでファイルを開くテストをするのに使われる。 成功であればlibvorbisfileがファイルリソースを所有する;そしてlibvorbisfileが所有するファイルを fclose() してはならないことに注意せよ。

ov_test_callbacks As above but allowing application-define I/O callbacks.

Note that libvorbisfile owns the passed in file resource is it returns success; do not fclose() files owned by libvorbisfile.
アプリケーション定義のI/Oコールバックが使えること以外は上と同じ。 成功であればlibvorbisfileがファイルリソースを所有する;そしてlibvorbisfileが所有するファイルを fclose() してはならないことに注意せよ。

ov_test_open Finish opening a file after a successful call to ov_test() or ov_test_callbacks().
ov_test()ov_test_callbacks() で成功した後、ファイルを完全に開く。
ov_clear Closes the bitstream and cleans up loose ends. Must be called when finished with the bitstream. After return, the OggVorbis_File struct is invalid and may not be used before being initialized again before begin reinitialized.
ビットストリームをクローズし、あまりを捨てる。 ビットストリームを完了するときには必ず呼ばれなければならない。 呼び出しのあと、 OggVorbis_File 構造体は無効で再び初期化する前には使うことができない。



copyright © 2002 Xiph.org

Ogg Vorbis

Vorbisfile documentation

libVorbisfile version 1.65 - 20020702