Varvara will continue to execute if SDL_OpenAudioDevice fails, but the
Audio devices will be disabled.
| ... | ... |
@@ -205,7 +205,7 @@ init(void) |
| 205 | 205 |
as.userdata = NULL; |
| 206 | 206 |
audio_id = SDL_OpenAudioDevice(NULL, 0, &as, NULL, 0); |
| 207 | 207 |
if(!audio_id) |
| 208 |
- return error("sdl_audio", SDL_GetError());
|
|
| 208 |
+ error("sdl_audio", SDL_GetError());
|
|
| 209 | 209 |
return 1; |
| 210 | 210 |
} |
| 211 | 211 |
|
| ... | ... |
@@ -353,6 +353,7 @@ static void |
| 353 | 353 |
audio_talk(Device *d, Uint8 b0, Uint8 w) |
| 354 | 354 |
{
|
| 355 | 355 |
Apu *c = &apu[d - devaudio0]; |
| 356 |
+ if(!audio_id) return; |
|
| 356 | 357 |
if(!w) {
|
| 357 | 358 |
if(b0 == 0x2) |
| 358 | 359 |
mempoke16(d->dat, 0x2, c->i); |