mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-29 00:46:17 +02:00
Change stream reader to use actual chunk duration
e.g. a configured chunk_ms of 11 will read a 44.1kHz stream in chunks of 485 frames (=10.9977ms)
This commit is contained in:
parent
12f828ed43
commit
a8998997e9
8 changed files with 45 additions and 33 deletions
|
@ -67,8 +67,8 @@ std::string OggEncoder::name() const
|
|||
void OggEncoder::encode(const msg::PcmChunk* chunk)
|
||||
{
|
||||
double res = 0;
|
||||
LOG(DEBUG) << "payload: " << chunk->payloadSize << "\tframes: " << chunk->getFrameCount() << "\tduration: " << chunk->duration<chronos::msec>().count()
|
||||
<< "\n";
|
||||
// LOG(TRACE) << "payload: " << chunk->payloadSize << "\tframes: " << chunk->getFrameCount() << "\tduration: " << chunk->duration<chronos::msec>().count()
|
||||
// << "\n";
|
||||
int frames = chunk->getFrameCount();
|
||||
float** buffer = vorbis_analysis_buffer(&vd_, frames);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue