backend & frontend consistency fix

This commit is contained in:
JohannesItten
2026-07-09 21:49:33 +03:00
parent 1927c22e25
commit b4bccdbba7
2 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ export function buildGraph(vfNodes: Node[], vfEdges: Edge[]): GraphJson {
format = { format = {
kind, kind,
sample_rate: Number(srcData?.params.sample_rate ?? 48000), sample_rate: Number(srcData?.params.sample_rate ?? 48000),
channels: Number(srcData?.params.channels ?? 2), channels: Number(srcData?.params.channels) || 2,
bit_depth: 32, bit_depth: 32,
} }
} }
+4 -6
View File
@@ -58,9 +58,8 @@ export const FORMAT_OPTIONS_VIDEO: ParamDef[] = [
] ]
export const FORMAT_OPTIONS_AUDIO: 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: '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<string, NodeTypeDef> = { export const NODE_TYPES: Record<string, NodeTypeDef> = {
@@ -74,7 +73,8 @@ export const NODE_TYPES: Record<string, NodeTypeDef> = {
params: [ params: [
...FORMAT_OPTIONS_VIDEO, ...FORMAT_OPTIONS_VIDEO,
...FORMAT_OPTIONS_AUDIO, ...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: { ndiin: {
@@ -86,7 +86,6 @@ export const NODE_TYPES: Record<string, NodeTypeDef> = {
], ],
params: [ params: [
{ key: 'source_num', label: 'NDI Source #', type: 'number', default: 0, min: 0, max: 15 }, { key: 'source_num', label: 'NDI Source #', type: 'number', default: 0, min: 0, max: 15 },
...FORMAT_OPTIONS_VIDEO,
...FORMAT_OPTIONS_AUDIO, ...FORMAT_OPTIONS_AUDIO,
], ],
}, },
@@ -99,8 +98,7 @@ export const NODE_TYPES: Record<string, NodeTypeDef> = {
], ],
params: [ params: [
{ key: 'device_index', label: 'Port', type: 'select', options: DEVICE_OPTIONS, default: 0 }, { key: 'device_index', label: 'Port', type: 'select', options: DEVICE_OPTIONS, default: 0 },
...FORMAT_OPTIONS_VIDEO, { key: 'channels', label: 'Channels', type: 'number', default: 2, min: 1, max: 16, group: 'AUDIO' },
...FORMAT_OPTIONS_AUDIO,
], ],
}, },
ndiout: { ndiout: {