From 1e916dad8add25ac876d259f8ff12fd4ba713db9 Mon Sep 17 00:00:00 2001
From: stefan-hoehn <stefan@andreaundstefanhoehn.de>
Date: Sun, 21 Nov 2021 22:33:26 +0100
Subject: [PATCH] [blockly] fix audio block code generation (#1211)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stefan Höhn <stefan@andreaundstefanhoehn.de>
---
 .../web/src/assets/definitions/blockly/blocks-audio.js          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js
index 43010a21b1..f676de4f09 100644
--- a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js
+++ b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js
@@ -58,7 +58,7 @@ export default function (f7, sinks, voices) {
     let fileName = Blockly.JavaScript.valueToCode(block, 'fileName', Blockly.JavaScript.ORDER_ATOMIC)
     let sinkName = Blockly.JavaScript.valueToCode(block, 'sinkName', Blockly.JavaScript.ORDER_ATOMIC).replace('(', '').replace(/[()]/g, '')
 
-    let code = `audio.playSound('${sinkName}', ${fileName});\n`
+    let code = `audio.playSound(${sinkName}, ${fileName});\n`
     return code
   }