Fix access violation for win32 vorbisenc
[platform/upstream/libvorbis.git] / lib / registry.c
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
5  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
7  *                                                                  *
8  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
9  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
10
11  ********************************************************************
12
13  function: registry for time, floor, res backends and channel mappings
14  last mod: $Id: registry.c,v 1.10 2001/09/07 08:42:30 cwolf Exp $
15
16  ********************************************************************/
17
18 #include "vorbis/codec.h"
19 #include "codec_internal.h"
20 #include "registry.h"
21 #include "misc.h"
22
23
24 /* seems like major overkill now; the backend numbers will grow into
25    the infrastructure soon enough */
26
27 extern vorbis_func_time      time0_exportbundle;
28 extern vorbis_func_floor     floor0_exportbundle;
29 extern vorbis_func_floor     floor1_exportbundle;
30 extern vorbis_func_residue   residue0_exportbundle;
31 extern vorbis_func_residue   residue1_exportbundle;
32 extern vorbis_func_residue   residue2_exportbundle;
33 extern vorbis_func_mapping   mapping0_exportbundle;
34
35 vorbis_func_time      *_time_P[]={
36   &time0_exportbundle,
37 };
38
39 vorbis_func_floor     *_floor_P[]={
40   &floor0_exportbundle,
41   &floor1_exportbundle,
42 };
43
44 vorbis_func_residue   *_residue_P[]={
45   &residue0_exportbundle,
46   &residue1_exportbundle,
47   &residue2_exportbundle,
48 };
49
50 vorbis_func_mapping   *_mapping_P[]={
51   &mapping0_exportbundle,
52 };
53
54   /*
55    * For win32 only, the following code needs to be appended to this file 
56    * because the "sizeof" operator can only evaluate the sizes
57    * of statically initialized arrays in the same compilation unit.
58    */ 
59 #if defined(_MSC_VER) && defined(STANDALONE_VORBISENC_DLL)
60 # include "shmmap_c.h"
61 #endif