From c2cb431b112531992b4e519cc70c83c4197ecc4a Mon Sep 17 00:00:00 2001 From: Richard Fox Date: Wed, 7 Sep 2016 10:36:09 +0100 Subject: [PATCH 1/2] Windows --- platform/win32.json | 7 +++++++ platform/win64.json | 7 +++++++ sound.vbs | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 platform/win32.json create mode 100644 platform/win64.json create mode 100644 sound.vbs diff --git a/platform/win32.json b/platform/win32.json new file mode 100644 index 0000000..4b7caf8 --- /dev/null +++ b/platform/win32.json @@ -0,0 +1,7 @@ +{ + "play": { + "command": "start /min sound.vbs", + "options": { + } + } +} \ No newline at end of file diff --git a/platform/win64.json b/platform/win64.json new file mode 100644 index 0000000..4b7caf8 --- /dev/null +++ b/platform/win64.json @@ -0,0 +1,7 @@ +{ + "play": { + "command": "start /min sound.vbs", + "options": { + } + } +} \ No newline at end of file diff --git a/sound.vbs b/sound.vbs new file mode 100644 index 0000000..4a05952 --- /dev/null +++ b/sound.vbs @@ -0,0 +1,7 @@ +Set Sound = CreateObject("WMPlayer.OCX.7") +Sound.URL = WScript.Arguments.Item(0) +Sound.Controls.play +do while Sound.currentmedia.duration = 0 +wscript.sleep 100 +loop +wscript.sleep (int(Sound.currentmedia.duration)+1)*1000 From 4209daa80e70b87b4b557790faec3052b469282d Mon Sep 17 00:00:00 2001 From: Richard Fox Date: Wed, 7 Sep 2016 10:48:24 +0100 Subject: [PATCH 2/2] hacky path resoloution --- platform/win32.json | 2 +- platform/win64.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/win32.json b/platform/win32.json index 4b7caf8..6f2f4d7 100644 --- a/platform/win32.json +++ b/platform/win32.json @@ -1,6 +1,6 @@ { "play": { - "command": "start /min sound.vbs", + "command": "start /min ./node_modules/sfx/sound.vbs", "options": { } } diff --git a/platform/win64.json b/platform/win64.json index 4b7caf8..6f2f4d7 100644 --- a/platform/win64.json +++ b/platform/win64.json @@ -1,6 +1,6 @@ { "play": { - "command": "start /min sound.vbs", + "command": "start /min ./node_modules/sfx/sound.vbs", "options": { } }