p5.js-sound icon indicating copy to clipboard operation
p5.js-sound copied to clipboard

Audio dropouts on mobile when using mobile

Open ttoommmmiiee opened this issue 2 years ago • 2 comments

Most appropriate sub-area of p5.js?

  • [ ] Accessibility (Web Accessibility)
  • [ ] Build tools and processes
  • [ ] Color
  • [ ] Core/Environment/Rendering
  • [ ] Data
  • [ ] DOM
  • [ ] Events
  • [ ] Friendly error system
  • [ ] Image
  • [ ] IO (Input/Output)
  • [ ] Localization
  • [ ] Math
  • [ ] Unit Testing
  • [ ] Typography
  • [ ] Utilities
  • [ ] WebGL
  • [x] Other (specify if possible) - p5 Sound, Mobile compatibility

Details about the bug:

  • p5.js version: 1.4.0
  • Web browser and version: Safari iOS, Chrome iOS
  • Operating System: iOS 14.6 (iphone SE)
  • Steps to reproduce this:

Compare the following two sketches on a mobile. One use the standard HTML audio element and the other uses the p5 sound library. Both are very simple sketches based on the p5 demo. On mobile, the p5 sound version produces notable audio dropouts (producing a glitchy, distorted sound). This is more noticeable if you interact with the phone, e.g. change the volume.

Standard HTML audio element https://editor.p5js.org/ttoommmmiiee/sketches/JOriW7nvk

p5 Sound https://editor.p5js.org/ttoommmmiiee/sketches/udTIRZqF6

ttoommmmiiee avatar Jul 12 '21 14:07 ttoommmmiiee

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

welcome[bot] avatar Jul 12 '21 14:07 welcome[bot]

This might be a regression in Safari/Webkit. There are issues with the latest version of Safari that cause distorted audio when using the WebAudio API. This this similar bug filled in the Webkit bug tracker. https://bugs.webkit.org/show_bug.cgi?id=227199 You may want to file a separate report yourself.

brianpeiris avatar Aug 01 '21 05:08 brianpeiris