eas_wt_IPC_frame.h revision 7df30109963092559d3760c0661a020f9daf1030
1762bb9d0ad20320b9f97a841dce57ba5e8e48b07Richard Smith/*---------------------------------------------------------------------------- 28e8fb3be5bd78f0564444eca02b404566a5f3b5dAndy Gibbs * 33e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * File: 43e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * eas_wt_IPC_frame.h 53e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * 63e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * Contents and purpose: 73e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * This module contains data definitions for the interprocessor 83e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * communications framework for a split-architecture synthesizer. 93e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * 103e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * This sample version writes IPC data to a file that can be used 113e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * as a test vector for the DSP simulator. For a real-time system 123e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * the file I/O is replaced with an IPC protocol in the hardware. 133e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * 143e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * Synchronization with the DSP is accomplished at the API level, 153e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * i.e. the host code should call EAS_Render when it is ready to 163e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * buffer another block of data for transmission to the DSP. 173e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * 183e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * Copyright Sonic Network Inc. 2005 193e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith 203e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * Licensed under the Apache License, Version 2.0 (the "License"); 213e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * you may not use this file except in compliance with the License. 223e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * You may obtain a copy of the License at 233e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * 243e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * http://www.apache.org/licenses/LICENSE-2.0 253e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * 263e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * Unless required by applicable law or agreed to in writing, software 273e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * distributed under the License is distributed on an "AS IS" BASIS, 283e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 293e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * See the License for the specific language governing permissions and 303e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * limitations under the License. 313e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * 323e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith *---------------------------------------------------------------------------- 333e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * Revision Control: 343e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * $Revision: 818 $ 353e4c6c4c79a03f5cb0c4671d7c282d623c6dc35eRichard Smith * $Date: 2007-08-02 15:19:41 -0700 (Thu, 02 Aug 2007) $ 36 *---------------------------------------------------------------------------- 37*/ 38 39#ifndef _EAS_WT_IPC_FRAME_H 40#define _EAS_WT_IPC_FRAME_H 41 42/*---------------------------------------------------------------------------- 43 * S_WT_FRAME 44 * 45 * This structure contains the common parameters that are updated 46 *for each frame of audio. 47 *---------------------------------------------------------------------------- 48*/ 49typedef struct s_wt_frame_tag 50{ 51 EAS_I32 gainTarget; 52 EAS_I32 phaseIncrement; 53 54#if defined(_FILTER_ENABLED) 55 EAS_I32 k; 56 EAS_I32 b1; 57 EAS_I32 b2; 58#endif 59} S_WT_FRAME; 60 61/*---------------------------------------------------------------------------- 62 * S_WT_CONFIG 63 * 64 * This structure contains state data for the wavetable engine 65 *---------------------------------------------------------------------------- 66*/ 67typedef struct s_wt_config_tag 68{ 69 EAS_U32 loopEnd; /* points to last PCM sample (not 1 beyond last) */ 70 EAS_U32 loopStart; /* points to first sample at start of loop */ 71 EAS_U32 phaseAccum; /* current sample, integer portion of phase */ 72 73#if (NUM_OUTPUT_CHANNELS == 2) 74 EAS_I16 gainLeft; /* left channel gain */ 75 EAS_I16 gainRight; /* right channel gain */ 76#endif 77 78 EAS_I16 gain; /* current voice gain */ 79} S_WT_CONFIG; 80 81#endif 82 83