• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*----------------------------------------------------------------------------
2  *
3  * File:
4  * eas_wt_IPC_frame.h
5  *
6  * Contents and purpose:
7  * This module contains data definitions for the interprocessor
8  * communications framework for a split-architecture synthesizer.
9  *
10  * This sample version writes IPC data to a file that can be used
11  * as a test vector for the DSP simulator. For a real-time system
12  * the file I/O is replaced with an IPC protocol in the hardware.
13  *
14  * Synchronization with the DSP is accomplished at the API level,
15  * i.e. the host code should call EAS_Render when it is ready to
16  * buffer another block of data for transmission to the DSP.
17  *
18  * Copyright Sonic Network Inc. 2005
19 
20  * Licensed under the Apache License, Version 2.0 (the "License");
21  * you may not use this file except in compliance with the License.
22  * You may obtain a copy of the License at
23  *
24  *      http://www.apache.org/licenses/LICENSE-2.0
25  *
26  * Unless required by applicable law or agreed to in writing, software
27  * distributed under the License is distributed on an "AS IS" BASIS,
28  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29  * See the License for the specific language governing permissions and
30  * limitations under the License.
31  *
32  *----------------------------------------------------------------------------
33  * Revision Control:
34  *   $Revision: 818 $
35  *   $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 */
49 typedef 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 */
67 typedef 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