misc.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
  5. * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
  6. * PLEASE READ THESE TERMS DISTRIBUTING. *
  7. * *
  8. * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
  9. * by Monty <monty@xiph.org> and The XIPHOPHORUS Company *
  10. * http://www.xiph.org/ *
  11. * *
  12. ********************************************************************
  13. function: miscellaneous prototypes
  14. last mod: $Id: misc.h,v 1.4.8.1 2000/08/31 09:00:01 xiphmont Exp $
  15. ********************************************************************/
  16. #ifndef _V_RANDOM_H_
  17. #define _V_RANDOM_H_
  18. #include "vorbis/codec.h"
  19. extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
  20. extern void _vorbis_block_ripcord(vorbis_block *vb);
  21. extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB);
  22. #ifdef DEBUG_LEAKS
  23. extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line);
  24. extern void _VDBG_free(void *ptr,char *file,long line);
  25. #ifndef MISC_C
  26. #undef malloc
  27. #undef calloc
  28. #undef realloc
  29. #undef free
  30. #define malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__)
  31. #define calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__)
  32. #define realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__)
  33. #define free(x) _VDBG_free((x),__FILE__,__LINE__)
  34. #endif
  35. #endif
  36. #endif