[sound] Initialize snd_alive_time on connection to JACK

Sys_DoubleTime starts at 4Gs in order to keep its precision fixed for a
nice long time (about 120 years, iirc).

This fixes an instant watchdog trigger when first starting up in
testsound. I'm not sure why it didn't happen with nq, but I guess that
doesn't really matter
This commit is contained in:
Bill Currie 2022-06-03 20:01:34 +09:00
parent 56cd0f3f1d
commit cbc5654b5e

View file

@ -269,6 +269,7 @@ s_jack_connect (snd_t *snd)
snd->channels = 2; snd->channels = 2;
s_jack_activate (); s_jack_activate ();
sound_started = 1; sound_started = 1;
snd_alive_time = Sys_DoubleTime ();
Sys_Printf ("Connected to JACK: %d Sps\n", snd->speed); Sys_Printf ("Connected to JACK: %d Sps\n", snd->speed);
return 1; return 1;
} }