mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-04 03:41:43 +02:00
Silence the PCM buffer if no chunk is available
This commit is contained in:
parent
147e4e9b7e
commit
168bc3f98b
7 changed files with 31 additions and 11 deletions
|
@ -78,10 +78,9 @@ void OpenslPlayer::playerCallback(SLAndroidSimpleBufferQueueItf bq)
|
|||
return;
|
||||
|
||||
chronos::usec delay(ms_ * 1000);
|
||||
if (!pubStream_->getPlayerChunk(buffer[curBuffer], delay, frames_))
|
||||
if (!pubStream_->getPlayerChunkOrSilence(buffer[curBuffer], delay, frames_))
|
||||
{
|
||||
// LOG(INFO, LOG_TAG) << "Failed to get chunk. Playing silence.\n";
|
||||
memset(buffer[curBuffer], 0, buff_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue