• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*----------------------------------------------------------------------------
2  *
3  * File:
4  * eas_data.h
5  *
6  * Contents and purpose:
7  * This header defines all types, to support dynamic allocation of the
8  * memory resources needed for persistent EAS data.
9  *
10  * Copyright 2004 Sonic Network Inc.
11 
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  *      http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  *
24  *----------------------------------------------------------------------------
25  * Revision Control:
26  *   $Revision: 842 $
27  *   $Date: 2007-08-23 14:32:31 -0700 (Thu, 23 Aug 2007) $
28  *----------------------------------------------------------------------------
29 */
30 
31 #ifndef _EAS_DATA_H
32 #define _EAS_DATA_H
33 
34 #include <stdint.h>
35 
36 #include "eas_types.h"
37 #include "eas_synthcfg.h"
38 #include "eas.h"
39 #include "eas_audioconst.h"
40 #include "eas_sndlib.h"
41 #include "eas_pcm.h"
42 #include "eas_pcmdata.h"
43 #include "eas_synth.h"
44 #include "eas_miditypes.h"
45 #include "eas_effects.h"
46 
47 #ifdef AUX_MIXER
48 #include "eas_auxmixdata.h"
49 #endif
50 
51 #ifdef JET_INTERFACE
52 #include "jet.h"
53 #endif
54 
55 #ifdef _METRICS_ENABLED
56 #include "eas_perf.h"
57 #endif
58 
59 #ifndef MAX_NUMBER_STREAMS
60 #define MAX_NUMBER_STREAMS          4
61 #endif
62 
63 /* flags for S_EAS_STREAM */
64 #define STREAM_FLAGS_PARSED         1
65 #define STREAM_FLAGS_PAUSE          2
66 #define STREAM_FLAGS_LOCATE         4
67 #define STREAM_FLAGS_RESUME         8
68 
69 /* structure for parsing a stream */
70 typedef struct s_eas_stream_tag
71 {
72     void                            *pParserModule;
73     EAS_U32                         time;
74     EAS_U32                         frameLength;
75     EAS_I32                         repeatCount;
76     EAS_VOID_PTR                    handle;
77     EAS_U8                          volume;
78     EAS_BOOL8                       streamFlags;
79 } S_EAS_STREAM;
80 
81 /* default master volume is -10dB */
82 #define DEFAULT_VOLUME              90
83 #define DEFAULT_STREAM_VOLUME       100
84 #define DEFAULT_STREAM_GAIN         14622
85 
86 /* 10 dB of boost available for individual parsers */
87 #define STREAM_VOLUME_HEADROOM      10
88 
89 /* amalgamated persistent data type */
90 typedef struct s_eas_data_tag
91 {
92 #ifdef _CHECKED_BUILD
93     EAS_U32                         handleCheck;
94 #endif
95     EAS_HW_DATA_HANDLE              hwInstData;
96 
97     S_EFFECTS_MODULE                effectsModules[NUM_EFFECTS_MODULES];
98 
99 #ifdef _METRICS_ENABLED
100     S_METRICS_INTERFACE             *pMetricsModule;
101     EAS_VOID_PTR                    pMetricsData;
102 #endif
103 
104     EAS_I32                         *pMixBuffer;
105     EAS_PCM                         *pOutputAudioBuffer;
106 
107 #ifdef AUX_MIXER
108     S_EAS_AUX_MIXER                 auxMixer;
109 #endif
110 
111 #ifdef _MAXIMIZER_ENABLED
112     EAS_VOID_PTR                    pMaximizerData;
113 #endif
114 
115     S_EAS_STREAM                    streams[MAX_NUMBER_STREAMS];
116 
117     S_VOICE_MGR                     *pVoiceMgr;
118 
119 #ifdef JET_INTERFACE
120     JET_DATA_HANDLE                 jetHandle;
121 #endif
122 
123     EAS_U32                         renderTime;
124     EAS_I16                         masterGain;
125     EAS_U8                          masterVolume;
126     EAS_BOOL8                       staticMemoryModel;
127 #ifdef FILE_HEADER_SEARCH
128     EAS_BOOL8                       searchHeaderFlag;
129 #endif
130 } S_EAS_DATA;
131 
132 #endif
133 
134