mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-24 06:26:15 +02:00
abc
git-svn-id: svn://elaine/murooma/trunk@212 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
b862838b4d
commit
429a2364b4
2 changed files with 6 additions and 6 deletions
|
@ -8,8 +8,8 @@ using namespace std;
|
||||||
|
|
||||||
Stream::Stream(const SampleFormat& sampleFormat) : format(format_), format_(sampleFormat), sleep(0), median(0), shortMedian(0), lastUpdate(0)
|
Stream::Stream(const SampleFormat& sampleFormat) : format(format_), format_(sampleFormat), sleep(0), median(0), shortMedian(0), lastUpdate(0)
|
||||||
{
|
{
|
||||||
pBuffer = new DoubleBuffer<int>(1000);
|
pBuffer = new DoubleBuffer<int>(500);
|
||||||
pShortBuffer = new DoubleBuffer<int>(200);
|
pShortBuffer = new DoubleBuffer<int>(100);
|
||||||
pMiniBuffer = new DoubleBuffer<int>(20);
|
pMiniBuffer = new DoubleBuffer<int>(20);
|
||||||
pCardBuffer = new DoubleBuffer<int>(50);
|
pCardBuffer = new DoubleBuffer<int>(50);
|
||||||
bufferMs = 500;
|
bufferMs = 500;
|
||||||
|
@ -51,7 +51,7 @@ time_point_ms Stream::getSilentPlayerChunk(void* outputBuffer, unsigned long fra
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
time_point_ms Stream::seekTo(const time_point_ms& to)
|
time_point_ms Stream::seekTo(const time_point_ms& to)
|
||||||
{
|
{
|
||||||
if (!chunk)
|
if (!chunk)
|
||||||
|
@ -66,7 +66,7 @@ time_point_ms Stream::seekTo(const time_point_ms& to)
|
||||||
chunk->seek(std::chrono::duration_cast<std::chrono::milliseconds>(to - chunk->timePoint()).count() * format.msRate());
|
chunk->seek(std::chrono::duration_cast<std::chrono::milliseconds>(to - chunk->timePoint()).count() * format.msRate());
|
||||||
return chunk->timePoint();
|
return chunk->timePoint();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
time_point_ms Stream::seek(long ms)
|
time_point_ms Stream::seek(long ms)
|
||||||
|
@ -244,7 +244,7 @@ cout << "\nms: " << Chunk::getAge(ms) << "\t chunk: " << chunk->getAge() << "\n"
|
||||||
cout << "pMiniBuffer->full() && (abs(pMiniBuffer->mean()) > 50): " << pMiniBuffer->median() << "\n";
|
cout << "pMiniBuffer->full() && (abs(pMiniBuffer->mean()) > 50): " << pMiniBuffer->median() << "\n";
|
||||||
sleep = pMiniBuffer->mean();
|
sleep = pMiniBuffer->mean();
|
||||||
}
|
}
|
||||||
else if (abs(age) > 50)
|
else if (abs(age) > 200)
|
||||||
{
|
{
|
||||||
cout << "age > 50: " << age << "\n";
|
cout << "age > 50: " << age << "\n";
|
||||||
sleep = age;
|
sleep = age;
|
||||||
|
|
|
@ -28,7 +28,7 @@ private:
|
||||||
time_point_ms getNextPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer, int correction = 0);
|
time_point_ms getNextPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer, int correction = 0);
|
||||||
time_point_ms getSilentPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer);
|
time_point_ms getSilentPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer);
|
||||||
time_point_ms seek(long ms);
|
time_point_ms seek(long ms);
|
||||||
time_point_ms seekTo(const time_point_ms& to);
|
// time_point_ms seekTo(const time_point_ms& to);
|
||||||
void updateBuffers(int age);
|
void updateBuffers(int age);
|
||||||
void resetBuffers();
|
void resetBuffers();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue