File: OpcLoad.h

package info (click to toggle)
csound 1%3A4.23f12-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,132 kB
  • ctags: 17,345
  • sloc: ansic: 101,063; cpp: 7,730; perl: 335; makefile: 318; tcl: 82
file content (70 lines) | stat: -rw-r--r-- 2,076 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef OPCLOAD_H_INCLUDED
#define OPCLOAD_H_INCLUDED
/*
*       Plug-in opcodes for Csound.
*       By Michael Gogins.
*       23 February 1997 
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
*       Platform-dependent definitions and declarations.
*/
#ifdef WIN32
#define PUBLIC __declspec(dllexport) 
#define LIBRARY_CALL WINAPI
#else
#define PUBLIC
#define LIBRARY_CALL
#endif
/*
*       Return value preprocessor definitions.
*/
#define CS_SUCCESS                      0
#define CS_OPCODE_NOT_FOUND             1
#define CS_OPCODE_REGISTER_FAILED       2
#define CS_OUT_OF_MEMORY                3
/*
*       Signature for opcode registration function.
*       Both Csound and opcode must be compiled
*       with 8 byte structure member alignment.
*/
typedef PUBLIC long (csOpcodeRegisterType)
       (        /*   Used to iterate through all opcodes in a library. */
        long opcodeSubscript, /*   Csound audio sampling rate in Hz. */
        float *samplingRateIn,/*   Csound control sampling rate in Hz. */
        float *kontrolRateIn, /*   Control samples per audio sample. */
        int *audioSamplesPerKontrolSampleIn, /*   Channels in the soundfile. */
        int *channelCountIn,    /*   Address of the function table array in Csound. */
        FUNC *functionTablesIn[],/*   Address of the opcode's dispatch table entry,
                                      to be filled in by the opcode library. */
        OENTRY *opcodeEntryOut);
/*
 *      Platform-independent function 
 *      to load a shared library.
 */
long csLibraryLoad(const char *libraryPath);
/*
 *      Platform-independent function 
 *      to get a function address
 *      in a shared library.
 */
long csLibraryProcedureAddressGet(long library, const char *procedureName);
/*
*       Load an opcode from a shared library
*       and register its class in the opcode dispatch table.
*/
long csOpcodeLoad(const char *libraryPath);
/*
*       Load all opcodes in OPCODEDIR or ./OPCODES/*.OPC
*/
long csOpcodeLoadAll();
#ifdef __cplusplus
};
#endif
/*
*       OPCLOAD_H_INCLUDED
*/
#endif