package vorbis

  1. Overview
  2. Docs

Module VorbisSource

* Decode from or encode to the Ogg Vorbis compressed audio format; * or get informations about an Ogg Vorbis file. * *

  • author Samuel Mimram, Julien Cristau, David Baelde

Exceptions

Sourceexception False

The call returned a 'false' status (eg, ov_bitrate_instant * can return OV_FALSE if playback is not in progress, and thus * there is no instantaneous bitrate information to report.

Sourceexception Invalid_parameters

Some parameters are invalid for this function.

Sourceexception Invalid_channels

The given number of channels is invalid.

Sourceexception Invalid_argument

Invalid setup request, e.g. out of range argument.

Sourceexception Could_not_open_file

The given file could not be opened.

Sourceexception Not_vorbis

Bitstream is not Vorbis data.

Sourceexception Bad_header

Invalid Vorbis bitstream header.

Sourceexception Read_error

A read from media returned an error.

Sourceexception Not_audio

Ogg packet doesn't contain audio data

Sourceexception Internal_fault

Internal logic fault; indicates a bug or heap/stack corruption.

Sourceexception Hole_in_data

Indicates there was an interruption in the data (one of: garbage between * pages, loss of sync followed by recapture, or a corrupt page).

Indicates that an invalid stream section was supplied, * or the requested link is corrupt.

Sourceexception Version_mismatch

Invalid Vorbis bitstream header.

Sourceexception Not_implemented

Unimplemented mode.

Sourceexception Unknown_error of int

An unknown error happened (it should not have happened, please report).

Sourceexception Utf8_failure of string

Error while converting utf8.

Sourceval string_of_exc : exn -> string option

Return a string representation * of an exception

Useful types

Sourcetype bitstream = int

Index of a logical bitstream. The special value -1 means the physical * bitsream.

Sourcetype info = {
  1. vorbis_version : int;
    (*

    version of vorbis codec, must be 0

    *)
  2. audio_channels : int;
    (*

    number of audio channels

    *)
  3. audio_samplerate : int;
    (*

    samplerate in Hertz

    *)
  4. bitrate_upper : int;
  5. bitrate_nominal : int;
  6. bitrate_lower : int;
  7. bitrate_window : int;
}

Vorbis informations about a file.

Sourceval tags : (string, string) Hashtbl.t -> unit -> (string * string) list

Create a list of vorbis tags.

Operations with vorbis streams

Encoding

Sourcemodule Encoder : sig ... end

Decoding

Sourcemodule Decoder : sig ... end

Operations with vorbis files

Decoding

Sourcemodule File : sig ... end
Sourcemodule Skeleton : sig ... end
OCaml

Innovation. Community. Security.