WebAudio and mobile

(Lucky) #1

I was messing around with audio and webaudio, trying to make an ipad project web audio but i find it always gives me delays when i use it and potentially crashes every 5 6 clicks. It works fine on desktop safari. Has anyone had experience with this?

My file exp2.hype.zip (21.3 KB)
I used riffwave.js for this, other library suggestions welcome.

Has anyone also had experience with shoving an audio track in hype and getting audio information like pitch, levels(not just base volume) and still making it work on mobile? From what I understand you need to use webaudio to achieve it.

Let me know your experienes if you have. I’d love to make something that works on ipad and desktop which has advanced control of audio or could create audio.

(strmiska) #2

works here in safari and on ipad, but with a lot of delay.
audio on ipad is a problem because of apples restrictions.
for example auto play is canceled. if you create an app, you can use cordova and lead the audio
through the media player.
other tricks for using low latency audio:

(Lucky) #3

Hmm yes, thanks for that article. That’s using phone gap, so there are no ways to create web audio samples or use premade ones without latency natively on mobile safari? So mobile safari audio experiments/games are a bad idea correct? I wish they weren’t and I didn’t have to compete with apps in the app store. But I guess technology is still limited.

(strmiska) #4

apps in the app-store are coded natevly in objective - c or swift.
so i’m not sure as i don’t know this coding, but they don’t get this audio issue.
maby there’s some information from tumults team, cause they know this coding. as far as i know iphonegap uses the webview of xcode. therefore you get same situation as in desktop safari. there are little differences in javascript to call cordova in order to record audio or video.


I think the main issue you’re seeing with this library is that it creates PCM / WAV audio on the fly, which is a codec with very high CPU requirements and one that the iPad is not very optimized for. iOS prefers m4v, mp4, or mpeg audio over Wav files.