mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 16:16:42 +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
|
@ -50,7 +50,7 @@ PcmEncoder::PcmEncoder(const std::string& codecOptions) : Encoder(codecOptions)
|
|||
void PcmEncoder::encode(const msg::PcmChunk* chunk)
|
||||
{
|
||||
auto* pcmChunk = new msg::PcmChunk(*chunk);
|
||||
listener_->onChunkEncoded(this, pcmChunk, pcmChunk->duration<chronos::msec>().count());
|
||||
listener_->onChunkEncoded(this, pcmChunk, pcmChunk->durationMs());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue