natiny_clip_get_duration

C
float natiny_clip_get_duration(NatinyClip clip);

Returns how long a clip is, in seconds.

Parameters

Name Type Description
clip NatinyClip Clip handle

Returns

Type Description
float Length in seconds, or 0.0f for an invalid clip

Example

C
float seconds = natiny_clip_get_duration(clip);

Notes

  • The length of the recording, not of a playback: a source pitched away from 1.0f takes correspondingly more or less time to get through it.
  • Invalid and destroyed handles return 0.0f.