Skip to content

Commit f1d22e4

Browse files
committed
fix audiomixing issue
1 parent dc892be commit f1d22e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

iOS/APIExample/Examples/Advanced/AudioMixing/AudioMixing.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class AudioMixingMain: BaseViewController {
233233
timer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true, block: { [weak self](timer:Timer) in
234234
guard let weakself = self else {return}
235235
guard let filepath = Bundle.main.path(forResource: "audiomixing", ofType: "mp3") else {return}
236-
let progress = Float(weakself.agoraKit.getAudioMixingCurrentPosition()) / Float(weakself.agoraKit.getAudioMixingDuration(filepath))
236+
let progress = Float(weakself.agoraKit.getAudioMixingCurrentPosition()) / Float(weakself.agoraKit.getAudioFileInfo(filepath))
237237
weakself.audioMixingProgressView.setProgress(progress, animated: true)
238238
})
239239
}
@@ -252,7 +252,7 @@ class AudioMixingMain: BaseViewController {
252252
audioMixingDuration.text = "00 : 00"
253253
} else {
254254
guard let filepath = Bundle.main.path(forResource: "audiomixing", ofType: "mp3") else {return}
255-
let duration = agoraKit.getAudioMixingDuration(filepath)
255+
let duration = agoraKit.getAudioFileInfo(filepath)
256256
let seconds = duration / 1000
257257
audioMixingDuration.text = "\(String(format: "%02d", seconds / 60)) : \(String(format: "%02d", seconds % 60))"
258258
}

0 commit comments

Comments
 (0)