Sound files still playing when phone is set to silent

I’m working on an iOS project in oF0.9.3 but my audio files (ofSoundPlayer) play even when the phone is set to silent.

Is there a way to prevent this or at least detect when the phone is set to silent?

Thanks.