Advertisement
Kitomas

kit_sdl2_kmixer.c as of 8-18-23

Aug 18th, 2023
979
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.99 KB | None | 0 0
  1. #include "../include/kit_sdl2/kit_kmixer.h"
  2. #include "../_private/include/_kit_privmacro.h"
  3. #include "../_private/include/_kit_kmixerPrivate.h"
  4.  
  5. struct _kit_kmixerGlobals_t _kit_kmixerGlobals;
  6.  
  7.  
  8.  
  9. int kit_kmixerInit(int deviceThreadPoolSize){
  10.   if(_kit_kmixerGlobals.init) return 1;
  11.   _kit_kmixerGlobals.cores=SDL_GetCPUCount();
  12.   if(deviceThreadPoolSize>0) _kit_kmixerGlobals.threadPoolSize=deviceThreadPoolSize;
  13.   else                       _kit_kmixerGlobals.threadPoolSize=_kit_kmixerGlobals.cores;
  14.  
  15.   _kit_kmixerGlobals.capabilities =SDL_HasSSE()  <<5;
  16.   _kit_kmixerGlobals.capabilities|=SDL_HasSSE2() <<4;
  17.   _kit_kmixerGlobals.capabilities|=SDL_HasSSE3() <<3;
  18.   _kit_kmixerGlobals.capabilities|=SDL_HasSSE41()<<2;
  19.   _kit_kmixerGlobals.capabilities|=SDL_HasAVX()  <<1;
  20.   _kit_kmixerGlobals.capabilities|=SDL_HasAVX2()    ;
  21.  
  22.   _kit_kmixerGlobals.init=1;
  23.   return 0;
  24. }
  25.  
  26.  
  27. int kit_kmixerQuit(){
  28.   if(_kit_kmixerGlobals.init) return 1;
  29.   _kit_kmixerGlobals.init=0;
  30.   return 0;
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement