• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*----------------------------------------------------------------------------
2  *
3  * File:
4  * eas_config.h
5  *
6  * Contents and purpose:
7  * This header declares the Configuration Module interface (CM). The CM
8  * is a module compiled external to the library that sets the configuration
9  * for this build. It allows the library to find optional components and
10  * links to static memory allocations (when used in a static configuration).
11  *
12  * NOTE: This module is not intended to be modified by the customer. It
13  * needs to be included in the build process with the correct configuration
14  * defines (see the library documentation for information on how to configure
15  * the library).
16  *
17  * DO NOT MODIFY THIS FILE!
18  *
19  * Copyright 2005 Sonic Network Inc.
20 
21  * Licensed under the Apache License, Version 2.0 (the "License");
22  * you may not use this file except in compliance with the License.
23  * You may obtain a copy of the License at
24  *
25  *      http://www.apache.org/licenses/LICENSE-2.0
26  *
27  * Unless required by applicable law or agreed to in writing, software
28  * distributed under the License is distributed on an "AS IS" BASIS,
29  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30  * See the License for the specific language governing permissions and
31  * limitations under the License.
32  *
33  *----------------------------------------------------------------------------
34  * Revision Control:
35  *   $Revision: 82 $
36  *   $Date: 2006-07-10 11:45:19 -0700 (Mon, 10 Jul 2006) $
37  *----------------------------------------------------------------------------
38 */
39 
40 // sentinel
41 #ifndef _EAS_CONFIG_H
42 #define _EAS_CONFIG_H
43 
44 #include "eas_types.h"
45 
46 /* list of enumerators for optional modules */
47 typedef enum {
48     EAS_CM_FILE_PARSERS = 1
49 } E_CM_ENUM_MODULES;
50 
51 /* list of enumerators for module and memory pointers */
52 typedef enum {
53     EAS_CM_EAS_DATA = 1,
54     EAS_CM_MIX_BUFFER,
55     EAS_CM_SYNTH_DATA,
56     EAS_CM_MIDI_DATA,
57     EAS_CM_SMF_DATA,
58     EAS_CM_XMF_DATA,
59     EAS_CM_SMAF_DATA,
60     EAS_CM_PCM_DATA,
61     EAS_CM_MIDI_STREAM_DATA,
62     EAS_CM_METRICS_DATA,
63     EAS_CM_OTA_DATA,
64     EAS_CM_IMELODY_DATA,
65     EAS_CM_RTTTL_DATA,
66     EAS_CM_WAVE_DATA,
67     EAS_CM_CMF_DATA
68 } E_CM_DATA_MODULES;
69 
70 typedef struct
71 {
72     int maxSMFStreams;
73     void *pSMFData;
74     void *pSMFStream;
75 } S_EAS_SMF_PTRS;
76 
77 typedef struct
78 {
79     int maxSMAFStreams;
80     void *pSMAFData;
81     void *pSMAFStream;
82 } S_EAS_SMAF_PTRS;
83 
84 /*----------------------------------------------------------------------------
85  * EAS_CMStaticMemoryModel()
86  *----------------------------------------------------------------------------
87  * Purpose:
88  * This function returns true if EAS has been configured for
89  * a static memory model. There are some limitations in the
90  * static memory model, see the documentation for more
91  * information.
92  *
93  * Outputs:
94  *  returns EAS_TRUE if a module is found
95  *----------------------------------------------------------------------------
96 */
97 EAS_BOOL EAS_CMStaticMemoryModel (void);
98 
99 /*----------------------------------------------------------------------------
100  * EAS_CMEnumModules()
101  *----------------------------------------------------------------------------
102  * Purpose:
103  * This function is used to find pointers to optional modules.
104  *
105  * Inputs:
106  *  module          - module number
107  *
108  * Outputs:
109  *  returns a pointer to the module function table or NULL if no module
110  *----------------------------------------------------------------------------
111 */
112 EAS_VOID_PTR EAS_CMEnumModules (EAS_INT module);
113 
114 /*----------------------------------------------------------------------------
115  * EAS_CMEnumData()
116  *----------------------------------------------------------------------------
117  * Purpose:
118  * This function is used to find pointers to static memory allocations.
119  *
120  * Inputs:
121  *  dataModule          - enumerated module number
122  *
123  * Outputs:
124  * Returns handle to data or NULL if not found
125  *----------------------------------------------------------------------------
126 */
127 EAS_VOID_PTR EAS_CMEnumData (EAS_INT dataModule);
128 
129 /*----------------------------------------------------------------------------
130  * EAS_CMEnumFXModules()
131  *----------------------------------------------------------------------------
132  * Purpose:
133  * This function is used to find pointers to optional effects modules.
134  *
135  * Inputs:
136  *  module          - enumerated module number
137  *  pModule         - pointer to module interface
138  *
139  * Outputs:
140  *  Returns pointer to function table or NULL if not found
141  *----------------------------------------------------------------------------
142 */
143 EAS_VOID_PTR EAS_CMEnumFXModules (EAS_INT module);
144 
145 /*----------------------------------------------------------------------------
146  * EAS_CMEnumFXData()
147  *----------------------------------------------------------------------------
148  * Purpose:
149  * This function is used to find pointers to static memory allocations.
150  *
151  * Inputs:
152  *  dataModule          - enumerated module number
153  *  pData               - pointer to handle variable
154  *
155  * Outputs:
156  * Returns handle to data or NULL if not found
157  *----------------------------------------------------------------------------
158 */
159 EAS_VOID_PTR EAS_CMEnumFXData (EAS_INT dataModule);
160 
161 /*----------------------------------------------------------------------------
162  * EAS_CMEnumOptModules()
163  *----------------------------------------------------------------------------
164  * Purpose:
165  * This function is used to find pointers to optional modules.
166  *
167  * Inputs:
168  *  module          - enumerated module number
169  *
170  * Outputs:
171  *  returns pointer to function table or NULL if no module
172  *----------------------------------------------------------------------------
173 */
174 EAS_VOID_PTR EAS_CMEnumOptModules (EAS_INT module);
175 
176 /*----------------------------------------------------------------------------
177  * EAS_CMEnumOptData()
178  *----------------------------------------------------------------------------
179  * Purpose:
180  * This function is used to find pointers to static memory allocations.
181  *
182  * Inputs:
183  *  dataModule          - enumerated module number
184  *
185  * Outputs:
186  * Returns handle to data or NULL if not found
187  *----------------------------------------------------------------------------
188 */
189 EAS_VOID_PTR EAS_CMEnumOptData (EAS_INT dataModule);
190 
191 #endif /* end _EAS_CONFIG_H */
192