Skip to content

Conversation

gnarhard
Copy link
Contributor

@gnarhard gnarhard commented Jun 1, 2025

Description

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, refactor:,
    docs:, chore:, test:, ci: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in example.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

Addresses: #1744

@Gustl22
Copy link
Collaborator

Gustl22 commented Jun 5, 2025

Thank you for the contribution. We may also can try to apply a specific error message in that case. Can you post a code example and the max parallel players you could use until the error message appeared?

@gnarhard
Copy link
Contributor Author

gnarhard commented Jun 5, 2025

Thank you for the contribution. We may also can try to apply a specific error message in that case. Can you post a code example and the max parallel players you could use until the error message appeared?

I'm noticing a very similar limitation on Android. A helpful error message would be much appreciated. My code will cover creating pools, but this limitation affects the generic player creation as well. It starts getting risky past 10 new players. This is a device-specific issue because of differing hardware. I would highly encourage anyone to not exceed creating 10 players within a 2 second time period. On android, more than this will cause extreme latency, and on iOS it will give the dreaded 'unknown error' and stop trying to load the player.

final paths = <String>[]; // max of 10
for (final path in paths) {
  await AudioPool.create(
    source: AssetSource(path),
    // Creating more than 1 player can increase your risk of seeing the dreaded 'unknown error' when loading in a loop.
    minPlayers: 1,
    maxPlayers: maxPlayers,
  );
}

@spydon spydon enabled auto-merge (squash) August 26, 2025 07:37
@spydon spydon disabled auto-merge August 26, 2025 09:39
@spydon spydon merged commit 5948126 into bluefireteam:main Aug 26, 2025
21 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants