Skip to content

Commit

Permalink
Attempt fix for sound issues on IOS
Browse files Browse the repository at this point in the history
  • Loading branch information
vkalpias committed Mar 21, 2016
1 parent ca27cf5 commit e10125b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sound/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e10125b

Please sign in to comment.