Add this block of code to near the top of your main.lua
[code]
– Set the audio mix mode to allow sounds from the app to mix with other sounds from the device
if audio.supportsSessionProperty == true then
print(“supportsSessionProperty is true”)
audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)
end
– Store whether other audio is playing. It’s important to do this once and store the result now,
– as referring to audio.OtherAudioIsPlaying later gives misleading results, since at that point
– the app itself may be playing audio
isOtherAudioPlaying = false
if audio.supportsSessionProperty == true then
print(“supportsSessionProperty is true”)
if not(audio.getSessionProperty(audio.OtherAudioIsPlaying) == 0) then
print(“I think there is other Audio Playing”)
isOtherAudioPlaying = true
end
end
[/code] [import]uid: 199310 topic_id: 34023 reply_id: 135316[/import]