spessasynth_core 3.26.41 → 3.26.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spessasynth_core",
3
- "version": "3.26.41",
3
+ "version": "3.26.42",
4
4
  "description": "MIDI and SoundFont2/DLS library with no compromises",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -97,13 +97,14 @@ export class BasicInstrument
97
97
 
98
98
  /**
99
99
  * @param index {number}
100
+ * @param force {boolean} ignore use count
100
101
  * @returns {boolean} if deleted
101
102
  */
102
- deleteZone(index)
103
+ deleteZone(index, force = false)
103
104
  {
104
105
  const zone = this.instrumentZones[index];
105
106
  zone.useCount -= 1;
106
- if (zone.useCount < 1)
107
+ if (zone.useCount < 1 || force)
107
108
  {
108
109
  zone.deleteZone();
109
110
  this.instrumentZones.splice(index, 1);