DEADSOFTWARE

sdlmixer: report Mix_QuerySpec results
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Thu, 7 Apr 2016 16:33:03 +0000 (19:33 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Thu, 7 Apr 2016 16:33:03 +0000 (19:33 +0300)
src/engine/e_sound_sdl.inc

index eb039a21e26321a4c6abc43ddea930c9aed04bd5..0aca0651876ed529463d0f802cd85042f8faad7a 100644 (file)
@@ -155,6 +155,9 @@ end;
 function e_InitSoundSystem(): Boolean;
 var
   res, i: Integer;
+  rfreq: Integer;
+  rformat: UInt16;
+  rchans: Integer;
 begin
   if SoundInitialized then begin Result := true; Exit end;
 
@@ -181,6 +184,11 @@ begin
     Exit;
   end;
 
+  if Mix_QuerySpec(@rfreq, @rformat, @rchans) > 0 then
+  begin
+    e_WriteLog(Format('SDL: frequency=%d; format=%u; channels=%d', [rfreq, rformat, rchans]), MSG_NOTIFY);
+  end;
+
   Mix_AllocateChannels(N_CHANNELS);
   Mix_ChannelFinished(chanFinished);