mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-04 02:07:38 +02:00
start stream
git-svn-id: svn://elaine/murooma/trunk@282 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
ebfcbf5c26
commit
001bfa6aba
8 changed files with 75 additions and 6 deletions
|
@ -18,6 +18,7 @@ ServerSession::ServerSession(MessageReceiver* _receiver, std::shared_ptr<tcp::so
|
|||
void ServerSession::start()
|
||||
{
|
||||
active_ = true;
|
||||
streamActive = false;
|
||||
readerThread = new thread(&ServerSession::reader, this);
|
||||
writerThread = new thread(&ServerSession::writer, this);
|
||||
}
|
||||
|
@ -37,7 +38,7 @@ void ServerSession::socketRead(void* _to, size_t _bytes)
|
|||
|
||||
void ServerSession::add(shared_ptr<BaseMessage> message)
|
||||
{
|
||||
if (!message)
|
||||
if (!message || !streamActive)
|
||||
return;
|
||||
|
||||
while (messages.size() > 100)// chunk->getDuration() > 10000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue