38        template <
typename, 
typename = 
void, 
typename = 
void, 
typename = 
void>
 
   64        static f32 CalcPitchRatio(
int pitch);
 
   65        static f32 CalcVolumeRatio(f32 dB);
 
   66        static f32 CalcPanRatio(f32 pan, 
PanInfo const &info);
 
   67        static f32 CalcSurroundPanRatio(f32 pan, 
PanInfo const &info);
 
   69        static u16 CalcLpfFreq(f32 scale);
 
   71        static void GetRemoteFilterCoefs(
int filter, u16 *b0, u16 *b1, u16 *b2,
 
   74        static u16 CalcRandom();
 
   76        static void const *GetDataRefAddressImpl(RefType refType, ulong value,
 
   77                                                 void const *baseAddress);
 
   80#define DEF_GET_DATA_REF_ADDRESS_(line_, index_)                            \ 
   81    template <typename T0, typename T1, typename T2, typename T3>           \ 
   82    static inline T ## index_ const *GetDataRefAddress ## index_(           \ 
   83        Util::DataRef<T0, T1, T2, T3> const &ref, void const *baseAddress)  \ 
   86        NW4RAssert_Line(line_, ref.dataType == index_);                     \ 
   88        return static_cast<T ## index_ const *>(GetDataRefAddressImpl(      \ 
   89            static_cast<RefType>(ref.refType), ref.value, baseAddress));    \ 
   93        DEF_GET_DATA_REF_ADDRESS_(141, 0);
 
   94        DEF_GET_DATA_REF_ADDRESS_(142, 1);
 
   95        DEF_GET_DATA_REF_ADDRESS_(143, 2);
 
   96        DEF_GET_DATA_REF_ADDRESS_(144, 3);
 
   98#undef DEF_GET_DATA_REF_ADDRESS_ 
  100        static inline u16 ReadBigEndian(u16 x)
 
  105        static inline ulong ReadBigEndian(ulong x)
 
  110        static f32 
const CALC_LPF_FREQ_INTERCEPT;
 
  111        static int const CALC_LPF_FREQ_TABLE_SIZE = 3 * 8;
 
  112        static int const BIQUAD_COEF_COUNT = 5;
 
  113        static int const IIR_COEF_COUNT;
 
  114        static int const COEF_TABLE_SIZE = 128;
 
  115        static int const COEF_TABLE_MAX = 127;
 
  116        static int const COEF_TABLE_MIN = 0;
 
  117        static int const PAN_TABLE_SIZE = 256 + 1;
 
  118        static int const PAN_TABLE_CENTER = 128;
 
  119        static int const PAN_TABLE_MIN = 0;
 
  120        static int const PAN_TABLE_MAX = 256;
 
  121        static int const DECIBEL_SQUARE_TABLE_SIZE;
 
  122        static int const DECIBEL_TABLE_SIZE = 964 + 1;
 
  123        static int const VOLUME_TABLE_SIZE;
 
  124        static int const OCTAVE_DIVISION = 12; 
 
  125        static int const PAN_CURVE_NUM = 3;
 
  126        static int const CALC_DECIBEL_SCALE_MAX;
 
  127        static int const PITCH_DIVISION_RANGE = 256; 
 
  128        static int const PITCH_DIVISION_BIT;
 
  129        static int const PAN_CENTER;
 
  130        static int const PAN_MAX;
 
  131        static int const PAN_MIN;
 
  132        static int const VOLUME_DB_MAX = 60;
 
  133        static int const VOLUME_DB_MIN = -904;
 
  134        static u16 
const VOLUME_MAX;
 
  135        static u16 
const VOLUME_MIN;
 
  137        static u16 
const CalcLpfFreqTable[CALC_LPF_FREQ_TABLE_SIZE];
 
  138        static u16 
const RemoteFilterCoefTable[COEF_TABLE_SIZE][BIQUAD_COEF_COUNT];
 
  139        static f32 
const Pan2RatioTableLinear[PAN_TABLE_SIZE];
 
  140        static f32 
const Pan2RatioTableSinCos[PAN_TABLE_SIZE];
 
  141        static f32 
const Pan2RatioTableSqrt[PAN_TABLE_SIZE];
 
  142        static f32 
const *PanTableTable[PAN_CURVE_NUM];
 
  143        static f32 
const Decibel2RatioTable[DECIBEL_TABLE_SIZE];
 
  144        static f32 
const PitchTable[PITCH_DIVISION_RANGE];
 
  145        static f32 
const NoteTable[OCTAVE_DIVISION];