misc.h 1.94 KB
Newer Older
Monty's avatar
 
Monty committed
1 2
/********************************************************************
 *                                                                  *
Monty's avatar
 
Monty committed
3
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
Monty's avatar
 
Monty committed
4 5 6
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
Monty's avatar
 
Monty committed
7
 *                                                                  *
Ralph Giles's avatar
Ralph Giles committed
8
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015             *
9
 * by the Xiph.Org Foundation http://www.xiph.org/                  *
10
 *                                                                  *
Monty's avatar
 
Monty committed
11 12
 ********************************************************************

Monty's avatar
 
Monty committed
13
 function: miscellaneous prototypes
Monty's avatar
 
Monty committed
14 15 16

 ********************************************************************/

Monty's avatar
 
Monty committed
17 18
#ifndef _V_RANDOM_H_
#define _V_RANDOM_H_
Monty's avatar
 
Monty committed
19
#include "vorbis/codec.h"
Monty's avatar
 
Monty committed
20

Monty's avatar
 
Monty committed
21 22
extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
extern void _vorbis_block_ripcord(vorbis_block *vb);
23
extern int ov_ilog(ogg_uint32_t v);
24 25 26

#ifdef ANALYSIS
extern int analysis_noisy;
Monty's avatar
 
Monty committed
27
extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB,
28
                             ogg_int64_t off);
29 30 31
extern void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,
                             ogg_int64_t off);
#endif
Monty's avatar
 
Monty committed
32

Monty's avatar
 
Monty committed
33 34 35
#ifdef DEBUG_MALLOC

#define _VDBG_GRAPHFILE "malloc.m"
36
#undef _VDBG_GRAPHFILE
37 38
extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line);
extern void _VDBG_free(void *ptr,char *file,long line);
Monty's avatar
 
Monty committed
39

40
#ifndef MISC_C
Monty's avatar
 
Monty committed
41 42 43
#undef _ogg_malloc
#undef _ogg_calloc
#undef _ogg_realloc
Monty's avatar
 
Monty committed
44
#undef _ogg_free
Monty's avatar
 
Monty committed
45

Monty's avatar
 
Monty committed
46 47 48 49
#define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__)
#define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__)
#define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__)
#define _ogg_free(x) _VDBG_free((x),__FILE__,__LINE__)
Monty's avatar
 
Monty committed
50 51 52
#endif
#endif

Monty's avatar
 
Monty committed
53
#endif
Monty's avatar
 
Monty committed
54 55 56 57