@ossclip/core 0.1.37 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assemble.ts +12 -0
package/package.json
CHANGED
package/src/assemble.ts
CHANGED
|
@@ -136,6 +136,13 @@ export interface SfxCue {
|
|
|
136
136
|
atSec: number;
|
|
137
137
|
/** The sound's own gain times the placement's, resolved once here. */
|
|
138
138
|
gain: number;
|
|
139
|
+
/**
|
|
140
|
+
* The sound's own length, when its pack declared one. Carried into
|
|
141
|
+
* render-props so the renderer can BOUND the cue's Sequence — an unbounded
|
|
142
|
+
* one kept every started effect's `<Audio>` mounted and exhausted the
|
|
143
|
+
* editor Player's shared audio tags (scenes' `SFX_FALLBACK_DURATION_SEC`).
|
|
144
|
+
*/
|
|
145
|
+
durationSec?: number;
|
|
139
146
|
}
|
|
140
147
|
|
|
141
148
|
/** Where staged sounds live inside the render's public dir. */
|
|
@@ -310,6 +317,11 @@ export function resolveSfxCues(
|
|
|
310
317
|
// mixing arithmetic of its own, so what the editor shows as a gain and
|
|
311
318
|
// what the render plays can never disagree.
|
|
312
319
|
gain: sound.gain * (p.gain ?? 1),
|
|
320
|
+
// Optional all the way down: a pack that declares no length gets the
|
|
321
|
+
// renderer's fallback bound, which is why an OLD render-props.json
|
|
322
|
+
// (every one written before 2026-09-18) needs no re-produce to stop
|
|
323
|
+
// taking the preview down.
|
|
324
|
+
...(sound.durationSec === undefined ? {} : { durationSec: sound.durationSec }),
|
|
313
325
|
});
|
|
314
326
|
}
|
|
315
327
|
|