kstenerud / ObjectAL-for-iPhone

Mac and iOS Audio development, minus the headache. ObjectAL is the easy Objective-C interface to OpenAL, AVAudioPlayer, and audio session management.
http://kstenerud.github.com/ObjectAL-for-iPhone
885 stars 171 forks source link

effectsMuted not working in ios 11.3 #105

Open tritmm opened 6 years ago

tritmm commented 6 years ago

Our games are using your OALSimpleAudio, it worked very well. however! after users update iOS 11.3, They mute the sounds but this sounds still play (in this function. OALSimpleAudio.sharedInstance().effectsMuted = ... )

But the Background Music don't get this problem (in this function. OALSimpleAudio.sharedInstance().bgMuted = ... )

Thanks you so much.

abeintopalo commented 6 years ago

Anybody found a workaround for this?

tritmm commented 6 years ago

Do you get this issue too?

abeintopalo commented 6 years ago

Yeah, I have the exact same issue.

OrWest commented 6 years ago

Have the same issue.

OrWest commented 6 years ago

I researched this issue. I think that Apple in 11.3 updated API of sound. OpenAL set volume to 0, but the API does not apply it.

OrWest commented 6 years ago

The same issue in cocos2d-x. link

tritmm commented 6 years ago

i fixed it by add a condition in playEffect function

if(muted | effectsMuted) { return nil; }

this way resolved this issue

screenshot 2018-11-20 16 16 27