package sfml

  1. Overview
  2. Docs
type t
val openFromFile : filename:string -> t
val openFromMemory : data:string -> t
val destroy : music:t -> unit
val getDuration : music:t -> SFTime.t
val play : music:t -> unit
val pause : music:t -> unit
val stop : music:t -> unit
val getChannelCount : music:t -> int
val getSampleRate : music:t -> int
type sound_status =
  1. | Stopped
  2. | Paused
  3. | Playing
val getStatus : music:t -> sound_status
val setPlayingOffset : music:t -> timeOffset:SFTime.t -> unit
val getPlayingOffset : music:t -> SFTime.t
val setLoop : music:t -> loop:bool -> unit
val getLoop : music:t -> bool
val setVolume : music:t -> volume:float -> unit
val getVolume : music:t -> float
val setPitch : music:t -> pitch:float -> unit
val getPitch : music:t -> float
val setRelativeToListener : music:t -> relative:bool -> unit
val isRelativeToListener : music:t -> bool
val setMinDistance : music:t -> minDistance:float -> unit
val getMinDistance : music:t -> float
val setAttenuation : music:t -> attenuation:float -> unit
val getAttenuation : music:t -> float
val setPosition : music:t -> pos:(float * float * float) -> unit
val setPosition3 : music:t -> x:float -> y:float -> z:float -> unit
val getPosition : music:t -> float * float * float
OCaml

Innovation. Community. Security.