ensureInitialized method
If the C core is not loaded already, this method loads it. A second call does nothing.
This method exists because of web. Native targets resolve their code asset at startup and have nothing to wait for. On web, the module must instantiate first, and that operation is asynchronous by nature.
The alternative is to make every method return a Future. That
alternative puts an event-loop turn in front of reduceMinMax. A scrub
calls reduceMinMax one time for each frame. A capture calls it one time
for each hop. One await at the start is the cheaper shape.
Until this method completes, every other method throws MonowaveUnavailable.
Implementation
@override
Future<void> ensureInitialized() async => initializeCount++;