DualSense haptics and controller speaker sound bluethooth (#969)

* pad: send DualSense speaker and haptic audio over Bluetooth

* ci: fix Opus clang-cl build and macOS memory tracker test

* docs: remove Bluetooth notes from project README

* pad: keep Bluetooth audio work off emulation timing path

* pad: smooth DualSense speaker audio on USB and Bluetooth

* tests: find available macOS guest range for page manager

* pad: keep haptic waveform when Bluetooth queue overflows

* audio: reject zero output sample frequency

* Simplify DualSense audio routing and fix Bluetooth batching

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
Pyxellator
2026-10-02 12:55:00 +02:00
committed by GitHub
parent 89792a3bca
commit e1be2ead54
11 changed files with 1394 additions and 134 deletions
+19 -7
View File
@@ -192,13 +192,25 @@ uint8_t *Allocate(uint64_t size, uint32_t protection = PAGE_READWRITE,
Check(memory == reinterpret_cast<void *>(test_address),
"fixed low VirtualAlloc failed");
#elif defined(__APPLE__)
mach_vm_address_t raw = test_address;
Check(mach_vm_allocate(mach_task_self(), &raw, size, VM_FLAGS_FIXED) ==
KERN_SUCCESS &&
mach_vm_protect(mach_task_self(), raw, size, false,
static_cast<vm_prot_t>(ToHostProt(protection))) ==
KERN_SUCCESS,
"fixed low mach_vm_allocate failed");
mach_vm_address_t raw = 0;
bool allocated = false;
constexpr uintptr_t stride = 0x0000000100000000ull;
for (uintptr_t candidate = test_address;
Libs::Graphics::GuestRange{candidate, size}.Valid(); candidate += stride) {
raw = candidate;
if (mach_vm_allocate(mach_task_self(), &raw, size, VM_FLAGS_FIXED) !=
KERN_SUCCESS) {
continue;
}
if (mach_vm_protect(mach_task_self(), raw, size, false,
static_cast<vm_prot_t>(ToHostProt(protection))) ==
KERN_SUCCESS) {
allocated = true;
break;
}
mach_vm_deallocate(mach_task_self(), raw, size);
}
Check(allocated, "no free fixed guest address found");
auto *memory = reinterpret_cast<uint8_t *>(raw);
AllocationSizes()[memory] = static_cast<size_t>(size);
#else