Skip to content

Commit

Permalink
* Changed types to match new ocaml-ogg's API.
Browse files Browse the repository at this point in the history
  Should be fully backward compatible.
  • Loading branch information
toots committed Sep 23, 2013
1 parent e7de777 commit 657ee03
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGES
@@ -1,3 +1,8 @@
0.6.2 ()
=====
* Changed types to match new ocaml-ogg's API.
Should be fully backward compatible.

0.6.1 (04-10-2011)
=====
* Added optional encoder field for
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
@@ -1,7 +1,7 @@
# $Id$

# check for one particular file of the sources
AC_INIT([ocaml-vorbis],[0.6.1],[savonet-users@lists.sourceforge.net])
AC_INIT([ocaml-vorbis],[0.6.2],[savonet-users@lists.sourceforge.net])

VERSION=$PACKAGE_VERSION
AC_MSG_RESULT(configuring $PACKAGE_STRING)
Expand Down
4 changes: 2 additions & 2 deletions src/vorbis.ml
Expand Up @@ -152,7 +152,7 @@ struct

external get_channels : t -> int = "ocaml_vorbis_encode_get_channels"

external encode_buffer_float : t -> Ogg.Stream.t -> float array array -> int -> int -> unit = "ocaml_vorbis_encode_float"
external encode_buffer_float : t -> Ogg.Stream.stream -> float array array -> int -> int -> unit = "ocaml_vorbis_encode_float"

external time_of_granulepos : t -> Int64.t -> Nativeint.t = "ocaml_vorbis_encode_time_of_granulepos"

Expand Down Expand Up @@ -271,7 +271,7 @@ struct

external check_packet : Ogg.Stream.packet -> bool = "ocaml_vorbis_check_packet"

external decode_pcm : t -> Ogg.Stream.t -> float array array -> int -> int -> int = "ocaml_vorbis_decode_pcm"
external decode_pcm : t -> Ogg.Stream.stream -> float array array -> int -> int -> int = "ocaml_vorbis_decode_pcm"

external restart : t -> unit = "ocaml_vorbis_synthesis_restart"

Expand Down
8 changes: 4 additions & 4 deletions src/vorbis.mli
Expand Up @@ -130,7 +130,7 @@ sig
val reset : t -> unit

(** Encode a header given a list of tags. *)
val headerout : ?encoder:string -> t -> Ogg.Stream.t -> (string * string) list -> unit
val headerout : ?encoder:string -> t -> Ogg.Stream.stream -> (string * string) list -> unit

(** Encoder a header, but do not submit packet to
* Ogg Stream. Usefull when multiplexing ogg streams
Expand All @@ -145,14 +145,14 @@ sig
(** Encode a buffer of PCM data.
* The PCM data array must have at least the expected
* number of channels. Otherwise, the function raises [Invalid_channels]. *)
val encode_buffer_float : t -> Ogg.Stream.t -> float array array -> int -> int -> unit
val encode_buffer_float : t -> Ogg.Stream.stream -> float array array -> int -> int -> unit

(** Convert a granulepos to absolute time in seconds. The granulepos is
* interpreted in the context of a given encoder, and gives
* the end time of a frame's presentation as used in Ogg mux ordering. *)
val time_of_granulepos : t -> Int64.t -> Nativeint.t

val end_of_stream : t -> Ogg.Stream.t -> unit
val end_of_stream : t -> Ogg.Stream.stream -> unit
end

(** {2 Decoding} *)
Expand Down Expand Up @@ -180,7 +180,7 @@ sig
(** [decode_pcm dec stream buffer pos offset] decodes pcm float data
* from [stream]. The floats are written in [buffer], starting at
* position [pos]. The function returns the number of samples actually written.*)
val decode_pcm : t -> Ogg.Stream.t -> float array array -> int -> int -> int
val decode_pcm : t -> Ogg.Stream.stream -> float array array -> int -> int -> int

(** Restart the decoder *)
val restart : t -> unit
Expand Down

0 comments on commit 657ee03

Please sign in to comment.