bmc0 / dsp

An audio processing program with an interactive mode.
ISC License
219 stars 31 forks source link

ladspa_dsp.c: Make port names unique #62

Closed kazuoteramoto closed 3 years ago

kazuoteramoto commented 3 years ago

Currently the port names are always Input/Output, no matter the number of ports.

For example, in a stereo plugin we have:

Ports:  "Input" input, audio
    "Input" input, audio
    "Output" output, audio
    "Output" output, audio

This behavior make referencing the ports hard. For example pipewire module-filter-chain use the name of the port to create the links.

This commit change the port name to have a incremental number after the name, for the example given, this will be the new names:

Ports:  "Input0" input, audio
    "Input1" input, audio
    "Output0" output, audio
    "Output1" output, audio

This make references by name easier.

bmc0 commented 3 years ago

Good idea, thanks.