Retry opening audio streams after all exceptions, not just IO failure.

This commit is contained in:
Nekojimi 2024-04-04 12:57:18 +01:00
parent abd676fa49
commit a901163af3
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ public class TrackPlayer implements Closeable
private static final int DESIRED_BUFFER_SIZE = 3840 * 500;
private static final int MAX_READ_FAILS = 3;
private static final int RETRY_COUNT = 10;
private static final int RETRY_COUNT = 8;
private static final int RETRY_DELAY = 100;
private final CircularByteBuffer audioBuffer = new CircularByteBuffer(3840 * 1024);
@ -47,7 +47,7 @@ public class TrackPlayer implements Closeable
decodedFormat = AudioSendHandler.INPUT_FORMAT;
break; // it worked!
} catch (IOException ex)
} catch (Exception ex)
{
try
{