Skip to content

Commit

Permalink
2.11.6
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed Nov 28, 2024
1 parent 4a7319d commit a1be464
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@q5/q5",
"version": "2.11.5",
"version": "2.11.6",
"license": "LGPL-3.0",
"description": "A sequel to p5.js that's optimized for interactive art",
"author": "quinton-ashley",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "q5",
"version": "2.11.5",
"version": "2.11.6",
"description": "A sequel to p5.js that's optimized for interactive art",
"author": "quinton-ashley",
"contributors": [
Expand Down
10 changes: 6 additions & 4 deletions q5.js
Original file line number Diff line number Diff line change
Expand Up @@ -3152,11 +3152,13 @@ Q5.modules.sound = ($, q) => {
};
$.getAudioContext = () => Q5.aud;
$.userStartAudio = () => {
if (!Q5.aud) {
Q5.aud = new window.AudioContext();
for (let s of sounds) s.init();
if (window.AudioContext) {
if (!Q5.aud) {
Q5.aud = new window.AudioContext();
for (let s of sounds) s.init();
}
return Q5.aud.resume();
}
return Q5.aud.resume();
};
};

Expand Down
2 changes: 1 addition & 1 deletion q5.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/q5-sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ Q5.modules.sound = ($, q) => {
};
$.getAudioContext = () => Q5.aud;
$.userStartAudio = () => {
if (!Q5.aud) {
Q5.aud = new window.AudioContext();
for (let s of sounds) s.init();
if (window.AudioContext) {
if (!Q5.aud) {
Q5.aud = new window.AudioContext();
for (let s of sounds) s.init();
}
return Q5.aud.resume();
}
return Q5.aud.resume();
};
};

Expand Down

0 comments on commit a1be464

Please sign in to comment.