diff --git a/Moblin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Moblin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f68b59998..391800639 100644 --- a/Moblin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Moblin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -24,7 +24,7 @@ "location" : "https://github.com/eerimoq/HaishinKit.swift", "state" : { "branch" : "main", - "revision" : "1d08dafabe4a3ce4ac5a20535965bf2c036a7eb1" + "revision" : "b20851ebaac86dc4a5aaa3d6bae69af3404a6d30" } }, { diff --git a/Moblin/RtmpServer/RtmpServerChunkStream.swift b/Moblin/RtmpServer/RtmpServerChunkStream.swift index 84ab1656b..3aa75e926 100644 --- a/Moblin/RtmpServer/RtmpServerChunkStream.swift +++ b/Moblin/RtmpServer/RtmpServerChunkStream.swift @@ -394,25 +394,18 @@ class RtmpServerChunkStream: VideoCodecDelegate { guard let audioDecoder, let pcmAudioFormat else { return } - var error: NSError? guard let outputBuffer = AVAudioPCMBuffer(pcmFormat: pcmAudioFormat, frameCapacity: 1024) else { return } - let outputStatus = audioDecoder.convert(to: outputBuffer, error: &error) { _, inputStatus in + var error: NSError? + audioDecoder.convert(to: outputBuffer, error: &error) { _, inputStatus in inputStatus.pointee = .haveData return self.audioBuffer } - switch outputStatus { - case .haveData: + if let error { + logger.info("rtmp-server: client: Error \(error)") + } else { client?.handleAudioBuffer(audioBuffer: outputBuffer) - case .error: - if let error { - logger.info("rtmp-server: client: Error \(error)") - } else { - logger.info("rtmp-server: client: Unknown error") - } - default: - logger.info("rtmp-server: client: Output status \(outputStatus.rawValue)") } }