File tree Expand file tree Collapse file tree
iOS/APIExample/Examples/Advanced/AudioMixing Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments