Skip to content

Conversation

@mfisher31
Copy link
Member

Fix Audio/MIDI I/O nodes appearing with zero ports

When adding Audio Inputs/Outputs or MIDI I/O nodes via the graph right-click menu, they would sometimes appear with zero ports instead of the expected defaults.

Root Cause

IONode::refreshPorts() depends on the parent graph's port count (graph->getNumPorts()), but when a new graph has no existing I/O configuration, the count is zero, resulting in IONodes with no ports.

Fix

Modified IONode::setParentGraph() to check if the parent graph has zero ports of the IONode's type. If so, it sets a sensible minimum (2 channels for audio, 1 for MIDI) before refreshing ports.

Changes

  • ionode.cpp - Updated setParentGraph() to ensure minimum port count on parent graph

Fixes #1036

Verifies that Audio Input/Output nodes receive a minimum of 2 ports
when added to a graph with zero audio ports configured.
@mfisher31 mfisher31 merged commit aee7728 into main Jan 6, 2026
4 checks passed
@mfisher31 mfisher31 deleted the audio-io-no-ports branch January 6, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audio IO Node Added Without Any Ports

2 participants