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.

sdl.asm 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. EXTERN SDL_Init
  2. Extern SDL_Quit
  3. Extern SDL_SetVideoMode
  4. Extern SDL_Delay
  5. Extern SDL_OpenAudio
  6. Extern SDL_PauseAudio
  7. Extern SDL_WaitEvent
  8. %define SDL_SWSURFACE 0
  9. %define AUDIO_U8 0x0008 ; Unsigned 8-bit samples
  10. %define AUDIO_S8 0x8008 ; Signed 8-bit samples
  11. %define AUDIO_U16LSB 0x0010 ; Unsigned 16-bit samples
  12. %define AUDIO_S16LSB 0x8010 ; Signed 16-bit samples
  13. %define AUDIO_U16MSB 0x1010 ; As above, but big-endian byte order
  14. %define AUDIO_S16MSB 0x9010 ; As above, but big-endian byte order
  15. %define AUDIO_U16 AUDIO_U16LSB
  16. %define AUDIO_S16 AUDIO_S16LSB
  17. STRUC SDL_AudioSpec_STRUC
  18. .freq: resw 1
  19. .format: resw 1
  20. .channels: resb 1
  21. .silence: resb 1
  22. .samples: resw 1
  23. .size: resw 1
  24. .callback: resq 1
  25. .userdata: resq 1
  26. ENDSTRUC
  27. %macro def_SDL_AudioSpec 1
  28. %define %1.freq %1+SDL_AudioSpec_STRUC.freq
  29. %define %1.format %1+SDL_AudioSpec_STRUC.format
  30. %define %1.channels %1+SDL_AudioSpec_STRUC.channels
  31. %define %1.silence %1+SDL_AudioSpec_STRUC.silence
  32. %define %1.samples %1+SDL_AudioSpec_STRUC.samples
  33. %define %1.size %1+SDL_AudioSpec_STRUC.size
  34. %define %1.callback %1+SDL_AudioSpec_STRUC.callback
  35. %define %1.userdata %1+SDL_AudioSpec_STRUC.userdata
  36. %1:
  37. ISTRUC SDL_AudioSpec_STRUC
  38. %endmacro