tables.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. TiMidity -- Experimental MIDI to WAVE converter
  3. Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. tables.h
  16. */
  17. #ifdef LOOKUP_SINE
  18. extern float sine(int x);
  19. #else
  20. #include <math.h>
  21. #define sine(x) (sin((2*PI/1024.0) * (x)))
  22. #endif
  23. #define SINE_CYCLE_LENGTH 1024
  24. extern int32_t freq_table[];
  25. extern double vol_table[];
  26. extern double bend_fine[];
  27. extern double bend_coarse[];
  28. extern uint8_t *_l2u; /* 13-bit PCM to 8-bit u-law */
  29. extern uint8_t _l2u_[]; /* used in LOOKUP_HACK */
  30. #ifdef LOOKUP_HACK
  31. extern int16_t _u2l[];
  32. extern int32_t *mixup;
  33. #ifdef LOOKUP_INTERPOLATION
  34. extern int8_t *iplookup;
  35. #endif
  36. #endif
  37. extern void init_tables(void);