I thought I saw a recent post about this or something similar, but can’t find it.
I am a daily user of Codea, and an endless listener of music. Here’s what happens:
Find some great music to listen to…
Open Codea, open a project, and run the code
End code execution and return to edit mode
Now switch out of Codea (any way: home button, swipe, double tap home button)
Once you open another app (Safari, Spotify, Working Copy, Shade?!), there’s a noticeable hiccup of sorts in the audio - a quick blip loss of audio, then it returns.
Reopen Codea, and the hiccup happens again…
This will always happen. Completely reproducible.
Anyone else having this issue? I’m on an iPad Pro, 1st gen 12.9.
@iam3o5am sorry about this issue, it relates to something called the “audio session category” on iOS
Because Codea offers a microphone recording API, as well as music and sound effects playback, it needs to re-configure the audio session whenever it opens. This causes the audio hiccup you can hear when Codea sets the mode to playback + recording. I haven’t found a way around this (yet)
Thanks, by the way, I tried the lua touch for android, it doesn’t have a function setup () , or a function draw () , and it doesn’t work so well…I only wanted it to help me with codea…got a lot of unexpected chatter error msgs…
I tried to use the setup pgm, nothing seems to work, I checked the volume, still no audio. I’ve seen this happen before, but out of nowhere the audio started working again…I even used a pgm…
displayMode (FULLSCREEN)
function setup ()
end
function draw ()
background (0)
fill(255)
text ("Tocuch screen to play soud", WIDTH/2, HEIGHT-100)
sprite (asset.builtin.space_art.UFO) WIDTH/2, HEIGHT/2)
end
function touched (t)
if t.state==BEGAN then
sound (asset.documents.card_deal,2)
end
What device are you using and does the sound work on other apps. If it doesn’t work with only Codea, maybe you can save your projects somewhere, delete Codea and reload it.