mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Properly end the active AVAudioSession when recording finishes.
This commit is contained in:
parent
730eafcefe
commit
96b3c093b2
1 changed files with 7 additions and 0 deletions
|
@ -75,6 +75,13 @@ class VoiceMessageAudioRecorder: NSObject, AVAudioRecorderDelegate {
|
|||
|
||||
func stopRecording() {
|
||||
audioRecorder?.stop()
|
||||
do {
|
||||
try AVAudioSession.sharedInstance().setActive(false)
|
||||
} catch {
|
||||
delegateContainer.notifyDelegatesWithBlock { delegate in
|
||||
(delegate as? VoiceMessageAudioRecorderDelegate)?.audioRecorder(self, didFailWithError: VoiceMessageAudioRecorderError.genericError) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func peakPowerForChannelNumber(_ channelNumber: Int) -> Float {
|
||||
|
|
Loading…
Reference in a new issue