Commit e519e09
committed
fix(windows): rewrite audio to use timing-master model and adaptive frame polling
Rewrite the Windows AudioManager to use the audio-as-timing-master pattern
(matching macOS AVPlayer). The audio thread feeds decoded PCM to WASAPI as
fast as the buffer allows, with no wall-clock drift correction, sleeps, or
sample dropping. Video compensates via audioLatencyMs. This eliminates
stutter bugs after seek, resume, or speed changes.
Also:
- Add adaptive frame polling interval based on native video frame rate
(prevents starving the audio thread on the shared SourceReader)
- Add pre-fill audio buffer on seek for gapless playback
- Include pre-built DLLs for x86-64 and ARM64
- Add jdk.accessibility module for Linux desktop packaging1 parent bfdc842 commit e519e09
9 files changed
Lines changed: 472 additions & 261 deletions
File tree
- mediaplayer/src/jvmMain
- kotlin/io/github/kdroidfilter/composemediaplayer/windows
- native/windows
- sample/composeApp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
| 29 | + | |
| 30 | + | |
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
| |||
592 | 597 | | |
593 | 598 | | |
594 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
595 | 610 | | |
596 | 611 | | |
597 | 612 | | |
| |||
807 | 822 | | |
808 | 823 | | |
809 | 824 | | |
810 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
811 | 830 | | |
812 | 831 | | |
813 | 832 | | |
| |||
863 | 882 | | |
864 | 883 | | |
865 | 884 | | |
866 | | - | |
| 885 | + | |
867 | 886 | | |
868 | 887 | | |
869 | 888 | | |
| |||
Lines changed: 289 additions & 175 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
0 commit comments