1 /*
2     pvoc.h:
3 
4     Copyright (c) 2005 Istvan Varga
5 
6     This file is part of Csound.
7 
8     The Csound Library is free software; you can redistribute it
9     and/or modify it under the terms of the GNU Lesser General Public
10     License as published by the Free Software Foundation; either
11     version 2.1 of the License, or (at your option) any later version.
12 
13     Csound is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU Lesser General Public License for more details.
17 
18     You should have received a copy of the GNU Lesser General Public
19     License along with Csound; if not, write to the Free Software
20     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21     02110-1301 USA
22 */
23 
24 #ifndef CSOUND_PVOC_H
25 #define CSOUND_PVOC_H
26 
27 // #include "csdl.h"
28 #include "csoundCore.h"
29 #include "interlocks.h"
30 
31 typedef struct PVOC_GLOBALS_ PVOC_GLOBALS;
32 
33 #include "dsputil.h"
34 #include "ugens8.h"
35 #include "pvread.h"
36 #include "pvinterp.h"
37 #include "vpvoc.h"
38 #include "pvadd.h"
39 #include "pvocext.h"
40 
41 struct PVOC_GLOBALS_ {
42     CSOUND    *csound;
43     MYFLT     *dsputil_sncTab;
44     PVBUFREAD *pvbufreadaddr;
45     TABLESEG  *tbladr;
46 };
47 
48 extern PVOC_GLOBALS *PVOC_AllocGlobals(CSOUND *csound);
49 
PVOC_GetGlobals(CSOUND * csound)50 static inline PVOC_GLOBALS *PVOC_GetGlobals(CSOUND *csound)
51 {
52     PVOC_GLOBALS  *p;
53 
54     p = (PVOC_GLOBALS*) csound->QueryGlobalVariable(csound, "pvocGlobals");
55     if (p == NULL)
56       return PVOC_AllocGlobals(csound);
57     return p;
58 }
59 
60 #endif  /* CSOUND_PVOC_H */
61