Exemplo n.º 1
0
void localServerReplyFunc(struct ReplyAddress *inReplyAddr, char* inBuf, int inSize)
{
    bool isBundle = IsBundle(inBuf);

    pthread_mutex_lock (&gLangMutex);
	if (compiledOK) {
		PyrObject *replyObj = ConvertReplyAddress(inReplyAddr);
		if (isBundle) {
			PerformOSCBundle(inSize, inBuf, replyObj);
		} else {
			PerformOSCMessage(inSize, inBuf, replyObj);
		}
	}
    pthread_mutex_unlock (&gLangMutex);

}
Exemplo n.º 2
0
void localServerReplyFunc(struct ReplyAddress *inReplyAddr, char* inBuf, int inSize)
{
    bool isBundle = IsBundle(inBuf);

    gLangMutex.lock();
	if (compiledOK) {
		PyrObject *replyObj = ConvertReplyAddress(inReplyAddr);
		if (isBundle) {
			PerformOSCBundle(inSize, inBuf, replyObj, gUDPport->RealPortNum());
		} else {
			PerformOSCMessage(inSize, inBuf, replyObj, gUDPport->RealPortNum());
		}
	}
    gLangMutex.unlock();

}
Exemplo n.º 3
0
void ProcessOSCPacket(OSC_Packet* inPacket)
{
    //post("recv '%s' %d\n", inPacket->mData, inPacket->mSize);
	inPacket->mIsBundle = IsBundle(inPacket->mData);

    pthread_mutex_lock (&gLangMutex);
	if (compiledOK) {
		PyrObject *replyObj = ConvertReplyAddress(&inPacket->mReplyAddr);
		if (compiledOK) {
			if (inPacket->mIsBundle) {
				PerformOSCBundle(inPacket->mSize, inPacket->mData, replyObj);
			} else {
				PerformOSCMessage(inPacket->mSize, inPacket->mData, replyObj);
			}
		}
	}
    pthread_mutex_unlock (&gLangMutex);

    FreeOSCPacket(inPacket);
}
Exemplo n.º 4
0
// takes ownership of inPacket
void ProcessOSCPacket(OSC_Packet* inPacket, int inPortNum)
{
	//post("recv '%s' %d\n", inPacket->mData, inPacket->mSize);
	inPacket->mIsBundle = IsBundle(inPacket->mData);

	gLangMutex.lock();
	if (compiledOK) {
		PyrObject *replyObj = ConvertReplyAddress(&inPacket->mReplyAddr);
		if (compiledOK) {
			if (inPacket->mIsBundle) {
				PerformOSCBundle(inPacket->mSize, inPacket->mData, replyObj, inPortNum);
			} else {
				PerformOSCMessage(inPacket->mSize, inPacket->mData, replyObj, inPortNum);
			}
		}
	}
	gLangMutex.unlock();

	FreeOSCPacket(inPacket);
}