mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-20 07:24:42 +00:00
Drop audio frames if the backlog becomes too large. Trim buffer pools when memory runs low. Optimize AVC decoding a bit more.
This commit is contained in:
@@ -4,6 +4,7 @@ import com.limelight.nvstream.NvConnection;
|
||||
import com.limelight.nvstream.input.NvControllerPacket;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentCallbacks2;
|
||||
import android.os.Bundle;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
@@ -68,11 +69,21 @@ public class Game extends Activity implements OnGenericMotionListener, OnTouchLi
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
conn.stop();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrimMemory(int trimLevel) {
|
||||
if (trimLevel >= ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW)
|
||||
{
|
||||
System.out.println("Trimming for level: "+trimLevel);
|
||||
conn.trim();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user