SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 0e1d6545e98f28919ea8b826d55ae09630b67be0 parent 04afa645972dd708342bd7c70ebeefa2b4ea4f25 Author: Lior Halphon <LIJI32@gmail.com> Date: Sat, 23 Jul 2022 14:38:55 +0300 Various improvements and fixes Diffstat:
| M | SDL/audio/openal.c | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/SDL/audio/openal.c b/SDL/audio/openal.c @@ -114,9 +114,16 @@ static void free_processed_buffers(void) } alDeleteBuffers(1, &buffer); + /* Due to a limitation in Apple's OpenAL implementation, this function + can fail once in a few times. If it does, ignore the warning, and let + this buffer be freed in a later call to free_processed_buffers. */ +#if defined(__APPLE__) + if (alGetError()) return; +#else if (AL_ERROR("Failed to delete buffer")) { return; } +#endif } } @@ -181,7 +188,7 @@ static size_t _audio_get_queue_length(void) processed = 0; } - return (buffers - processed) * buffer_size; + return (buffers - processed) * buffer_size + buffer_pos; } static void _audio_queue_sample(GB_sample_t *sample)
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.