From e10125b1ea46c6f96dff199603ab3111139c7b76 Mon Sep 17 00:00:00 2001 From: Vaios Kalpias-Ilias Date: Mon, 21 Mar 2016 15:30:32 +0200 Subject: [PATCH] Attempt fix for sound issues on IOS --- src/sound/manager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sound/manager.js b/src/sound/manager.js index 4922be5401a..7e3ebebf1b8 100644 --- a/src/sound/manager.js +++ b/src/sound/manager.js @@ -47,11 +47,12 @@ pc.extend(pc, function () { // Play an inaudible sound when the user touches the screen // This only happens once var unlock = function () { - var buffer = context.createBuffer(1, 1, 22050); + var buffer = context.createBuffer(1, 1, 44100); var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.start(0); + source.disconnect(); // no further need for this so remove the listener window.removeEventListener('touchend', unlock);