Skip to content

Commit

Permalink
added start value to the fetchAudioBuffer error 'start is NaN'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Nov 21, 2024
1 parent 99ba28a commit 0e3efb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 0e3efb4

Please sign in to comment.