Commit Graph

9 Commits

Author SHA1 Message Date
nbsnl
6227fed5be Fix fullscreen startup crash caused by WASAPI audio initialization
The client was crashing during fullscreen initialization due to a NULL 
IMMDeviceEnumerator pointer inside miniaudio’s WASAPI backend.

Crash location:
ma_IMMDeviceEnumerator_GetDefaultAudioEndpoint
(inlined in ma_device_init_internal__wasapi)

Disassembly showed a null vtable dereference:
call qword ptr [rax+20h]

On some systems, WASAPI fails to create or retrieve the default audio endpoint
(especially in VMs, RDP sessions, missing/disabled audio devices, or timing
issues during fullscreen initialization). This results in a NULL COM pointer 
being used, causing a 0xC0000005 access violation before the game window fully 
appears.

Solution:
WASAPI backend has been disabled and the client now falls back to the more stable 
DirectSound/WinMM audio backends.

Applied definitions:
#define MA_NO_WASAPI
#define MA_ENABLE_DSOUND
#define MA_ENABLE_WINMM

Results:
✔ Fullscreen crash completely resolved
✔ Audio still works through DirectSound
✔ Improved stability across fullscreen/windowed modes
✔ No functional drawbacks observed
2025-11-15 23:48:28 +03:00
Amun
7caf9639e0 Audio engine: small bug(see desc)
The music wouldn't play if the sound was 0 and you changed the song because it would be stopped by the fade during the next frame.
2025-10-08 21:34:43 +03:00
Amun
01f4417d80 Audio Engine volume bug & small update
Fixed a bug where the volume change would be ignored if the sound was fading
Added SoundEngine::GetMusicVolume
Removed volume factor
Removed unused SetListenerVelocity
2025-10-05 22:08:37 +03:00
d1str4ught
5b1d3c6bce new pack system 2025-09-21 05:28:55 +02:00
d1str4ught
cfae08b973 Merge pull request #12 from sndth/fix-audio-casting-warnings
Fix potential casting warnings inside AudioLib
2025-09-02 12:07:03 +02:00
sndth
99f04c27d4 Fix potential casting warnings inside AudioLib 2025-09-01 17:28:25 +02:00
Amun
f6c9422048 Sound engine update 2025-09-01 14:46:23 +03:00
d1str4ught
a418f8616d include paths normalized 2025-08-28 20:50:20 +02:00
Amun
71e906b8f2 New sound system & removed miles 2025-08-27 21:55:11 +03:00