api.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #pragma once
  2. #ifdef __cplusplus
  3. extern "C"
  4. {
  5. #endif
  6. #include "reverb.h"
  7. typedef signed short SInt16;
  8. #if __LP64__
  9. typedef unsigned int UInt32;
  10. typedef signed int SInt32;
  11. #else
  12. typedef unsigned long UInt32;
  13. typedef signed long SInt32;
  14. #endif
  15. //#define UInt32 unsigned long
  16. //#define SInt16 short
  17. #define OSStatus int
  18. #define noErr 0
  19. //创建混响对象
  20. Reverb* createReverb();
  21. OSStatus deleteReverb(Reverb* pobj);
  22. //处理数据
  23. OSStatus simpleDelay1 (Reverb* pobj, //混响对象
  24. void *inRefCon, // scope reference
  25. UInt32 inNumberFrames, // number of frames to process
  26. SInt16 *sampleBuffer,//数据
  27. int samplingFreqHz,
  28. int channelNum);//是否双声道
  29. //设置属性
  30. OSStatus setReverbParem(Reverb* pobj,
  31. float drytime,
  32. float wettime,
  33. float dampness,
  34. float roomwidth,
  35. float roomsize);
  36. //获取属性
  37. OSStatus getReverbParem(Reverb* pobj,
  38. float* drytime,
  39. float* wettime,
  40. float* dampness,
  41. float* roomwidth,
  42. float* roomsize);
  43. #ifdef __cplusplus
  44. }
  45. #endif