Source

chirp / chirp.mli

Full commit
module Sample : sig
  type t

  val load : string -> t
  val set_volume : t -> int -> unit
end

val init : unit -> unit

(* [allocate_channels num] allocates num channels for mixing *)
val allocate_channels : int -> unit

(* [set_volume channnel volume] sets the volume of the given channel.
 * Valid volumes range from 0 to 128 inclusive. *)
val set_volume : int -> int -> unit

val play : int -> ?repeat:int -> Sample.t -> unit
val play_fade_in : int -> ?repeat:int -> Sample.t -> int -> unit