Commit Graph

24 Commits

Author SHA1 Message Date
Lior Halphon e9c2c866eb Replace XAudio 2.7 and 2.9 with the redistrib version of XAudio 2.9 2024-01-06 17:41:24 +02:00
Lior Halphon c9fb3b3ec6 Fix XAudio2.7 hanging on device disconnection 2023-12-23 20:42:21 +02:00
Lior Halphon fef175dcc6 Use #pragma once for include guards, use #import exclusively on Obj-C files 2023-06-09 14:44:57 +03:00
Lior Halphon d9bf739f52 Remove auto-generated comments 2023-01-12 23:19:24 +02:00
Lior Halphon 10df4d7a13 Missing static 2022-07-24 14:54:14 +03:00
Lior Halphon 0e1d6545e9 Various improvements and fixes 2022-07-23 14:38:55 +03:00
Lior Halphon 8e125b31f6 macOS compatibility, stability 2022-07-23 14:21:31 +03:00
Maximilian Mader de10338962
Change `_audio_get_queue_length()` accoring to a856566b
This also reduces the internal audio buffer size down to 5 ms,
similar to the SDL backend at 96 kHz.
2022-07-18 22:24:00 +02:00
Maximilian Mader 8760cc5517
Mark `check_al_error()` as `static` 2022-07-18 22:16:34 +02:00
Maximilian Mader 91a2b459f9
Initialize the SDL audio system in the driver 2022-07-18 22:16:32 +02:00
Maximilian Mader d48037beec
Remove `__FILE__` usage in the OpenAL driver 2022-07-18 22:15:35 +02:00
Maximilian Mader 8fa02e0ea2
Make sure that audio resumes playing after clearing the queue 2022-07-18 22:15:35 +02:00
Maximilian Mader 7a24073f6d
Make sure that `AL_BUFFERS_PROCESSED` returns a valid value in `_audio_deinit()` 2022-07-18 22:15:35 +02:00
Maximilian Mader 64db300f24
Add an optional OpenAL audio driver for the SDL frontend
To compile the OpenAL driver specify `ENABLE_OPENAL=1` when
invoking `make`.
2022-07-18 22:15:35 +02:00
Lior Halphon a856566b54 Fixed GB_audio_get_queue_length to actually be the length rather than size, fixed XAudio2.7 audio overflow crash, changed the maximum lag limit to 1/8s rather than 1/4s. Closes #473 2022-07-18 21:56:47 +03:00
Lior Halphon 0dbfaef4cf Query the system sample rate on Windows and use it, rather than hardcode 96KHz 2022-07-08 19:51:10 +03:00
Lior Halphon 88f5b22bf6 Allow setting a non-default audio driver, fixes #466 2022-07-08 17:51:42 +03:00
Lior Halphon d9b8e829a5 Fix crash on Windows 8.x 2022-07-08 14:17:28 +03:00
Lior Halphon 9a765820cc Runtime audio driver fallback 2022-06-24 14:18:53 +03:00
Lior Halphon fd6b734fd0 Add XAudio2.7 as an compile-time audio driver for vanilla Windows 7 2022-06-24 14:18:30 +03:00
Lior Halphon 9ae2c9fd54 Replace SDL2 audio with XAudio2 on Windows 2022-06-23 01:13:59 +03:00
Lior Halphon 1b7c3c4c7c Minor fixes, style update 2020-05-10 22:16:49 +03:00
Rupert Carmichael 5f2c7b966f Pre-buffer audio samples before passing to SDL's queue 2020-05-09 11:49:20 -04:00
Lior Halphon 8d016f19d2 Move the audio code to a different file 2020-04-28 20:01:22 +03:00