Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 99b53f9a6a | |||
| 8da563b280 |
+2
-2
@@ -8,8 +8,8 @@ android {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
|
||||
versionName "7.2.1"
|
||||
versionCode = 192
|
||||
versionName "7.3"
|
||||
versionCode = 193
|
||||
}
|
||||
|
||||
flavorDimensions "root"
|
||||
|
||||
@@ -168,8 +168,17 @@ public class AndroidAudioRenderer implements AudioRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playDecodedAudio(byte[] audioData) {
|
||||
track.write(audioData, 0, audioData.length);
|
||||
public void playDecodedAudio(short[] audioData) {
|
||||
// Only queue up to 40 ms of pending audio data in addition to what AudioTrack is buffering for us.
|
||||
if (MoonBridge.getPendingAudioFrames() < 8) {
|
||||
// This will block until the write is completed. That can cause a backlog
|
||||
// of pending audio data, so we do the above check to be able to bound
|
||||
// latency at 40 ms in that situation.
|
||||
track.write(audioData, 0, audioData.length);
|
||||
}
|
||||
else {
|
||||
LimeLog.info("Too many pending audio frames: " + MoonBridge.getPendingAudioFrames());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
Submodule moonlight-common updated: 39c6a3c8b1...9f409da618
Reference in New Issue
Block a user