mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-18 17:07:49 +02:00
xxx
git-svn-id: svn://elaine/murooma/trunk@73 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
ff2e24e219
commit
67db37c774
4 changed files with 128 additions and 52 deletions
11
client.cpp
11
client.cpp
|
@ -21,7 +21,6 @@
|
|||
|
||||
std::deque<int> timeDiffs;
|
||||
int bufferMs;
|
||||
std::mutex mutex;
|
||||
|
||||
|
||||
|
||||
|
@ -51,17 +50,15 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer,
|
|||
(void) statusFlags;
|
||||
(void) inputBuffer;
|
||||
|
||||
mutex.lock();
|
||||
PlayerChunk* playerChunk = stream->getChunk(timeInfo->outputBufferDacTime, framesPerBuffer);
|
||||
mutex.unlock();
|
||||
stream->getChunk(out, timeInfo->outputBufferDacTime, framesPerBuffer);
|
||||
|
||||
for (size_t n=0; n<framesPerBuffer; n++)
|
||||
/* for (size_t n=0; n<framesPerBuffer; n++)
|
||||
{
|
||||
*out++ = playerChunk->payload[2*n];
|
||||
*out++ = playerChunk->payload[2*n+1];
|
||||
}
|
||||
delete playerChunk;
|
||||
|
||||
*/
|
||||
return paContinue;
|
||||
}
|
||||
|
||||
|
@ -183,9 +180,7 @@ int main (int argc, char *argv[])
|
|||
// memcpy(chunk, update.data(), sizeof(Chunk));
|
||||
chunk = (Chunk*)(update.data());
|
||||
// std::cerr << "New chunk: " << chunkTime(*chunk) << "\t" << timeToStr(now) << "\t" << getAge(*chunk) << "\n";
|
||||
mutex.lock();
|
||||
stream->addChunk(chunk);
|
||||
mutex.unlock();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue