+ 2
[SOLVED] Sound in p5.js code, how does that work?
I want to attach a sound file (mp3) to my p5 code, followed all the instructions in the online reference, but it doesn’t seem to work. I think the file is loaded alright, but I can’t hear it. Can someone see the problem (and solution)? https://code.sololearn.com/WPq863BM1KO3/?ref=app
9 Respuestas
+ 6
good question sista, i have been wondering the same thing🤔
+ 5
Very possible. Ive had users that use iOS have sound issues with my codes in the past
And i am using Android with no iOS to test this
yeh i have ios and it does not work...so it probably is an ios issue
+ 3
Run loadSound from preload function
https://code.sololearn.com/WV1VwhzSsmyc/?ref=app
+ 2
「HAPPY TO HELP」 Really?! That’s great news 😃 Could it be possible that it’s another iOS issue again, that it works on Android but not an iPhones??
+ 2
Thanks 「HAPPY TO HELP」 and Sachin Shah for answering ☺️
I included an alert in the code that there’s music, but not for iPhone users 😁
+ 2
Okay, last answer in this thread: I disabled the P5 Sound function altogether and inserted an HTML <audio> tag. As long as the controls stay visible, this should work on iOS too 🎶🎵
+ 1
It is working 👍
+ 1
marjel101 Wow only for Android 😂
+ 1
Working on oneplus 6 here