release method

Future<void> release()

Releases the player

Throws an Exception if the player is not initialized

Before the releasing the playback will be stopped

Implementation

Future<void> release() async {
  print('RS:---> release');

  await _lock.synchronized(() async {
    _ensureInited();

    await _stop();

    await RawSoundPlayerPlatform.instance.release(
      this,
    );
    _playState = PlayState.stopped;
    _isInited = false;
  });

  print('RS:<--- release');
}