+ 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 Answers
+ 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
ćļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć 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 ćļ¼Øļ¼”ļ¼°ļ¼°ļ¼¹ ļ¼“ļ¼Æ ļ¼Øļ¼„ļ¼¬ļ¼°ć 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