mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-02 19:01:47 +02:00
chunks have shorts
git-svn-id: svn://elaine/murooma/trunk@63 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
565f432df4
commit
614b7c941e
2 changed files with 7 additions and 6 deletions
|
@ -314,7 +314,8 @@ int main (int argc, char *argv[])
|
|||
bufferMs = atoi(argv[1]);
|
||||
zmq::context_t context (1);
|
||||
zmq::socket_t subscriber (context, ZMQ_SUB);
|
||||
subscriber.connect("tcp://192.168.0.2:123458");
|
||||
subscriber.connect("tcp://127.0.0.1:123458");
|
||||
// subscriber.connect("tcp://192.168.0.2:123458");
|
||||
|
||||
const char* filter = "";
|
||||
subscriber.setsockopt(ZMQ_SUBSCRIBE, filter, strlen(filter));
|
||||
|
@ -325,7 +326,7 @@ int main (int argc, char *argv[])
|
|||
if (ret != 0)
|
||||
std::cerr << "Unsuccessful in setting thread realtime prio" << std::endl;
|
||||
*/
|
||||
initAudio();
|
||||
// initAudio();
|
||||
Chunk* chunk = new Chunk();
|
||||
while (1)
|
||||
{
|
||||
|
|
|
@ -56,10 +56,10 @@ int main () {
|
|||
// else if (diff_ms(now, ts) > 1000)
|
||||
// ts = now;
|
||||
|
||||
chunk->tv_sec = 1234;//(int16_t)now.tv_sec;
|
||||
chunk->tv_usec = 0;//now.tv_usec;
|
||||
zmq::message_t message(8*2*WIRE_CHUNK_SIZE);//sizeof(Chunk));
|
||||
memcpy(message.data(), chunk, 8+2*WIRE_CHUNK_SIZE);//sizeof(Chunk));
|
||||
chunk->tv_sec = now.tv_sec;
|
||||
chunk->tv_usec = now.tv_usec;
|
||||
zmq::message_t message(sizeof(Chunk));
|
||||
memcpy(message.data(), chunk, sizeof(Chunk));
|
||||
// snprintf ((char *) message.data(), size, "%05d %d", zipcode, c);
|
||||
// message.data()[0] = c;
|
||||
publisher.send(message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue