/////////////////////////////////////////////////////////////////////////////// // // // This file is part of ModelBlocks. Copyright 2009, ModelBlocks developers. // // // // ModelBlocks is free software: you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation, either version 3 of the License, or // // (at your option) any later version. // // // // ModelBlocks is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with ModelBlocks. If not, see . // // // // ModelBlocks developers designate this particular file as subject to // // the "Moses" exception as provided by ModelBlocks developers in // // the LICENSE file that accompanies this code. // // // /////////////////////////////////////////////////////////////////////////////// #ifndef __NL_CONST_H_ #define __NL_CONST_H_ //#include /////////////////////////////////////////////////////////////////////////////// // type defs... typedef short int16 ; typedef int16 Sample ; //typedef int Mag ; //typedef int Gam ; /////////////////////////////////////////////////////////////////////////////// // Misc consts... int max(int i,int j) {return (i>j)?i:j;} int min(int i,int j) {return (i> (sizeof(size_t) - i)); } inline size_t rotRight(const size_t& n, const size_t& i) { return (n >> i) | (n << (sizeof(size_t) - i)); } //inline float abs ( float a ) { return (a>=0)?a:-a; } /* /////////////////////////////////////////////////////////////////////////////// // Basic phone recognition consts... static const int NUM_SAMPLES_PER_FRAME = 512; #ifdef OLD_Q static const int FRAME_RATE_IN_SAMPLES = 160; //// 80 #else static const int FRAME_RATE_IN_SAMPLES = 256; //// 160; //// 80 #endif static const int LOG_NUM_FREQUENCIES = 8; static const int LOG_NUM_QUEFRENCIES = LOG_NUM_FREQUENCIES; static const int NUM_FREQUENCIES = 1<