mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-07 08:01:10 +00:00
comment old code
This commit is contained in:
parent
21df10ffec
commit
962f02b66b
@ -1,8 +1,8 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TgVoipWebrtc
|
import TgVoipWebrtc
|
||||||
import UniversalMediaPlayer
|
//import UniversalMediaPlayer
|
||||||
import AppBundle
|
//import AppBundle
|
||||||
import OpusBinding
|
import OpusBinding
|
||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
@ -165,31 +165,34 @@ public final class OngoingGroupCallContext {
|
|||||||
participantDescriptionsRequired(Set(ssrcs.map { $0.uint32Value }))
|
participantDescriptionsRequired(Set(ssrcs.map { $0.uint32Value }))
|
||||||
},
|
},
|
||||||
externalDecodeOgg: { sourceData in
|
externalDecodeOgg: { sourceData in
|
||||||
let tempFile = TempBox.shared.tempFile(fileName: "audio.ogg")
|
|
||||||
defer {
|
|
||||||
TempBox.shared.dispose(tempFile)
|
|
||||||
}
|
|
||||||
|
|
||||||
guard let _ = try? sourceData.write(to: URL(fileURLWithPath: tempFile.path), options: .atomic) else {
|
return nil
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var resultData = Data()
|
// let tempFile = TempBox.shared.tempFile(fileName: "audio.ogg")
|
||||||
|
// defer {
|
||||||
let source = SoftwareAudioSource(path: tempFile.path)
|
// TempBox.shared.dispose(tempFile)
|
||||||
while true {
|
// }
|
||||||
if let frame = source.readFrame() {
|
//
|
||||||
resultData.append(frame)
|
// guard let _ = try? sourceData.write(to: URL(fileURLWithPath: tempFile.path), options: .atomic) else {
|
||||||
} else {
|
// return nil
|
||||||
break
|
// }
|
||||||
}
|
//
|
||||||
}
|
// var resultData = Data()
|
||||||
|
//
|
||||||
if resultData.isEmpty {
|
// let source = SoftwareAudioSource(path: tempFile.path)
|
||||||
return nil
|
// while true {
|
||||||
} else {
|
// if let frame = source.readFrame() {
|
||||||
return resultData
|
// resultData.append(frame)
|
||||||
}
|
// } else {
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if resultData.isEmpty {
|
||||||
|
// return nil
|
||||||
|
// } else {
|
||||||
|
// return resultData
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
disableIncomingChannels: audioStreamData?.account.testingEnvironment ?? false
|
disableIncomingChannels: audioStreamData?.account.testingEnvironment ?? false
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user