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 "eas_types.h" 35#include "eas_synthcfg.h" 36#include "eas.h" 37#include "eas_audioconst.h" 38#include "eas_sndlib.h" 39#include "eas_pcm.h" 40#include "eas_pcmdata.h" 41#include "eas_synth.h" 42#include "eas_miditypes.h" 43#include "eas_effects.h" 44 45#ifdef AUX_MIXER 46#include "eas_auxmixdata.h" 47#endif 48 49#ifdef JET_INTERFACE 50#include "jet.h" 51#endif 52 53#ifdef _METRICS_ENABLED 54#include "eas_perf.h" 55#endif 56 57#ifndef MAX_NUMBER_STREAMS 58#define MAX_NUMBER_STREAMS 4 59#endif 60 61/* flags for S_EAS_STREAM */ 62#define STREAM_FLAGS_PARSED 1 63#define STREAM_FLAGS_PAUSE 2 64#define STREAM_FLAGS_LOCATE 4 65#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