Skip to content

anim-format (runtime format) / soundFileTime

Function: soundFileTime() ​

ts
function soundFileTime(
   opts, 
   duration, 
   t
): 
  | {
  loop: number;
  time: number;
}
  | null;

Where in the file a play is after t seconds: the file time and the loop it is in, or null once it has ended.

Parameters ​

ParameterType
optsSoundOptions
durationnumber
tnumber

Returns ​

| { loop: number; time: number; } | null

HereSplash — 2D animation for the web