program change name and number receivers
This commit is contained in:
@@ -493,6 +493,25 @@ void pdvst::resume()
|
||||
}
|
||||
}
|
||||
|
||||
void pdvst::sendProgChange(VstInt32 prgm)
|
||||
{
|
||||
|
||||
WaitForSingleObject(pdvstTransferMutex, 10);
|
||||
{
|
||||
pdvstData->prognumber2pd.direction = PD_RECEIVE;
|
||||
pdvstData->prognumber2pd.type = FLOAT_TYPE;
|
||||
pdvstData->prognumber2pd.value.floatData = (float)prgm;
|
||||
pdvstData->prognumber2pd.updated = 1;
|
||||
|
||||
pdvstData->progname2pd.direction = PD_RECEIVE;
|
||||
pdvstData->progname2pd.type = STRING_TYPE;
|
||||
strcpy(pdvstData->progname2pd.value.stringData, program[prgm].name);
|
||||
pdvstData->progname2pd.updated = 1;
|
||||
|
||||
ReleaseMutex(pdvstTransferMutex);
|
||||
}
|
||||
}
|
||||
|
||||
void pdvst::setProgram(VstInt32 prgmNum)
|
||||
{
|
||||
debugLog("appel de setProgram %d", prgmNum);
|
||||
@@ -500,6 +519,7 @@ void pdvst::setProgram(VstInt32 prgmNum)
|
||||
if (prgmNum >= 0 && prgmNum < nPrograms)
|
||||
{
|
||||
curProgram = prgmNum;
|
||||
sendProgChange(prgmNum);
|
||||
|
||||
|
||||
// {JYG to prevent host call of setProgram to override current param settings
|
||||
@@ -625,7 +645,7 @@ VstInt32 pdvst::getChunk (void** data, bool isPreset)
|
||||
}
|
||||
|
||||
VstInt32 pdvst::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
{
|
||||
//MessageBoxA(NULL, "setchunk call", "debug", MB_OK);
|
||||
if(byteSize)
|
||||
{
|
||||
@@ -1132,9 +1152,9 @@ void pdvst::updatePdvstParameters()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// to data chunk
|
||||
|
||||
|
||||
if (pdvstData->datachunk.direction == PD_SEND && \
|
||||
pdvstData->datachunk.updated)
|
||||
{
|
||||
|
||||
@@ -99,8 +99,9 @@ public:
|
||||
// virtual VstInt32 canMono ();
|
||||
virtual void suspend();
|
||||
virtual void resume();
|
||||
void sendGuiAction(int action);
|
||||
void sendPlugName(char * name ); // JYG : to send plug name to puredatapatch
|
||||
void sendGuiAction(int action);
|
||||
void sendPlugName(char * name ); // JYG : to send plug name to puredatapatch
|
||||
void sendProgChange(VstInt32 prgm); // send vst prog name and number to patch
|
||||
|
||||
LPTSTR displayString;//= new TCHAR[MAXSTRINGSIZE];
|
||||
|
||||
|
||||
@@ -121,7 +121,9 @@ typedef struct _pdvstTransferData
|
||||
pdvstMidiMessage midiQueue[MAXMIDIQUEUESIZE];
|
||||
pdvstParameter guiState;
|
||||
pdvstParameter plugName; // transmitted by host
|
||||
pdvstParameter datachunk; // get/set chunk from .fxp file
|
||||
pdvstParameter datachunk; // get/set chunk from .fxp .fxb files
|
||||
pdvstParameter progname2pd; // send program name to Pd
|
||||
pdvstParameter prognumber2pd; // send program name to Pd
|
||||
pdvstParameter guiName; // transmitted by pd : name of gui window to be embedded
|
||||
// #ifdef VSTMIDIOUTENABLE
|
||||
int midiOutQueueSize;
|
||||
|
||||
Reference in New Issue
Block a user