Exemplo n.º 1
0
void ServerOSCThread::send(IpEndpointName ipEndpointName, osc::OutboundPacketStream p) {

    this->receiveSocket->SendTo(
                ipEndpointName,
                p.Data(),p.Size()
                );
}
Exemplo n.º 2
0
void ClientOSCThread::send(QString address, int port, osc::OutboundPacketStream p) {
    this->receiveSocket->SendTo(
            IpEndpointName(
                qPrintable(address),
                port
                ),
            p.Data(),p.Size()
        );
}
Exemplo n.º 3
0
void OscController::send(OscHostRef hostRef, const osc::OutboundPacketStream &stream)
{
    if (hostRef == 0)
        return;

	OscHostAddress *hostAddress;
    hostAddress = static_cast<OscHostAddress*>(hostRef);

    lo_send_message(hostAddress->getHostAddress(), stream.Data(), stream.Size());
}
Exemplo n.º 4
0
Arquivo: main.cpp Projeto: Dewb/moody
int main()
{
    int width = 51 * 6; // lengths of strips
    int height = 4;
    uint8_t* buffer = (uint8_t*)malloc(width * height * 3);
    
    createNetwork(buffer, width, height);
    initEffects(width, height);
    
    while (1)
    {
        clearEffect(buffer);
        
        //runTestEffect(buffer);
        //runFlameEffect(buffer);
        runWaterfallEffect(buffer);

        applyFixups(buffer, width, height);
        
#if OSC_OUTPUT_ENABLED
        for (int ii = 0; ii < width; ii++)
        {
            for (int jj = 0; jj < height; jj++)
            {
                oscStream << osc::BeginBundleImmediate;
                oscStream << osc::BeginMessage("led");
                oscStream << ii * 3 << (height - jj - 1) * 10 << (ii + 1) * 3 << (height - jj) * 10;
                int s = (jj * width + ii) * 3;
                for (int c = 0; c < 3; c++)
                {
                    oscStream << buffer[s + c];
                }
                oscStream << osc::EndMessage;
                oscStream << osc::EndBundle;
                oscSocket.Send(oscStream.Data(), oscStream.Size());
                oscStream.Clear();
            }
        }
        
#endif
                
        for (int ii = 0; ii < supplies.size(); ii++)
        {
            supplies[ii]->go();
        }
        usleep(70);
    }
    
    free(buffer);
    return 0;
}
Exemplo n.º 5
0
void Compositor::send(osc::OutboundPacketStream oscMsg){
  synthServSocket->Send(oscMsg.Data(),oscMsg.Size());  
}
Exemplo n.º 6
0
void MiditoOscAudioProcessor::sendOSCData (const osc::OutboundPacketStream p)
{
    transmitSocket.Send( p.Data(), p.Size() );
}
Exemplo n.º 7
0
void Peer::sendMessage(const osc::OutboundPacketStream& msg)
{
  m_socket->Send(msg.Data(), msg.Size());
}
Exemplo n.º 8
0
	/* Public Member Functions */
	void OSCSender::send(osc::OutboundPacketStream p) const
	{
		assert(transmitSocket);
		transmitSocket->Send(p.Data(), p.Size() );	
	}