Cannot record for duration, regardless of the value of 'dur' it always records for about 7 seconds.
self.recorder!.prepareToRecord()
let time = self.recorder!.deviceCurrentTime + 0.01
let dur: TimeInterval = 1.0
self.recorder!.record(atTime: time, forDuration: dur)
Any help appreciated, thanks. Paul