TAAE2: AEAudioFilePlayerModule plays the rest of file from the previous call playAtTime
There is sequence that causes unexpected behaviour:
* set the
* stop playing before playback has reached the end;
* change regionDuration and relaunch playing:
filePlayerModule.regionDuration = changedDurationValue; [filePlayerModule playAtTime:AETimeStampWithHostTicks(AECurrentTimeInHostTicks()+positionTicks)];
Then we will get playback that begins with "unplayed" rest of the file from previous playback.
[self schedulePlayRegionFromPosition:_playhead]; where _playhead holds value from previous unfinished playback and sets
ScheduledAudioFileRegion for playing the remaining part of the audio from _playhead position. Setting
filePlayerModule.currentTime=0 before playAtTime corrects this, but, on the other hand, if we had used
filePlayerModule.regionStartTime=changedStartTimeValue everything would have worked perfect without
Is it the bug?