Skip to content

Commit

Permalink
Fix multiple requests on request recording
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavlidakis committed Feb 12, 2025
1 parent eede225 commit 926ef4b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ final class StreamAudioSession: @unchecked Sendable, ObservableObject {

/// Requests the record permission from the user.
func requestRecordPermission() async -> Bool {
guard !isRecording else {
return isRecording
}
let result = await audioSession.requestRecordPermission()
log.debug(
"AudioSession completed request for recording permission.",
Expand Down Expand Up @@ -303,7 +306,7 @@ final class StreamAudioSession: @unchecked Sendable, ObservableObject {

log.debug(
"""
Will configure AudioSession with
Will configure AudioSession with
- policy: \(type(of: policy))
- settings: \(callSettings)
- ownCapabilities:\(ownCapabilities)
Expand Down

0 comments on commit 926ef4b

Please sign in to comment.