Advertisement
Kitomas

_kit_kmixerPrivate.h as of 2023-10-05

Oct 6th, 2023
1,146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.14 KB | None | 0 0
  1. #ifndef _KIT_KMIXERPRIVATE_H
  2. #define _KIT_KMIXERPRIVATE_H
  3.  
  4.  
  5. #include <SDL2/SDL.h>
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11.  
  12.  
  13.  
  14. //for debugging/testing
  15. #define _ENABLE_SSE   SDL_TRUE
  16. #define _ENABLE_SSE2  SDL_TRUE
  17. #define _ENABLE_SSE3  SDL_TRUE
  18. #define _ENABLE_SSE41 SDL_TRUE
  19. #define _ENABLE_AVX   SDL_TRUE
  20. #define _ENABLE_AVX2  SDL_TRUE
  21.  
  22.  
  23.  
  24.  
  25. struct _kit_kmixerGlobals_t {
  26.   SDL_mutex* lock;
  27.   int threadPoolSize;
  28.   int init;
  29. };
  30. extern struct _kit_kmixerGlobals_t _kit_kmixerGlobals;
  31.  
  32.  
  33.  
  34.  
  35. typedef union {
  36.   void*   ptr;
  37.   Uint8*  u_8;
  38.   Sint16* i16;
  39.   Sint32* i32;
  40.   float*  f32;
  41. } _mono_samples;
  42.  
  43.  
  44. //(stores left and right ear components of a stereo stream)
  45. typedef struct { Uint8  l,r; } _stereo_samples_u_8;
  46. typedef struct { Sint16 l,r; } _stereo_samples_i16;
  47. typedef struct { Sint32 l,r; } _stereo_samples_i32;
  48. typedef struct { float  l,r; } _stereo_samples_f32;
  49.  
  50. typedef union {
  51.   void*                ptr;
  52.   _stereo_samples_u_8* u_8;
  53.   _stereo_samples_i16* i16;
  54.   _stereo_samples_i32* i32;
  55.   _stereo_samples_f32* f32;
  56. } _stereo_samples;
  57.  
  58.  
  59.  
  60.  
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64.  
  65. #endif /* _KIT_KMIXERPRIVATE_H */
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement