Counter Strike : Global Offensive Source Code
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.

85 lines
4.1 KiB

  1. /*
  2. Copyright (C) Impulsonic, Inc. All rights reserved.
  3. */
  4. #ifndef IPL_PHONON_API_3D_H
  5. #define IPL_PHONON_API_3D_H
  6. #include "phonon_common.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /*************************************************************************/
  11. /* Context */
  12. /*************************************************************************/
  13. IPLAPI IPLerror iplCreate3DContext(IPLGlobalContext globalContext, IPLDspParams dspParams, IPLbyte* hrtfData, IPLhandle* context);
  14. IPLAPI IPLvoid iplDestroy3DContext(IPLhandle* context);
  15. /*************************************************************************/
  16. /* Panning Effect */
  17. /*************************************************************************/
  18. IPLAPI IPLerror iplCreatePanningEffect(IPLhandle context, IPLAudioFormat inputFormat, IPLAudioFormat outputFormat, IPLhandle* effect);
  19. IPLAPI IPLvoid iplDestroyPanningEffect(IPLhandle* effect);
  20. IPLAPI IPLvoid iplApplyPanningEffect(IPLhandle effect, IPLAudioBuffer inputAudio, IPLVector3 direction, IPLAudioBuffer outputAudio);
  21. /*************************************************************************/
  22. /* Object-Based Binaural Effect */
  23. /*************************************************************************/
  24. /* HRTF interpolation schemes. */
  25. typedef enum {
  26. IPL_HRTFINTERPOLATION_NEAREST,
  27. IPL_HRTFINTERPOLATION_BILINEAR
  28. } IPLHrtfInterpolation;
  29. IPLAPI IPLerror iplCreateBinauralEffect(IPLhandle context, IPLAudioFormat inputFormat, IPLAudioFormat outputFormat, IPLhandle* effect);
  30. IPLAPI IPLvoid iplDestroyBinauralEffect(IPLhandle* effect);
  31. IPLAPI IPLvoid iplApplyBinauralEffect(IPLhandle effect, IPLAudioBuffer inputAudio, IPLVector3 direction, IPLHrtfInterpolation interpolation, IPLAudioBuffer outputAudio);
  32. /*************************************************************************/
  33. /* Virtual Surround Effect */
  34. /*************************************************************************/
  35. IPLAPI IPLerror iplCreateVirtualSurroundEffect(IPLhandle context, IPLAudioFormat inputFormat, IPLAudioFormat outputFormat, IPLhandle* effect);
  36. IPLAPI IPLvoid iplDestroyVirtualSurroundEffect(IPLhandle* effect);
  37. IPLAPI IPLvoid iplApplyVirtualSurroundEffect(IPLhandle effect, IPLAudioBuffer inputAudio, IPLAudioBuffer outputAudio);
  38. /*************************************************************************/
  39. /* Ambisonics Binaural Effect */
  40. /*************************************************************************/
  41. IPLAPI IPLerror iplCreateAmbisonicsBinauralEffect(IPLhandle context, IPLAudioFormat inputFormat, IPLAudioFormat outputFormat, IPLhandle* effect);
  42. IPLAPI IPLvoid iplDestroyAmbisonicsBinauralEffect(IPLhandle* effect);
  43. IPLAPI IPLvoid iplApplyAmbisonicsBinauralEffect(IPLhandle effect, IPLAudioBuffer inputAudio, IPLAudioBuffer outputAudio);
  44. /*************************************************************************/
  45. /* Mixing */
  46. /*************************************************************************/
  47. IPLAPI IPLvoid iplMixAudioBuffers(IPLint32 numBuffers, IPLAudioBuffer* inputAudio, IPLAudioBuffer outputAudio);
  48. /*************************************************************************/
  49. /* Format Conversion */
  50. /*************************************************************************/
  51. IPLAPI IPLvoid iplInterleaveAudioBuffer(IPLAudioBuffer inputAudio, IPLAudioBuffer outputAudio);
  52. IPLAPI IPLvoid iplDeinterleaveAudioBuffer(IPLAudioBuffer inputAudio, IPLAudioBuffer outputAudio);
  53. IPLAPI IPLvoid iplConvertAudioBufferFormat(IPLAudioBuffer inputAudio, IPLAudioBuffer outputAudio);
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif