diff options
| author | Lena <lena@omega> | 2026-08-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-08-01 00:00:00 +0000 |
| commit | 75b1a5569bf9048acefa49f2921b2653a828d545 (patch) | |
| tree | 1b0342936b71ac5e5f59ad3b4e1e37cea2691ff5 /app/src/main/java/invalid/lena/scrcpy/AudioFrames.java | |
| parent | 4ea99f1b77ba547014fb7b7becaa8de2fd671a0b (diff) | |
| download | scrcpy-android-75b1a5569bf9048acefa49f2921b2653a828d545.tar.gz | |
audio: harden Opus playback
Preserve decoder timing and keep blocking speaker writes off codec
callbacks. Playback failures no longer take down video or control.
Diffstat (limited to 'app/src/main/java/invalid/lena/scrcpy/AudioFrames.java')
| -rw-r--r-- | app/src/main/java/invalid/lena/scrcpy/AudioFrames.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java b/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java index da0bb0a..eaf0db1 100644 --- a/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java +++ b/app/src/main/java/invalid/lena/scrcpy/AudioFrames.java @@ -4,6 +4,7 @@ package invalid.lena.scrcpy; // implementation; tests use a recording stub. Kept android-free. // // start(fourcc) tells the sink which wire codec it should expect. +// ptsUs is the wire presentation timestamp with protocol flags removed. // For raw payloads are interleaved s16le PCM. For opus the first // frame has isConfig=true and payload is the OpusHead (the server // pre-strips the AOPUSHDR/AOPUSDLY/AOPUSPRL container); subsequent @@ -12,7 +13,7 @@ public interface AudioFrames { void start(int fourcc); - void feed(byte[] data, int off, int len, boolean isConfig); + void feed(byte[] data, int off, int len, long ptsUs, boolean isConfig); void release(); } |