From 0e3efb41e0b8412b90bb5d5df9efe900b204e0b9 Mon Sep 17 00:00:00 2001 From: mattk70 Date: Thu, 21 Nov 2024 09:21:22 +0000 Subject: [PATCH] added start value to the fetchAudioBuffer error 'start is NaN' --- js/worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/worker.js b/js/worker.js index 8522539..cd89ec3 100644 --- a/js/worker.js +++ b/js/worker.js @@ -1502,7 +1502,7 @@ const fetchAudioBuffer = async ({ start = METADATA[file].duration < 0.1 ? 0 : Math.min(METADATA[file].duration - 0.1, start) end = Math.min(end, METADATA[file].duration); // Use ffmpeg to extract the specified audio segment - if (isNaN(start)) throw(new Error('fetchAudioBuffer: start is NaN')); + if (isNaN(start)) throw(new Error('fetchAudioBuffer: start is NaN', start)); return new Promise((resolve, reject) => { const additionalFilters = setAudioFilters(); const command = setupFfmpegCommand({