mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Fix brown-paper-bag bug in audio init error checking
This commit is contained in:
parent
0792157e9d
commit
0a0be19b69
@ -149,6 +149,7 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
|||||||
break;
|
break;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// Try to release the AudioTrack if we got far enough
|
// Try to release the AudioTrack if we got far enough
|
||||||
|
e.printStackTrace();
|
||||||
try {
|
try {
|
||||||
if (track != null) {
|
if (track != null) {
|
||||||
track.release();
|
track.release();
|
||||||
@ -158,6 +159,11 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (track == null) {
|
||||||
|
// Couldn't create any audio track for playback
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user