mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-27 05:18:38 +02:00
update logger
This commit is contained in:
parent
2955b20e9d
commit
ce55f15c02
36 changed files with 967 additions and 389 deletions
|
@ -76,7 +76,7 @@ bool FlacDecoder::decode(msg::PcmChunk* chunk)
|
|||
|
||||
if (lastError_)
|
||||
{
|
||||
logE << "FLAC decode error: " << FLAC__StreamDecoderErrorStatusString[*lastError_] << "\n";
|
||||
LOG(ERROR) << "FLAC decode error: " << FLAC__StreamDecoderErrorStatusString[*lastError_] << "\n";
|
||||
lastError_= nullptr;
|
||||
return false;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ bool FlacDecoder::decode(msg::PcmChunk* chunk)
|
|||
int32_t s = (diffMs / 1000);
|
||||
int32_t us = (diffMs * 1000);
|
||||
us %= 1000000;
|
||||
logD << "Cached: " << cacheInfo_.cachedBlocks_ << ", " << diffMs << "ms, " << s << "s, " << us << "us\n";
|
||||
LOG(DEBUG) << "Cached: " << cacheInfo_.cachedBlocks_ << ", " << diffMs << "ms, " << s << "s, " << us << "us\n";
|
||||
chunk->timestamp = chunk->timestamp - tv(s, us);
|
||||
}
|
||||
return true;
|
||||
|
@ -162,7 +162,7 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder
|
|||
{
|
||||
if (buffer[channel] == NULL)
|
||||
{
|
||||
logS(kLogErr) << "ERROR: buffer[" << channel << "] is NULL\n";
|
||||
SLOG(LOG_ERR) << "ERROR: buffer[" << channel << "] is NULL\n";
|
||||
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMet
|
|||
void error_callback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
|
||||
{
|
||||
(void)decoder, (void)client_data;
|
||||
logS(kLogErr) << "Got error callback: " << FLAC__StreamDecoderErrorStatusString[status] << "\n";
|
||||
SLOG(LOG_ERR) << "Got error callback: " << FLAC__StreamDecoderErrorStatusString[status] << "\n";
|
||||
static_cast<FlacDecoder*>(client_data)->lastError_ = std::unique_ptr<FLAC__StreamDecoderErrorStatus>(new FLAC__StreamDecoderErrorStatus(status));
|
||||
|
||||
/// TODO, see issue #120:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue