Skip to content

Commit

Permalink
message callback
Browse files Browse the repository at this point in the history
  • Loading branch information
docb committed Jan 8, 2023
1 parent 80fae09 commit e7dadc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"slug": "dbRackCsound",
"name": "dbRackCsound",
"version": "2.0.3",
"version": "2.0.4",
"license": "GPL-3.0-or-later",
"brand": "docB",
"author": "docB",
Expand Down
10 changes: 7 additions & 3 deletions src/DBCSound.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
extern "C" {
extern int init_static_modules(CSOUND *);
};

void MessageCallback(CSOUND* cs, int attr, const char *format, va_list valist)
{
char buf[4096];
vsprintf(buf,format, valist);
INFO("%s", buf);
}
struct SMT : csound::OpcodeBase<SMT> {
MYFLT *out;
MYFLT *kv;
Expand Down Expand Up @@ -53,6 +58,7 @@ struct DBCsound {
delete csound;
}
void initCsound(int ksmps,int nchnls,float sr) {
csound->SetMessageCallback(MessageCallback);
INFO("Init Csound 1");
csound->SetOption((char *)"-n");
csound->SetOption((char *)"-dm0");
Expand Down Expand Up @@ -129,8 +135,6 @@ struct DBCsound {
return csound->GetNchnls();
}



};


Expand Down

0 comments on commit e7dadc5

Please sign in to comment.