package vorbis

  1. Overview
  2. Docs

* 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

exception 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.

exception Invalid_parameters

Some parameters are invalid for this function.

exception Invalid_channels

The given number of channels is invalid.

exception Invalid_argument

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

exception Could_not_open_file

The given file could not be opened.

exception Not_vorbis

Bitstream is not Vorbis data.

exception Bad_header

Invalid Vorbis bitstream header.

exception Read_error

A read from media returned an error.

exception Not_audio

Ogg packet doesn't contain audio data

exception Internal_fault

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

exception 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.

exception Version_mismatch

Invalid Vorbis bitstream header.

exception Not_implemented

Unimplemented mode.

exception Unknown_error of int

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

exception Utf8_failure of string

Error while converting utf8.

val string_of_exc : exn -> string option

Return a string representation * of an exception

Useful types

type bitstream = int

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

type 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.

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

Create a list of vorbis tags.

Operations with vorbis streams

Encoding

module Encoder : sig ... end

Decoding

module Decoder : sig ... end

Operations with vorbis files

Decoding

module File : sig ... end
module Skeleton : sig ... end
OCaml

Innovation. Community. Security.