mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-13 22:57:44 +02:00
socket stuff
git-svn-id: svn://elaine/murooma/trunk@252 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
96ffd6ba1a
commit
8039c3d023
10 changed files with 56 additions and 105 deletions
|
@ -59,6 +59,9 @@ void Controller::start(std::string& _ip, size_t _port, int _bufferMs)
|
|||
connection = new ClientConnection(this, _ip, _port);
|
||||
connection->start();
|
||||
|
||||
// controlConnection = new ClientConnection(this, _ip, _port + 1);
|
||||
// controlConnection->start();
|
||||
|
||||
controllerThread = new thread(&Controller::worker, this);
|
||||
}
|
||||
|
||||
|
@ -75,7 +78,9 @@ void Controller::worker()
|
|||
active_ = true;
|
||||
|
||||
while (sampleFormat == NULL)
|
||||
{
|
||||
usleep(10000);
|
||||
}
|
||||
stream = new Stream(SampleFormat(*sampleFormat));
|
||||
stream->setBufferLen(bufferMs);
|
||||
|
||||
|
@ -84,7 +89,9 @@ void Controller::worker()
|
|||
|
||||
while (active_)
|
||||
{
|
||||
usleep(10000);
|
||||
usleep(100000);
|
||||
// BaseMessage msg;
|
||||
// controlConnection->send(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue