equal
deleted
inserted
replaced
378 end; |
378 end; |
379 |
379 |
380 procedure InitSound; |
380 procedure InitSound; |
381 const channels: LongInt = 2; |
381 const channels: LongInt = 2; |
382 var success: boolean; |
382 var success: boolean; |
|
383 s: shortstring; |
383 begin |
384 begin |
384 if not (isSoundEnabled or isMusicEnabled) then |
385 if not (isSoundEnabled or isMusicEnabled) then |
385 begin |
386 begin |
386 isAudioMuted:= true; |
387 isAudioMuted:= true; |
387 cInitVolume:= 0; |
388 cInitVolume:= 0; |
410 |
411 |
411 WriteToConsole('Init SDL_mixer... '); |
412 WriteToConsole('Init SDL_mixer... '); |
412 |
413 |
413 if (Mix_Init(MIX_INIT_OGG or MIX_INIT_OPUS) and MIX_INIT_OPUS) = 0 then |
414 if (Mix_Init(MIX_INIT_OGG or MIX_INIT_OPUS) and MIX_INIT_OPUS) = 0 then |
414 begin |
415 begin |
415 WriteToConsole('Cannot init OPUS: ' + SDL_GetError()); |
416 s:= SDL_GetError(); |
|
417 WriteToConsole('Cannot init OPUS: ' + s); |
416 |
418 |
417 if SDLCheck(Mix_Init(MIX_INIT_OGG) <> 0, 'Mix_Init', true) then exit; |
419 if SDLCheck(Mix_Init(MIX_INIT_OGG) <> 0, 'Mix_Init', true) then exit; |
418 end; |
420 end; |
419 |
421 |
420 WriteLnToConsole(msgOK); |
422 WriteLnToConsole(msgOK); |