AVMutableCompositionTrack - insertTimeRange - insertEmptyTimeRange issue

后端 未结 3 1762
感情败类
感情败类 2021-01-12 16:47

I have a strange problem: I want to generate a new sound file out of two soundfiles and silence.

sound1: 2 seconds long + silence: 2 seconds silence + sound2: 2 seco

3条回答
  •  再見小時候
    2021-01-12 17:15

    Not sure if its late,

    insertEmptyTimeRange : If you insert an empty time range into the track, any media that was presented during that interval prior to the insertion will be presented instead immediately afterward.

    So all you have to do is add both the clips first and then add the emptytime range at time 2. This should work

    insertTimeRange(0 to 2)
    insertTimeRange(2 to 4)
    insertEmptyTimeRange(2 to 4)

提交回复
热议问题