| 177 | === Audio lost after interruption (iOS 7) === #interruption2 |
| 178 | |
| 179 | It has been reported that any time an audio interruption happens, audio is lost until the application is killed/restarted, also reported that this occurs only on iOS7. |
| 180 | |
| 181 | Here is the reported working solution: |
| 182 | - application should be configured to receive interruption events, see also [#interuption problem with interruption]. |
| 183 | - forcefully shutdown the sound device when interruption begins, e.g: using {{{pjsua_set_no_snd_dev())}}} for pjsua, or {{{AudDevManager.setNoDev()}}} for pjsua2 |
| 184 | - restart the sound device after interruption ends, e.g: using {{{pjsua_set_snd_dev()}}} for pjsua, or {{{AudDevManager.setPlaybackDev()+setCaptureDev()}}} for pjsua2. |
| 185 | |
| 186 | Also note this is the recommended outline of the normal flow for audio interruption: |
| 187 | - on interruption begin |
| 188 | 1. hold the calls |
| 189 | 1. stop any other media if any (i.e. disconnect all connections in the bridge) |
| 190 | 1. by default, sound device will be stopped after some idle period after there is no connection in the bridge, or alternatively just forcefully shutdown the sound device. |
| 191 | |
| 192 | - on interruption end |
| 193 | 1. unhold the calls |
| 194 | 1. resume any other media if any |
| 195 | 1. if sound device was not shutdown forcefully, first connection to the bridge will cause sound device to be started, otherwise manual restarting the sound device, by setting playback & capture device, is required. |
| 196 | |
| 197 | |