From 5c101b6588bd9b818d90d89d4e58ff6e672699e2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Wed, 28 Mar 2018 17:14:17 +0200 Subject: [PATCH] util: play: fix: crash with soundfont created by polyphone Issue #84. --- util/toaudio5.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/toaudio5.js b/util/toaudio5.js index e32b108..a343946 100644 --- a/util/toaudio5.js +++ b/util/toaudio5.js @@ -159,6 +159,8 @@ function Audio5(i_conf) { rates[instr] = [] for (i = 0; i < infos.length; i++) { gen = infos[i].generator; + if (!gen.sampleID) // (empty generator!) + continue sid = gen.sampleID.amount; sampleRate = parser.sampleHeader[sid].sampleRate; sample = parser.sample[sid];