duration property

  1. @override
Duration get duration
override

The length of the whole document, at the sample rate of the source.

Implementation

@override
Duration get duration => Duration(
  microseconds:
      (document.lengthInSamples * Duration.microsecondsPerSecond / sampleRate)
          .round(),
);