ss="summary source-code" id="source">
  <h2><span>Implementation</span></h2>
  <pre class="language-dart"><code class="language-dart">Future&lt;Duration?&gt; startPlayer({
  Codec codec = Codec.aacADTS,
  String? fromURI,
  Uint8List? fromDataBuffer,
  int sampleRate = 16000, &#47;&#47; Used only with PCM codecs
  int numChannels = 1, &#47;&#47; Used only with PCM codecs
  TWhenFinished? whenFinished,
}) async {
  Duration? r;
  await _lock.synchronized(() async {
    r = await _startPlayer(
      codec: co