forked from Foxyz/sync_replay_project
Sounds: survive an audio device that crashes the app on open
A Windows friend's 1.3.0 dies about a second in on every start, right around the 2 s audio warm-up (no Dart error, no close lines). Opening the device is now logged and leaves audio-init.pending until it returns; a start that finds it skips sounds instead of crashing again, and a sound preview in Settings tries once more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
22ce40a488
commit
c91d57633f
5 files changed
+92
-3
No files matched your search
@@ -49,6 +49,8 @@ Future<void> main(List<String> args) async {
|
||||
await AppSettings.instance.ensureLoaded();
|
||||
// The composition root: every system, made once.
|
||||
final graph = AppGraph.build();
|
||||
// Sounds stay off after an audio-device crash (see SoundEngine.crashMark).
|
||||
graph.sfx.engine.crashMark = '${dirs.support}${Platform.pathSeparator}audio-init.pending';
|
||||
final ports = graph.ports;
|
||||
// Close button / Alt+F4: the orderly close ([shutDownApp]), so others
|
||||
// see "left", your server shuts down and no player outlives the engine.
|
||||
|
||||
Reference in new issue
Block a user