C API: Clips¶
sona_clip_info holds key ("GenericWave", "Stand0", ...), id (the clip's item id, or NULL for "idle", "still" and "prop"), seconds (negative when not known until decoded), prop (1 for the held prop's own clip) and caption (may be NULL).
sona_clip_count¶
uint32_t sona_clip_count(const sona_ctx *ctx);
| Parameter and type | Meaning |
|---|---|
ctxconst sona_ctx * |
The context (required) |
Returns uint32_t.
Example:
uint32_t x_got = sona_clip_count(ctx);
printf("sona_clip_count: %lld\n", (long long)x_got);
How many clips the context knows.
sona_clip_get¶
sona_result sona_clip_get(const sona_ctx *ctx, uint32_t index,
sona_clip_info *out);
| Parameter and type | Meaning |
|---|---|
ctxconst sona_ctx * |
The context (required) |
indexuint32_t |
Which one, from 0 |
outsona_clip_info * |
Receives the sona_clip_info (required) |
Returns SONA_OK. Errors SONA_E_ARGUMENT (what each means).
Example:
sona_clip_info x_clip_info;
memset(&x_clip_info, 0, sizeof x_clip_info);
sona_result result = sona_clip_get(ctx, 0, &x_clip_info);
if (result != SONA_OK) printf("sona_clip_get: %s\n",
sona_result_name(result));
One clip by index, 0 .. sona_clip_count() - 1.
This page as Markdown · All the docs as one file (llms-full.txt)