Skip to content

Commit

Permalink
Merge 4f22cf3 into ea055b2
Browse files Browse the repository at this point in the history
  • Loading branch information
rorywalsh committed Dec 13, 2019
2 parents ea055b2 + 4f22cf3 commit de11db3
Show file tree
Hide file tree
Showing 7 changed files with 1,295 additions and 325 deletions.
22 changes: 20 additions & 2 deletions Engine/entry1.c
Expand Up @@ -894,10 +894,10 @@ OENTRY opcodlst_1[] = {
(SUBR) invalset_string_S, (SUBR)kinvalS, NULL },
{ "outvalue", S(OUTVAL), _CW, 3, "", "ik", (SUBR) outvalset, (SUBR)koutval, NULL},
{ "outvalue.i", S(OUTVAL), _CW, 1, "", "ii", (SUBR) outvalsetgo, NULL, NULL},
{ "outvalue.Si", S(OUTVAL), _CW, 1, "", "Si",
(SUBR) outvalsetSgo, NULL, NULL},
{ "outvalue.k", S(OUTVAL), _CW, 3, "", "Sk",
(SUBR) outvalset_S, (SUBR)koutval, NULL},
{ "outvalue.Si", S(OUTVAL), _CW, 1, "", "Si",
(SUBR) outvalsetSgo, NULL, NULL},
{ "outvalue.S", S(OUTVAL), _CW, 3, "", "iS",
(SUBR) outvalset_string, (SUBR)koutvalS, NULL},
{ "outvalue.SS", S(OUTVAL), _CW, 3, "", "SS",
Expand Down Expand Up @@ -1067,13 +1067,31 @@ OENTRY opcodlst_1[] = {
(SUBR) chnget_opcode_init_i, NULL, NULL },
{ "chnget.k", S(CHNGET),_CR, 3, "k", "S",
(SUBR) chnget_opcode_init_k, (SUBR) notinit_opcode_stub, NULL },
{ "chngeti.i", S(CHNGET),_CR, 1, "i[]", "S[]",
(SUBR) chnget_array_opcode_init_i, NULL, NULL },
{ "chngeta.a", S(CHNGET),_CR, 3, "a[]", "S[]",
(SUBR) chnget_array_opcode_init, (SUBR) notinit_opcode_stub, NULL },
{ "chngets.s", S(CHNGET),_CR, 3, "S[]", "S[]",
(SUBR) chnget_array_opcode_init, (SUBR) notinit_opcode_stub, NULL },
{ "chngetk.k", S(CHNGET),_CR, 3, "k[]", "S[]",
(SUBR) chnget_array_opcode_init, (SUBR) notinit_opcode_stub, NULL },
{ "chnget.a", S(CHNGET),_CR, 3, "a", "S",
(SUBR) chnget_opcode_init_a, (SUBR) notinit_opcode_stub },
{ "chnget.S", S(CHNGET),_CR, 3, "S", "S",
(SUBR) chnget_opcode_init_S, (SUBR) chnget_opcode_perf_S, NULL},
{ "chngetks", S(CHNGET),_CR, 2, "S", "S",
NULL, (SUBR) chnget_opcode_perf_S, NULL},
//{ "chnset", 0xFFFB, _CW },

{ "chnseti.i", S(CHNGET),_CW, 1, "", "i[]S[]",
(SUBR) chnset_array_opcode_init_i, NULL, NULL },
{ "chnsetk.k", S(CHNGET),_CW, 3, "", "k[]S[]",
(SUBR) chnset_array_opcode_init, (SUBR) notinit_opcode_stub, NULL },
{ "chnseta.a", S(CHNGET),_CW, 3, "", "a[]S[]",
(SUBR) chnset_array_opcode_init, (SUBR) notinit_opcode_stub, NULL },
{ "chnsets.s", S(CHNGET),_CW, 3, "", "S[]S[]",
(SUBR) chnset_array_opcode_init, (SUBR) notinit_opcode_stub, NULL },

{ "chnset.i", S(CHNGET),_CW, 1, "", "iS",
(SUBR) chnset_opcode_init_i, NULL, NULL },
// { "chnset.r", S(CHNGET),0, 1, "", "iS",
Expand Down
26 changes: 26 additions & 0 deletions H/bus.h
Expand Up @@ -29,6 +29,7 @@
#define CSOUND_BUS_H

#include "pstream.h"
#include "arrays.h"
#include "csound_standard_types.h"

#define MAX_CHAN_NAME 1024
Expand Down Expand Up @@ -76,6 +77,19 @@ typedef struct {
char chname[MAX_CHAN_NAME+1];
} CHNGET;

typedef struct {
OPDS h;
ARRAYDAT *arrayDat;
STRINGDAT *iname;
MYFLT *fp;
spin_lock_t *lock;
int32_t pos;
int32_t arraySize;
MYFLT** channelPtrs;
STRINGDAT *channels;
char chname[MAX_CHAN_NAME+1];
} CHNGETARRAY;

typedef struct {
OPDS h;
STRINGDAT *iname[MAX_CHAN_NAME+1];
Expand Down Expand Up @@ -155,6 +169,18 @@ int32_t pvsout_perf(CSOUND *, FCHAN *);

int32_t sensekey_perf(CSOUND *, KSENSE *);

//Rory 2020
int32_t chnget_array_opcode_init_i(CSOUND *, CHNGETARRAY *);
int32_t chnget_array_opcode_init(CSOUND *, CHNGETARRAY *);
int32_t chnget_array_opcode_perf_k(CSOUND *, CHNGETARRAY *);
int32_t chnget_array_opcode_perf_a(CSOUND *, CHNGETARRAY *);
int32_t chnget_array_opcode_perf_S(CSOUND* csound, CHNGETARRAY* p);
int32_t chnset_array_opcode_init_i(CSOUND *, CHNGETARRAY *);
int32_t chnset_array_opcode_init(CSOUND *, CHNGETARRAY *);
int32_t chnset_array_opcode_perf_k(CSOUND *csound, CHNGETARRAY *p);
int32_t chnset_array_opcode_perf_a(CSOUND *csound, CHNGETARRAY *p);
int32_t chnset_array_opcode_perf_S(CSOUND *csound, CHNGETARRAY *p);

int32_t notinit_opcode_stub(CSOUND *, void *);
int32_t chnget_opcode_init_i(CSOUND *, CHNGET *);
int32_t chnget_opcode_init_k(CSOUND *, CHNGET *);
Expand Down

0 comments on commit de11db3

Please sign in to comment.