ensure method

Future<SoundEngine?> ensure()

O motor da saída escolhida nas configurações gerais.

Implementation

Future<SoundEngine?> ensure() async {
  final engine = await _open();
  if (!identical(engine, _current)) {
    DiagLog.log(
      'som',
      'motor do curso: ${engine?.runtimeType} '
          'saída=${settings.state.output.name} som=${settings.state.soundOn} '
          'teclado=${keyboard()?.name}',
    );
  }
  _current = engine;
  return engine;
}