adas_types.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _ADAS_TYPES_H_
  2. #define _ADAS_TYPES_H_
  3. //------------------------------------------------------------------------------------------------
  4. // constants declarations
  5. //------------------------------------------------------------------------------------------------
  6. #define ALL_SOUND_SOURCES 0xFFFFFFF
  7. #define PARTICULAR_SOUND_SOURCE 0xFFFFFFE
  8. #define ALL_TYPES 0x0000000
  9. #define NORMAL_TYPE 0x0000001
  10. #define LOOPING_TYPE 0x0000002
  11. #define SCREAM_TYPE 0x0000003
  12. #define HDD 0x0000004
  13. #define RAM 0x0000005
  14. #define BOUNDING_BOX 0x0000006
  15. #define BOUNDING_SPHERE 0x0000007
  16. #define UNDEFINED_VALUE -0xFFFFFFF
  17. //------------------------------------------------------------------------------------------------
  18. // types definitions
  19. //------------------------------------------------------------------------------------------------
  20. typedef struct
  21. {
  22. char Channels; // number of channels. One sound can be played in one
  23. // channel. 32 channels = max 32 sounds in one time
  24. char *Implementation; // string defined in OpenAL
  25. char Sound_Dir[256]; // directory with waves and index.dat file
  26. float Scale_Factor; // factor of distance scaling
  27. } ADAS_INIT_DATA;
  28. typedef struct
  29. {
  30. float LBF_point[3]; // Left, Bottom, Front point
  31. float RTB_point[3]; // Right, Top, Back point
  32. float Radius; // Radius of Sound Source (for Bounding sphere)
  33. int Type; // Type of bounding object (see definitions)
  34. } BOUNDING_OBJECT;
  35. typedef struct
  36. {
  37. int Wave_Index; // index of wave
  38. int Owner; // owner of sound source
  39. char Type; // type of sound source
  40. float Pos[3]; // starting position
  41. float Velocity[3]; // velocity
  42. float Gain; // gain (volume)
  43. float Pitch; // pitch
  44. char Source_Relative; // position will be interpreted as relative to
  45. // listener
  46. long Obstruction;
  47. float ObstructionLF;
  48. long wall_occlusion;
  49. float wall_occlusionLF;
  50. float wall_occlusion_room;
  51. long out_room;
  52. long out_roomHF;
  53. float out_room_rolloff;
  54. float out_air_absorbtion;
  55. BOUNDING_OBJECT Bounding_Object;
  56. } ADAS_SOUND_SOURCE_DATA;
  57. #endif