Sony PlayStation2 Study
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.

86 lines
2.5 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. # _____ ___ ____ ___ ____
  3. # ____| | ____| | | |____|
  4. # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
  5. #-----------------------------------------------------------------------
  6. # Copyright 2005, James Lee (jbit<at>jbit<dot>net)
  7. # Licenced under Academic Free License version 2.0
  8. # Review ps2sdk README & LICENSE files for further details.
  9. */
  10. /**
  11. * @file
  12. * PS2SND definitions.
  13. */
  14. #ifndef __PS2SND_H__
  15. #define __PS2SND_H__
  16. #include <tamtypes.h>
  17. #include <libsd.h>
  18. #define STREAM_STEREO 1
  19. #define STREAM_END_CLOSE 0x0000
  20. #define STREAM_END_REPEAT 0x1000
  21. #define BINDID_PS2SND 0x80068000
  22. #define PS2SND_Init 4
  23. #define PS2SND_SetParam 5
  24. #define PS2SND_GetParam 6
  25. #define PS2SND_SetSwitch 7
  26. #define PS2SND_GetSwitch 8
  27. #define PS2SND_SetAddr 9
  28. #define PS2SND_GetAddr 10
  29. #define PS2SND_SetCoreAttr 11
  30. #define PS2SND_GetCoreAttr 12
  31. #define PS2SND_Note2Pitch 13
  32. #define PS2SND_Pitch2Note 14
  33. #define PS2SND_ProcBatch 15
  34. #define PS2SND_ProcBatchEx 16
  35. #define PS2SND_VoiceTrans 17
  36. #define PS2SND_BlockTrans 18
  37. #define PS2SND_VoiceTransStatus 19
  38. #define PS2SND_BlockTransStatus 20
  39. #define PS2SND_SetTransCallback 21
  40. #define PS2SND_SetIRQCallback 22
  41. #define PS2SND_SetEffectAttr 23
  42. #define PS2SND_GetEffectAttr 24
  43. #define PS2SND_ClearEffectWorkArea 25
  44. #define PS2SND_SetTransIntrHandler 26
  45. #define PS2SND_SetSpu2IntrHandler 27
  46. #define PS2SND_StreamOpen 64
  47. #define PS2SND_StreamClose 65
  48. #define PS2SND_StreamPlay 66
  49. #define PS2SND_StreamPause 67
  50. #define PS2SND_StreamSetPosition 68
  51. #define PS2SND_StreamGetPosition 69
  52. #define PS2SND_StreamSetVolume 70
  53. #define PS2SND_QueryMaxFreeMemSize 99 /* XXX: Hack until i can figure out how to do it right */
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57. #ifdef _EE
  58. int sndLoadSample(void *buf, u32 spuaddr, int size);
  59. u32 sndQueryMaxFreeMemSize(void);
  60. #endif
  61. int sndStreamOpen(char *file, u32 voices, u32 flags, u32 bufaddr, u32 bufsize);
  62. int sndStreamClose(void);
  63. int sndStreamPlay(void);
  64. int sndStreamPause(void);
  65. int sndStreamSetPosition(int block);
  66. int sndStreamGetPosition(void);
  67. int sndStreamSetVolume(int left, int right);
  68. u32 sndQueryMaxFreeMemSize();
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72. #endif /* __PS2SND_H__ */