versão 2.0.2 - É possível gravar áudio do dispositivo

This commit is contained in:
JotaChina committed 2025-10-23 21:04:53 -03:00
1 parent b3f0d13b90
commit 1818932244
6 files changed
+632 -104

No files matched your search

+5 -2
View File
@@ -58,12 +58,15 @@ export async function loadAudioForClip(clip) {
return clip;
}
export function addAudioClipToTimeline(samplePath, trackId = 1, startTime = 0) {
export function addAudioClipToTimeline(samplePath, trackId = 1, startTime = 0, clipName = null) {
const newClip = {
id: Date.now() + Math.random(),
trackId: trackId,
sourcePath: samplePath,
name: samplePath.split('/').pop(),
// --- MODIFICAÇÃO AQUI ---
// Usa o nome fornecido, ou extrai do caminho se não for fornecido
name: clipName || samplePath.split('/').pop(),
startTimeInSeconds: startTime,
offset: 0,