Skip to content

feat: Add DirectAudio driver support - #1806

Draft
joshuatam wants to merge 3 commits into
utkarshdalal:masterfrom
joshuatam:feat/directaudio
Draft

feat: Add DirectAudio driver support#1806
joshuatam wants to merge 3 commits into
utkarshdalal:masterfrom
joshuatam:feat/directaudio

Conversation

@joshuatam

@joshuatam joshuatam commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Introduces DirectAudio as a new audio driver option for Wine.

This driver provides direct audio output to Android's AAudio, bypassing PulseAudio or ALSA middleware, potentially improving audio latency and compatibility for users.

Thanks for the interesting work from @The412Banner
https://github.com/The412Banner/directaudio

Recording

N/A

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Adds DirectAudio as a new Wine audio driver on Android, routing audio via AAudio to reduce latency by bypassing PulseAudio/ALSA. Supported only on Proton 11 arm64ec (Bionic); otherwise it auto-falls back to PulseAudio.

  • New Features

    • Adds “DirectAudio” to audio driver settings (label: “DirectAudio (Proton 11 arm64ec only)”) and writes Wine registry Audio=directaudio.
    • Prevents selection outside Proton 11 arm64ec (Bionic) and auto-reverts to PulseAudio when unsupported or when Wine/variant changes.
    • Bundles updated directaudio-20260812.tzst with improved AAudio stream recovery and AAUDIO_USAGE_GAME (API 28+); ContainerManager.extractDirectAudio(...) installs winedirectaudio.drv and winedirectaudio.so into Wine and copies the .drv to the container’s system32 when DirectAudio is active.
    • Updates THIRD_PARTY_NOTICES with DirectAudio (LGPL-2.1-or-later).
  • Migration

    • On Proton 11 arm64ec (Bionic), select “DirectAudio” in audio settings; the driver installs automatically. Others continue using PulseAudio.

Written for commit cdce44d. Summary will update on new commits.

Review in cubic

Introduces DirectAudio as a new audio driver option for Wine.

This driver provides direct audio output to Android's AAudio, bypassing PulseAudio or ALSA middleware, potentially improving audio latency and compatibility for users.

Thanks for the interesting work from @The412Banner
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 421c437f-72cc-4e60-a283-6e72526bdab0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The412Banner added a commit to The412Banner/GameNative that referenced this pull request Aug 12, 2026
Rebuilt directaudio-20260812.tzst from The412Banner/directaudio branch
feat/directaudio-switching-usage (v1 + the two utkarshdalal#1806 review comments):
- broadened AAudio error-callback recovery (INVALID_STATE/INVALID_HANDLE/
  TIMEOUT as well as DISCONNECTED), matching module-aaudio-sink.c, with a
  stream-identity guard + no-lost-wakeup reopen gate (device-proven, 7
  route/bg-fg cycles, no drops).
- AAUDIO_USAGE_GAME via dlsym + android_get_device_api_level()>=28 guard
  (the unixlib direct-links libaaudio; a direct ref would fail .so load on
  minSdk 26 / Android 8).
Same filename/layout; arm64ec, 16KB-page .so (loads on 4KB+16KB).
Rebuilt directaudio-20260812.tzst from The412Banner/directaudio branch
feat/directaudio-switching-usage (v1 + the two utkarshdalal#1806 review comments):
- broadened AAudio error-callback recovery (INVALID_STATE/INVALID_HANDLE/
  TIMEOUT as well as DISCONNECTED), matching module-aaudio-sink.c, with a
  stream-identity guard + no-lost-wakeup reopen gate (device-proven, 7
  route/bg-fg cycles, no drops).
- AAUDIO_USAGE_GAME via dlsym + android_get_device_api_level()>=28 guard
  (the unixlib direct-links libaaudio; a direct ref would fail .so load on
  minSdk 26 / Android 8).
Same filename/layout; arm64ec, 16KB-page .so (loads on 4KB+16KB).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants