Made audio open errors into warnings
Varvara will continue to execute if SDL_OpenAudioDevice fails, but the Audio devices will be disabled.
This commit is contained in:
parent
b6c40129e4
commit
43ea2532e8
|
@ -205,7 +205,7 @@ init(void)
|
||||||
as.userdata = NULL;
|
as.userdata = NULL;
|
||||||
audio_id = SDL_OpenAudioDevice(NULL, 0, &as, NULL, 0);
|
audio_id = SDL_OpenAudioDevice(NULL, 0, &as, NULL, 0);
|
||||||
if(!audio_id)
|
if(!audio_id)
|
||||||
return error("sdl_audio", SDL_GetError());
|
error("sdl_audio", SDL_GetError());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,6 +353,7 @@ static void
|
||||||
audio_talk(Device *d, Uint8 b0, Uint8 w)
|
audio_talk(Device *d, Uint8 b0, Uint8 w)
|
||||||
{
|
{
|
||||||
Apu *c = &apu[d - devaudio0];
|
Apu *c = &apu[d - devaudio0];
|
||||||
|
if(!audio_id) return;
|
||||||
if(!w) {
|
if(!w) {
|
||||||
if(b0 == 0x2)
|
if(b0 == 0x2)
|
||||||
mempoke16(d->dat, 0x2, c->i);
|
mempoke16(d->dat, 0x2, c->i);
|
||||||
|
|
Loading…
Reference in New Issue