iphone - objectiveC/CMTime - convert AVPlayer.duration to milliseconds -


i'm creating app playing ringtone , i'd want know current time in milliseconds of played ringtone every time.

cmtime ctime = player_.currenttime; float currenttime = ctime.value / ctime.timescale;

that currenttime here gets value in seconds. how can exact currenttime value in milliseconds?

there way current times in seconds, can take 1000 times , ther have miliseconds:

float64 dur = cmtimegetseconds([player currenttime]); float64 durinmilisec = 1000*dur; 

sadly have use float or float64 can't use result cmtime


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -