Skip to content

Commit 6931fc7

Browse files
committed
handle ffprobe and ffmpeg not in path errors
1 parent 7022994 commit 6931fc7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

library/audioDataAnalyzer.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ analyzer.prototype.getData = function getDataFunction(trackPath, callback) {
127127

128128
});
129129

130+
ffprobeSpawn.on('error', function(error) {
131+
132+
callback(error);
133+
134+
});
135+
130136
};
131137

132138
/**
@@ -312,6 +318,12 @@ analyzer.prototype.getPeaks = function getValuesFunction(trackPath, peaksAmountR
312318

313319
});
314320

321+
ffmpegSpawn.on('error', function(error) {
322+
323+
callback(error);
324+
325+
});
326+
315327
} else {
316328

317329
callback(error);

0 commit comments

Comments
 (0)