Report DSP elements
Tell Volumio that your plugin changes the sound. An equalizer or a DSP plugin reports itself as an element of the signal path while it runs. Volumio then knows which plugins affect sound quality and can show it to the user.
1. Report the element when the plugin starts
In onStart, call addDSPSignalPathElement with the element:
onStart() {
this.commandRouter.addDSPSignalPathElement({
id: 'my_equalizer',
sub_type: 'dsp_plugin',
preset: 'My Equalizer',
quality: 'enhanced',
});
return libQ.resolve();
}
Every field is required:
| Field | Value |
|---|---|
id | A unique id for the element, such as the plugin's id |
sub_type | dsp_plugin, the only value Volumio accepts |
preset | The name shown for the element, such as the plugin's title |
quality | enhanced, the only value Volumio accepts |
When a field is missing, Volumio does not add the element and logs Not Adding DSP Signal Path Element, missing parameters.
2. Remove it when the plugin stops
In onStop, call removeDSPSignalPathElement with the element's id:
onStop() {
this.commandRouter.removeDSPSignalPathElement({ id: 'my_equalizer' });
return libQ.resolve();
}
Change the element
A second addDSPSignalPathElement with the same id does not replace the first one. To change the element, remove it, then add the new one:
this.commandRouter.removeDSPSignalPathElement({ id: 'my_equalizer' });
this.commandRouter.addDSPSignalPathElement({ id: 'my_equalizer', sub_type: 'dsp_plugin', preset: 'My Equalizer: Loudness', quality: 'enhanced' });
Check that it works
Install the plugin with npx --package=@volumio/plugin-sdk volumio-plugin deploy 192.168.1.20 .. The device log shows Adding my_equalizer DSP Signal Path Element when the plugin starts.