Linux x86_64 implementation of libglitch : https://github.com/erlehmann/libglitch.git
x86-64
nasm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. EXTERN SDL_Init
  2. Extern SDL_Quit
  3. Extern SDL_Delay
  4. Extern SDL_OpenAudio
  5. Extern SDL_PauseAudio
  6. Extern SDL_WaitEvent
  7. Extern SDL_GetError
  8. %ifdef SDL1
  9. %define SDL_QUIT 0x0C
  10. Extern SDL_SetVideoMode
  11. %endif
  12. %ifdef SDL2
  13. ; events
  14. %define SDL_QUIT 0x100
  15. %define SDL_AUDIODEVICEADDED 0x1100
  16. ; values
  17. %define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
  18. %define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_MASK | 0 ; display 0
  19. ; function
  20. Extern SDL_CreateWindow
  21. %endif
  22. %ifdef MIX_AUDIO
  23. Extern SDL_MixAudio
  24. %define SDL_MAX_VOLUME 128
  25. %endif
  26. %define SDL_SWSURFACE 0
  27. %define AUDIO_U8 0x0008 ; Unsigned 8-bit samples
  28. %define AUDIO_S8 0x8008 ; Signed 8-bit samples
  29. %define AUDIO_U16LSB 0x0010 ; Unsigned 16-bit samples
  30. %define AUDIO_S16LSB 0x8010 ; Signed 16-bit samples
  31. %define AUDIO_U16MSB 0x1010 ; As above, but big-endian byte order
  32. %define AUDIO_S16MSB 0x9010 ; As above, but big-endian byte order
  33. %define AUDIO_U16 AUDIO_U16LSB
  34. %define AUDIO_S16 AUDIO_S16LSB
  35. STRUC SDL_AudioSpec_STRUC
  36. .freq: resw 1
  37. .format: resw 1
  38. .channels: resb 1
  39. .silence: resb 1
  40. .samples: resw 1
  41. .size: resw 1
  42. .callback: resq 1
  43. .userdata: resq 1
  44. ENDSTRUC
  45. %macro def_SDL_AudioSpec 1
  46. %define %1.freq %1+SDL_AudioSpec_STRUC.freq
  47. %define %1.format %1+SDL_AudioSpec_STRUC.format
  48. %define %1.channels %1+SDL_AudioSpec_STRUC.channels
  49. %define %1.silence %1+SDL_AudioSpec_STRUC.silence
  50. %define %1.samples %1+SDL_AudioSpec_STRUC.samples
  51. %define %1.size %1+SDL_AudioSpec_STRUC.size
  52. %define %1.callback %1+SDL_AudioSpec_STRUC.callback
  53. %define %1.userdata %1+SDL_AudioSpec_STRUC.userdata
  54. %1:
  55. ISTRUC SDL_AudioSpec_STRUC
  56. %endmacro