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