fixed so the game doesn't crash when the soundsystem cound't init

This commit is contained in:
Magnus Auvinen 2007-09-25 20:38:33 +00:00
parent 720db23058
commit a554203943

View file

@ -259,6 +259,8 @@ int snd_init()
PaStreamParameters params;
PaError err = Pa_Initialize();
params.device = Pa_GetDefaultOutputDevice();
if(params.device < 0)
return 1;
params.channelCount = 2;
params.sampleFormat = paInt16;
params.suggestedLatency = Pa_GetDeviceInfo(params.device)->defaultLowOutputLatency;