import type { NodeDef } from '../../NodeRegistry'; import { asString } from '../../values'; import { exec, soundPort } from '../shared'; export const StopSound: NodeDef = { type: 'StopSound', label: 'Stop sound', category: 'action', description: 'Silences every voice of a sound, however many plays started it – including a looping one. ' + 'With no sound picked it silences everything the run is playing.', inputs: [exec(), soundPort()], outputs: [exec()], params: [], run: (ctx, inputs) => { ctx.stopSound(asString(inputs.sound)); return { next: 'exec' }; }, };