Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.4 KiB

  1. /*---------------------------------------------------------------------------*\
  2. Original Copyright
  3. FILE........: AK2LSPD.H
  4. TYPE........: Turbo C header file
  5. COMPANY.....: Voicetronix
  6. AUTHOR......: James Whitehall
  7. DATE CREATED: 21/11/95
  8. Modified by Jean-Marc Valin
  9. This file contains functions for converting Linear Prediction
  10. Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the
  11. LSP coefficients are not in radians format but in the x domain of the
  12. unit circle.
  13. \*---------------------------------------------------------------------------*/
  14. /* Speex License:
  15. Redistribution and use in source and binary forms, with or without
  16. modification, are permitted provided that the following conditions
  17. are met:
  18. - Redistributions of source code must retain the above copyright
  19. notice, this list of conditions and the following disclaimer.
  20. - Redistributions in binary form must reproduce the above copyright
  21. notice, this list of conditions and the following disclaimer in the
  22. documentation and/or other materials provided with the distribution.
  23. - Neither the name of the Xiph.org Foundation nor the names of its
  24. contributors may be used to endorse or promote products derived from
  25. this software without specific prior written permission.
  26. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  27. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  28. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  29. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
  30. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  31. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  32. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  33. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  34. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  35. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  36. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. */
  38. #ifndef __AK2LSPD__
  39. #define __AK2LSPD__
  40. int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta, char *stack);
  41. void lsp_to_lpc(float *freq, float *ak, int lpcrdr, char *stack);
  42. /*Added by JMV*/
  43. void lsp_enforce_margin(float *lsp, int len, float margin);
  44. #endif /* __AK2LSPD__ */