diff --git a/src/graphBuilder.ts b/src/graphBuilder.ts index 8d01f7c..fbf72e6 100644 --- a/src/graphBuilder.ts +++ b/src/graphBuilder.ts @@ -80,7 +80,7 @@ export function buildGraph(vfNodes: Node[], vfEdges: Edge[]): GraphJson { format = { kind, sample_rate: Number(srcData?.params.sample_rate ?? 48000), - channels: Number(srcData?.params.channels ?? 2), + channels: Number(srcData?.params.channels) || 2, bit_depth: 32, } } diff --git a/src/nodeTypes.ts b/src/nodeTypes.ts index 604f168..24c6428 100644 --- a/src/nodeTypes.ts +++ b/src/nodeTypes.ts @@ -58,9 +58,8 @@ export const FORMAT_OPTIONS_VIDEO: ParamDef[] = [ ] export const FORMAT_OPTIONS_AUDIO: ParamDef[] = [ - { key: 'channels', label: 'Channels', type: 'number', default: 0, min: 0, max: 16, group: 'AUDIO' }, + { key: 'channels', label: 'Channels', type: 'number', default: 2, min: 1, max: 16, group: 'AUDIO' }, { key: 'sample_rate', label: 'Sample Rate', type: 'select', options: SAMPLE_RATE_OPTIONS, default: 48000, isFormat: true, group: 'AUDIO' }, - { key: 'amplitude_db', label: 'Amplitude (dBFS)', type: 'number', default: -18, min: -60, max: 0 }, ] export const NODE_TYPES: Record = { @@ -74,7 +73,8 @@ export const NODE_TYPES: Record = { params: [ ...FORMAT_OPTIONS_VIDEO, ...FORMAT_OPTIONS_AUDIO, - { key: 'pattern', 'label': 'Pattern', type: 'select', options: PATTERN_OPTIONS, default: 'bars' }, + { key: 'amplitude_db', label: 'Amplitude (dBFS)', type: 'number', default: -18, min: -60, max: 0, group: 'AUDIO' }, + { key: 'pattern', label: 'Pattern', type: 'select', options: PATTERN_OPTIONS, default: 'bars' }, ], }, ndiin: { @@ -86,7 +86,6 @@ export const NODE_TYPES: Record = { ], params: [ { key: 'source_num', label: 'NDI Source #', type: 'number', default: 0, min: 0, max: 15 }, - ...FORMAT_OPTIONS_VIDEO, ...FORMAT_OPTIONS_AUDIO, ], }, @@ -99,8 +98,7 @@ export const NODE_TYPES: Record = { ], params: [ { key: 'device_index', label: 'Port', type: 'select', options: DEVICE_OPTIONS, default: 0 }, - ...FORMAT_OPTIONS_VIDEO, - ...FORMAT_OPTIONS_AUDIO, + { key: 'channels', label: 'Channels', type: 'number', default: 2, min: 1, max: 16, group: 'AUDIO' }, ], }, ndiout: {