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.

83 lines
2.9 KiB

  1. /* Copyright (C) 2002 Jean-Marc Valin */
  2. /**
  3. @file misc.h
  4. @brief Various compatibility routines for Speex
  5. */
  6. /*
  7. Redistribution and use in source and binary forms, with or without
  8. modification, are permitted provided that the following conditions
  9. are met:
  10. - Redistributions of source code must retain the above copyright
  11. notice, this list of conditions and the following disclaimer.
  12. - Redistributions in binary form must reproduce the above copyright
  13. notice, this list of conditions and the following disclaimer in the
  14. documentation and/or other materials provided with the distribution.
  15. - Neither the name of the Xiph.org Foundation nor the names of its
  16. contributors may be used to endorse or promote products derived from
  17. this software without specific prior written permission.
  18. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
  22. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  23. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  24. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  25. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  26. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  27. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. #ifndef MISC_H
  31. #define MISC_H
  32. #ifndef VERSION
  33. #define VERSION "speex-1.0"
  34. #endif
  35. /*Disable some warnings on VC++*/
  36. #ifdef _MSC_VER
  37. #pragma warning(disable : 4244)
  38. #pragma warning(disable : 4305)
  39. #endif
  40. #ifndef RELEASE
  41. void print_vec(float *vec, int len, char *name);
  42. #endif
  43. unsigned int be_int(unsigned int i);
  44. unsigned int le_int(unsigned int i);
  45. unsigned short be_short(unsigned short s);
  46. unsigned short le_short(unsigned short s);
  47. /** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */
  48. void *speex_alloc (int size);
  49. /** Speex wrapper for realloc. To do your own dynamic allocation, all you need to do is replace this function, speex_alloc and speex_free */
  50. void *speex_realloc (void *ptr, int size);
  51. /** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_alloc */
  52. void speex_free (void *ptr);
  53. /** Speex wrapper for mem_move */
  54. void *speex_move (void *dest, void *src, int n);
  55. void speex_error(char *str);
  56. void speex_warning(char *str);
  57. void speex_warning_int(char *str, int val);
  58. void speex_rand_vec(float std, float *data, int len);
  59. float speex_rand(float std);
  60. void _speex_putc(int ch, void *file);
  61. #endif