mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 16:16:42 +02:00
Replace some pointers with references
This commit is contained in:
parent
dde63f9dd8
commit
dec7306a84
17 changed files with 77 additions and 67 deletions
|
@ -47,10 +47,10 @@ PcmEncoder::PcmEncoder(const std::string& codecOptions) : Encoder(codecOptions)
|
|||
}
|
||||
|
||||
|
||||
void PcmEncoder::encode(const msg::PcmChunk* chunk)
|
||||
void PcmEncoder::encode(const msg::PcmChunk& chunk)
|
||||
{
|
||||
// copy the chunk into a shared_ptr
|
||||
auto pcmChunk = std::make_shared<msg::PcmChunk>(*chunk);
|
||||
auto pcmChunk = std::make_shared<msg::PcmChunk>(chunk);
|
||||
listener_->onChunkEncoded(this, pcmChunk, pcmChunk->durationMs());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue