1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-01 09:10:37 +00:00

Fixes #187. [ci-skip]

Don't exit if missing speakers when using SOUND/BEEP.
This commit is contained in:
Fellippe Heitor 2021-09-25 23:18:28 -03:00 committed by GitHub
commit 8096dff858
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,9 +267,9 @@ int32 snd_init_done=0;
void snd_init(){
if (!snd_init_done){
dev = alcOpenDevice(NULL); if(!dev) exit(111);
ctx = alcCreateContext(dev, NULL);
alcMakeContextCurrent(ctx); if(!ctx) exit(222);
dev = alcOpenDevice(NULL); if (!dev) goto done;
ctx = alcCreateContext(dev, NULL); if (!ctx) goto done;
alcMakeContextCurrent(ctx);
alListener3f(AL_POSITION, 0, 0, 0);
alListener3f(AL_VELOCITY, 0, 0, 0);
@ -279,6 +279,7 @@ void snd_init(){
}
done:;
snd_init_done=1;
}