natiny.audio.source_seek
natiny.audio.source_seek(source, seconds)
Sets a source's playback position.
Parameters
| Name | Type | Description |
|---|---|---|
source |
number |
Source handle |
seconds |
number |
Position in seconds from the beginning |
Example
natiny.audio.source_seek(source, 30.0)
Notes
- The position is clamped to
0.0 .. natiny.clip.get_duration(clip)of the clip the source plays. A source with no clip cannot be seeked. - Seeking does not change whether the source is playing or paused.
- Invalid and non-source handles are ignored.