(kind)
| 331 | } |
| 332 | |
| 333 | function exportMix(kind) { |
| 334 | const id = state.current?.id; |
| 335 | if (!id || !lanes().length) return; |
| 336 | const names = []; |
| 337 | const gains = []; |
| 338 | for (const l of lanes()) { |
| 339 | const g = effectiveGain(l.name); |
| 340 | if (g > 0) { names.push(l.name); gains.push(g); } |
| 341 | } |
| 342 | if (!names.length) { toast("Every stem is muted — nothing to export."); return; } |
| 343 | const q = new URLSearchParams({ stems: names.join(","), gains: gains.map((g) => g.toFixed(3)).join(",") }); |
| 344 | const path = kind === "mp4" ? `video.mp4` : `mixdown.wav`; |
| 345 | triggerDownload(`/api/jobs/${id}/${path}?${q}`); |
| 346 | } |
| 347 | |
| 348 | let _toastTimer = null; |
| 349 | function toast(msg) { |
no test coverage detected