This commit is contained in:
Lucas Cordiviola 2024-10-03 03:27:09 -03:00
parent 4cc0976f81
commit 4851d1191e
3 changed files with 30 additions and 39 deletions

View File

@ -25,10 +25,7 @@
#X obj 673 100 r rvstprogname; #X obj 673 100 r rvstprogname;
#X obj 503 100 r rvstprognumber; #X obj 503 100 r rvstprognumber;
#X floatatom 503 124 5 0 0 0 - - - 0; #X floatatom 503 124 5 0 0 0 - - - 0;
#X text 464 273 1 send some data to the host's data chunk;
#X text 463 358 2 from the host save the file as .fxp or .fxb;
#X msg 476 299 hello world 1.2; #X msg 476 299 hello world 1.2;
#X text 462 392 3 from the host open the file you saved;
#X text 500 11 When the host chamges the program these 2 are updated. Additionally you can use this to set lots of parameters that are not exposed to host. The program used is stored and recalled in the host/DAW project., f 49; #X text 500 11 When the host chamges the program these 2 are updated. Additionally you can use this to set lots of parameters that are not exposed to host. The program used is stored and recalled in the host/DAW project., f 49;
#N canvas 182 182 450 300 additionally 0; #N canvas 182 182 450 300 additionally 0;
#X msg 121 99 12 34 56 hello; #X msg 121 99 12 34 56 hello;
@ -53,6 +50,9 @@
#X listbox 503 182 23 0 0 0 - - - 0; #X listbox 503 182 23 0 0 0 - - - 0;
#X text 466 223 Experimental. Not all hosts supports it correctly. See the .pdv file. This only works if PROGRAMSARECHUNKS = TRUE is set., f 50; #X text 466 223 Experimental. Not all hosts supports it correctly. See the .pdv file. This only works if PROGRAMSARECHUNKS = TRUE is set., f 50;
#X obj 242 213 t f f; #X obj 242 213 t f f;
#X text 464 273 1 send some Pd list to the host's data chunk;
#X text 463 358 2 from the host save your current session (or to a file as .fxp or .fxb);
#X text 462 392 3 from the host open your session (or the file you saved);
#X connect 0 0 7 0; #X connect 0 0 7 0;
#X connect 0 1 6 0; #X connect 0 1 6 0;
#X connect 1 0 2 0; #X connect 1 0 2 0;
@ -65,14 +65,14 @@
#X connect 9 0 15 0; #X connect 9 0 15 0;
#X connect 10 0 11 0; #X connect 10 0 11 0;
#X connect 11 0 12 0; #X connect 11 0 12 0;
#X connect 14 0 34 0; #X connect 14 0 31 0;
#X connect 15 0 14 0; #X connect 15 0 14 0;
#X connect 17 0 18 0; #X connect 17 0 18 0;
#X connect 19 0 21 0; #X connect 19 0 21 0;
#X connect 23 0 22 0; #X connect 23 0 22 0;
#X connect 24 0 25 0; #X connect 24 0 25 0;
#X connect 25 0 31 0; #X connect 25 0 28 0;
#X connect 28 0 20 0; #X connect 26 0 20 0;
#X connect 31 0 32 0; #X connect 28 0 29 0;
#X connect 34 0 10 0; #X connect 31 0 10 0;
#X connect 34 1 13 0; #X connect 31 1 13 0;

View File

@ -25,10 +25,7 @@
#X obj 673 100 r rvstprogname; #X obj 673 100 r rvstprogname;
#X obj 503 100 r rvstprognumber; #X obj 503 100 r rvstprognumber;
#X floatatom 503 124 5 0 0 0 - - - 0; #X floatatom 503 124 5 0 0 0 - - - 0;
#X text 464 273 1 send some data to the host's data chunk;
#X text 463 358 2 from the host save the file as .fxp or .fxb;
#X msg 476 299 hello world 1.2; #X msg 476 299 hello world 1.2;
#X text 462 392 3 from the host open the file you saved;
#X text 500 11 When the host chamges the program these 2 are updated. Additionally you can use this to set lots of parameters that are not exposed to host. The program used is stored and recalled in the host/DAW project., f 49; #X text 500 11 When the host chamges the program these 2 are updated. Additionally you can use this to set lots of parameters that are not exposed to host. The program used is stored and recalled in the host/DAW project., f 49;
#N canvas 182 182 450 300 additionally 0; #N canvas 182 182 450 300 additionally 0;
#X msg 121 99 12 34 56 hello; #X msg 121 99 12 34 56 hello;
@ -53,6 +50,9 @@
#X listbox 503 182 23 0 0 0 - - - 0; #X listbox 503 182 23 0 0 0 - - - 0;
#X text 466 223 Experimental. Not all hosts supports it correctly. See the .pdv file. This only works if PROGRAMSARECHUNKS = TRUE is set., f 50; #X text 466 223 Experimental. Not all hosts supports it correctly. See the .pdv file. This only works if PROGRAMSARECHUNKS = TRUE is set., f 50;
#X obj 242 213 t f f; #X obj 242 213 t f f;
#X text 464 273 1 send some Pd list to the host's data chunk;
#X text 463 358 2 from the host save your current session (or to a file as .fxp or .fxb);
#X text 462 392 3 from the host open your session (or the file you saved);
#X connect 0 0 7 0; #X connect 0 0 7 0;
#X connect 0 1 6 0; #X connect 0 1 6 0;
#X connect 1 0 2 0; #X connect 1 0 2 0;
@ -65,14 +65,14 @@
#X connect 9 0 15 0; #X connect 9 0 15 0;
#X connect 10 0 11 0; #X connect 10 0 11 0;
#X connect 11 0 12 0; #X connect 11 0 12 0;
#X connect 14 0 34 0; #X connect 14 0 31 0;
#X connect 15 0 14 0; #X connect 15 0 14 0;
#X connect 17 0 18 0; #X connect 17 0 18 0;
#X connect 19 0 21 0; #X connect 19 0 21 0;
#X connect 23 0 22 0; #X connect 23 0 22 0;
#X connect 24 0 25 0; #X connect 24 0 25 0;
#X connect 25 0 31 0; #X connect 25 0 28 0;
#X connect 28 0 20 0; #X connect 26 0 20 0;
#X connect 31 0 32 0; #X connect 28 0 29 0;
#X connect 34 0 10 0; #X connect 31 0 10 0;
#X connect 34 1 13 0; #X connect 31 1 13 0;

View File

@ -626,32 +626,23 @@ bool pdvst::getOutputProperties(VstInt32 index, VstPinProperties* properties)
VstInt32 pdvst::getChunk (void** data, bool isPreset) VstInt32 pdvst::getChunk (void** data, bool isPreset)
{ {
Chunk = new pdvstProgramAreChunks; Chunk = new pdvstProgramAreChunks;
//MessageBoxA(NULL, "getchunk call", "debug", MB_OK); // all host gets here
MessageBoxA(NULL, "getchunk call", "debug", MB_OK); // all host gets here
for (int i = 0; i < nParameters; i++) for (int i = 0; i < nParameters; i++)
{ {
Chunk->vstParam[i] = vstParam[i]; Chunk->vstParam[i] = vstParam[i];
} }
//MessageBoxA(NULL, "getchunk if data", "debug", MB_OK); // not all hosts gets here
if(1) WaitForSingleObject(pdvstTransferMutex, 10);
{ {
//MessageBoxA(NULL, "getchunk if data", "debug", MB_OK); // not all hosts gets here memset(&Chunk->Data, '\0', MAXSTRLEN);
WaitForSingleObject(pdvstTransferMutex, 10); strcpy (Chunk->Data, pdvstData->datachunk.value.stringData);
{ ReleaseMutex(pdvstTransferMutex);
memset(&Chunk->Data, '\0', MAXSTRLEN); }
strcpy (Chunk->Data, pdvstData->datachunk.value.stringData);
ReleaseMutex(pdvstTransferMutex);
}
debugLog("luc:debug-size-of-chunk %d", sizeof(*Chunk)); debugLog("luc:debug-size-of-chunk %d", sizeof(*Chunk));
*data = (void*)Chunk; *data = (void*)Chunk;
return sizeof(*Chunk); return sizeof(*Chunk);
}
else
return 0;
} }
VstInt32 pdvst::setChunk (void* data, VstInt32 byteSize, bool isPreset) VstInt32 pdvst::setChunk (void* data, VstInt32 byteSize, bool isPreset)