detach method
Dynamically detaches this route.
With drain true, accepted frames are delivered before the sink is
finished. Otherwise buffered frames are discarded and the sink is aborted.
Implementation
Future<void> detach({bool drain = true}) => drain
? _mailbox.finish()
: _mailbox.abort(
failure: AudioFailure(
code: 'route_detached',
stage: AudioFailureStage.routing,
message: 'Audio route "$id" was detached.',
),
);