00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "CSL_Core.h"
00014 #include "Geometer.h"
00015
00016
00017 namespace csl {
00018
00019
00020 typedef enum {
00021
00022 POINT_DIAPHRAGM,
00023 DUMMY_HEAD,
00024 DUMMY_HEAD_INVERTED,
00025 NUM_EAR_TYPES
00026
00027 } ear_type_t;
00028
00029
00030 class Spatializer
00031 {
00032
00033 short** xfer_fxns;
00034 int fxn_length;
00035 int num_fxns;
00036 sample* ir;
00037 int ir_length;
00038 char* kemar_path;
00039 ear_type_t ear_type;
00040
00041 public:
00042
00043 Spatializer(char* pathname, ear_type_t et=DUMMY_HEAD);
00044 ~Spatializer();
00045
00046 void spatialize_reflections(soundray* rays, int num_rays, double bleed_coeff=0.0);
00047 void spatialize_reflections(Geometer & geo, double bleed_coeff=0.0);
00048 sample* get_IR();
00049 bool get_IR(Buffer& irbuffer);
00050 int get_length();
00051
00052
00053
00054 static bool mono_mix_early_late(Buffer& early, Buffer& late, Buffer& mix,
00055 float early_late);
00056
00057 };
00058
00059 }