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

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -