1

I can cut a song in range start time to duration, bot are float. But i get only seconds in final song.

CMTime sTime=CMTimeMake(startTime*1000, 1000);
CMTime eTime=CMTimeMake(duration*1000, 1000);

CMTimeRange editRange = CMTimeRangeMake(sTime,eTime);
[myMutableCompostion insertTimeRange:editRange ofAsset:sourceAsset atTime:myMutableCompostion.duration error:&editError];

Eg: startime=50.0 duration=23.9 song should be 23.9 seconds, but I get only 23 seconds.

Please help me to cut song with millisecond precision.

Nekto
  • 17,837
  • 1
  • 55
  • 65
Durgaprasad
  • 1,910
  • 2
  • 25
  • 44
  • That's because [CMTime](https://developer.apple.com/library/mac/#documentation/CoreMedia/Reference/CMTime/Reference/reference.html#//apple_ref/doc/c_ref/CMTime) is an integer (int64/int32). I don't know enough about an alternative to give you an answer, but this should explain why this is happening. – Mick MacCallum Oct 20 '12 at 09:04

0 Answers0