Package list squeezelite / 4f77ec3
Import Debian patch 1.8-3.1 Gianfranco Costamagna authored 4 years ago Chris Boot committed 4 years ago
3 changed file(s) with 3320 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 squeezelite (1.8-3.1) unstable; urgency=medium
1
2 * Non-maintainer upload.
3 * debian/patches/rename-logs.patch:
4 - rename LOG_* functions to avoid clashes with the one in syslog.h
5 (Closes: #842330)
6
7 -- Gianfranco Costamagna <locutusofborg@debian.org> Mon, 31 Oct 2016 13:50:26 +0100
8
09 squeezelite (1.8-3) unstable; urgency=medium
110
211 * debian/man/squeezelite.1: remove mentions of communitysqueeze.org: the
0 Description: rename log defines to avoid clashes with syslog.h implementations
1 Note: the patch has been forwarded to a github fork, because upstream is dead on
2 google-code
3
4 Author: Gianfranco Costamagna <locutusofborg@debian.org>
5
6 Forwarded: https://github.com/ralph-irving/squeezelite/pull/16
7
8 --- squeezelite-1.8.orig/decode.c
9 +++ squeezelite-1.8/decode.c
10 @@ -71,7 +71,7 @@ static void *decode_thread() {
11
12 if (decode.state == DECODE_RUNNING && codec) {
13
14 - LOG_SDEBUG("streambuf bytes: %u outputbuf space: %u", bytes, space);
15 + LOG_SQ_SDEBUG("streambuf bytes: %u outputbuf space: %u", bytes, space);
16
17 IF_DIRECT(
18 min_space = codec->min_space;
19 @@ -96,7 +96,7 @@ static void *decode_thread() {
20
21 if (decode.state != DECODE_RUNNING) {
22
23 - LOG_INFO("decode %s", decode.state == DECODE_COMPLETE ? "complete" : "error");
24 + LOG_SQ_INFO("decode %s", decode.state == DECODE_COMPLETE ? "complete" : "error");
25
26 LOCK_O;
27 if (output.fade_mode) _checkfade(false);
28 @@ -126,7 +126,7 @@ void decode_init(log_level level, const
29
30 loglevel = level;
31
32 - LOG_INFO("init decode, include codecs: %s exclude codecs: %s", include_codecs ? include_codecs : "", exclude_codecs);
33 + LOG_SQ_INFO("init decode, include codecs: %s exclude codecs: %s", include_codecs ? include_codecs : "", exclude_codecs);
34
35 // register codecs
36 // dsf,dff,alc,wma,wmap,wmal,aac,spt,ogg,ogf,flc,aif,pcm,mp3
37 @@ -172,7 +172,7 @@ void decode_init(log_level level, const
38 }
39
40 void decode_close(void) {
41 - LOG_INFO("close decode");
42 + LOG_SQ_INFO("close decode");
43 LOCK_D;
44 if (codec) {
45 codec->close();
46 @@ -187,7 +187,7 @@ void decode_close(void) {
47 }
48
49 void decode_flush(void) {
50 - LOG_INFO("decode flush");
51 + LOG_SQ_INFO("decode flush");
52 LOCK_D;
53 decode.state = DECODE_STOPPED;
54 IF_PROCESS(
55 @@ -215,7 +215,7 @@ unsigned decode_newstream(unsigned sampl
56 void codec_open(u8_t format, u8_t sample_size, u8_t sample_rate, u8_t channels, u8_t endianness) {
57 int i;
58
59 - LOG_INFO("codec open: '%c'", format);
60 + LOG_SQ_INFO("codec open: '%c'", format);
61
62 LOCK_D;
63
64 @@ -232,7 +232,7 @@ void codec_open(u8_t format, u8_t sample
65 if (codecs[i] && codecs[i]->id == format) {
66
67 if (codec && codec != codecs[i]) {
68 - LOG_INFO("closing codec: '%c'", codec->id);
69 + LOG_SQ_INFO("closing codec: '%c'", codec->id);
70 codec->close();
71 }
72
73 @@ -249,6 +249,6 @@ void codec_open(u8_t format, u8_t sample
74
75 UNLOCK_D;
76
77 - LOG_ERROR("codec not found");
78 + LOG_SQ_ERROR("codec not found");
79 }
80
81 --- squeezelite-1.8.orig/dsd.c
82 +++ squeezelite-1.8/dsd.c
83 @@ -105,7 +105,7 @@ static int _read_header(void) {
84 } else if (!memcmp(streambuf->readp, "DSD ", 4)) {
85 d->type = DSF;
86 } else {
87 - LOG_WARN("bad type");
88 + LOG_SQ_WARN("bad type");
89 return -1;
90 }
91 }
92 @@ -122,7 +122,7 @@ static int _read_header(void) {
93 if (!memcmp(streambuf->readp + 12, "DSD ", 4)) {
94 consume = 16; // read into
95 } else {
96 - LOG_WARN("bad dsdiff FRM8");
97 + LOG_SQ_WARN("bad dsdiff FRM8");
98 return -1;
99 }
100 }
101 @@ -130,19 +130,19 @@ static int _read_header(void) {
102 consume = 16; // read into
103 }
104 if (!strcmp(id, "FVER")) {
105 - LOG_INFO("DSDIFF version: %u.%u.%u.%u", *(streambuf->readp + 12), *(streambuf->readp + 13),
106 + LOG_SQ_INFO("DSDIFF version: %u.%u.%u.%u", *(streambuf->readp + 12), *(streambuf->readp + 13),
107 *(streambuf->readp + 14), *(streambuf->readp + 15));
108 }
109 if (!strcmp(id, "FS ")) {
110 d->sample_rate = unpackN((void *)(streambuf->readp + 12));
111 - LOG_INFO("sample rate: %u", d->sample_rate);
112 + LOG_SQ_INFO("sample rate: %u", d->sample_rate);
113 }
114 if (!strcmp(id, "CHNL")) {
115 d->channels = unpackn((void *)(streambuf->readp + 12));
116 - LOG_INFO("channels: %u", d->channels);
117 + LOG_SQ_INFO("channels: %u", d->channels);
118 }
119 if (!strcmp(id, "DSD ")) {
120 - LOG_INFO("found dsd len: " FMT_u64, len);
121 + LOG_SQ_INFO("found dsd len: " FMT_u64, len);
122 d->sample_bytes = len;
123 _buf_inc_readp(streambuf, 12);
124 bytes -= 12;
125 @@ -155,9 +155,9 @@ static int _read_header(void) {
126 if (bytes >= len && bytes >= 52) {
127 u32_t version = unpack32le((void *)(streambuf->readp + 12));
128 u32_t format = unpack32le((void *)(streambuf->readp + 16));
129 - LOG_INFO("DSF version: %u format: %u", version, format);
130 + LOG_SQ_INFO("DSF version: %u format: %u", version, format);
131 if (format != 0) {
132 - LOG_WARN("only support DSD raw format");
133 + LOG_SQ_WARN("only support DSD raw format");
134 return -1;
135 }
136 d->channels = unpack32le((void *)(streambuf->readp + 24));
137 @@ -165,17 +165,17 @@ static int _read_header(void) {
138 d->lsb_first = (unpack32le((void *)(streambuf->readp + 32)) == 1);
139 d->sample_bytes = unpack64le((void *)(streambuf->readp + 36)) / 8;
140 d->block_size = unpack32le((void *)(streambuf->readp + 44));
141 - LOG_INFO("channels: %u", d->channels);
142 - LOG_INFO("sample rate: %u", d->sample_rate);
143 - LOG_INFO("lsb first: %u", d->lsb_first);
144 - LOG_INFO("sample bytes: " FMT_u64, d->sample_bytes);
145 - LOG_INFO("block size: %u", d->block_size);
146 + LOG_SQ_INFO("channels: %u", d->channels);
147 + LOG_SQ_INFO("sample rate: %u", d->sample_rate);
148 + LOG_SQ_INFO("lsb first: %u", d->lsb_first);
149 + LOG_SQ_INFO("sample bytes: " FMT_u64, d->sample_bytes);
150 + LOG_SQ_INFO("block size: %u", d->block_size);
151 } else {
152 consume = -1; // come back later
153 }
154 }
155 if (!strcmp(id, "data")) {
156 - LOG_INFO("found dsd len: " FMT_u64, len);
157 + LOG_SQ_INFO("found dsd len: " FMT_u64, len);
158 _buf_inc_readp(streambuf, 12);
159 bytes -= 12;
160 return 1; // got to the audio
161 @@ -188,11 +188,11 @@ static int _read_header(void) {
162 }
163
164 if (bytes >= consume) {
165 - LOG_DEBUG("id: %s len: " FMT_u64 " consume: %d", id, len, consume);
166 + LOG_SQ_DEBUG("id: %s len: " FMT_u64 " consume: %d", id, len, consume);
167 _buf_inc_readp(streambuf, consume);
168 bytes -= consume;
169 } else if (consume > 0) {
170 - LOG_DEBUG("id: %s len: " FMT_u64 " consume: %d - partial consume: %u", id, len, consume, bytes);
171 + LOG_SQ_DEBUG("id: %s len: " FMT_u64 " consume: %d - partial consume: %u", id, len, consume, bytes);
172 _buf_inc_readp(streambuf, bytes);
173 d->consume = consume - bytes;
174 break;
175 @@ -215,7 +215,7 @@ static decode_state _decode_dsf(void) {
176 unsigned bytes_per_frame = dop ? 2 : 1;
177
178 if (bytes < d->block_size * d->channels) {
179 - LOG_INFO("stream too short"); // this can occur when scanning the track
180 + LOG_SQ_INFO("stream too short"); // this can occur when scanning the track
181 return DECODE_COMPLETE;
182 }
183
184 @@ -255,7 +255,7 @@ static decode_state _decode_dsf(void) {
185 frames = 1;
186 } else {
187 // should not get here due to wrapping m/2 for dop should never result in 0 as header len is always even
188 - LOG_INFO("frames got to zero");
189 + LOG_SQ_INFO("frames got to zero");
190 return DECODE_COMPLETE;
191 }
192 }
193 @@ -338,7 +338,7 @@ static decode_state _decode_dsf(void) {
194 if (d->sample_bytes > bytes_read) {
195 d->sample_bytes -= bytes_read;
196 } else {
197 - LOG_INFO("end of track samples");
198 + LOG_SQ_INFO("end of track samples");
199 block_left = 0;
200 d->sample_bytes = 0;
201 }
202 @@ -350,7 +350,7 @@ static decode_state _decode_dsf(void) {
203 process.in_frames += frames;
204 );
205
206 - LOG_SDEBUG("write %u frames", frames);
207 + LOG_SQ_SDEBUG("write %u frames", frames);
208 }
209
210 // skip the other channel blocks
211 @@ -472,7 +472,7 @@ static decode_state _decode_dsdiff(void)
212 if (d->sample_bytes > bytes_read) {
213 d->sample_bytes -= bytes_read;
214 } else {
215 - LOG_INFO("end of track samples");
216 + LOG_SQ_INFO("end of track samples");
217 d->sample_bytes = 0;
218 }
219
220 @@ -483,7 +483,7 @@ static decode_state _decode_dsdiff(void)
221 process.in_frames = frames;
222 );
223
224 - LOG_SDEBUG("write %u frames", frames);
225 + LOG_SQ_SDEBUG("write %u frames", frames);
226
227 return DECODE_RUNNING;
228 }
229 @@ -501,7 +501,7 @@ static decode_state dsd_decode(void) {
230
231 if (d->consume) {
232 unsigned consume = min(d->consume, min(_buf_used(streambuf), _buf_cont_read(streambuf)));
233 - LOG_DEBUG("consume: %u of %u", consume, d->consume);
234 + LOG_SQ_DEBUG("consume: %u of %u", consume, d->consume);
235 _buf_inc_readp(streambuf, consume);
236 d->consume -= consume;
237 if (d->consume) {
238 @@ -524,23 +524,23 @@ static decode_state dsd_decode(void) {
239
240 LOCK_O;
241
242 - LOG_INFO("setting track_start");
243 + LOG_SQ_INFO("setting track_start");
244 output.track_start = outputbuf->writep;
245
246 dop = output.has_dop;
247
248 if (dop && d->sample_rate / 16 > output.supported_rates[0]) {
249 - LOG_INFO("DOP sample rate too high for device - converting to PCM");
250 + LOG_SQ_INFO("DOP sample rate too high for device - converting to PCM");
251 dop = false;
252 }
253
254 if (dop) {
255 - LOG_INFO("DOP output");
256 + LOG_SQ_INFO("DOP output");
257 output.next_dop = true;
258 output.next_sample_rate = d->sample_rate / 16;
259 output.fade = FADE_INACTIVE;
260 } else {
261 - LOG_INFO("DSD to PCM output");
262 + LOG_SQ_INFO("DSD to PCM output");
263 output.next_dop = false;
264 output.next_sample_rate = decode_newstream(d->sample_rate / 8, output.supported_rates);
265 if (output.fade_mode) _checkfade(true);
266 @@ -621,7 +621,7 @@ struct codec *register_dsd(void) {
267
268 dsd2pcm_precalc();
269
270 - LOG_INFO("using dsd to decode dsf,dff");
271 + LOG_SQ_INFO("using dsd to decode dsf,dff");
272 return &ret;
273 }
274
275 --- squeezelite-1.8.orig/faad.c
276 +++ squeezelite-1.8/faad.c
277 @@ -142,12 +142,12 @@ static int read_mp4_header(unsigned long
278 mp4_desc_length(&ptr);
279 ptr += 13;
280 if (*ptr++ != 0x05) {
281 - LOG_WARN("error parsing esds");
282 + LOG_SQ_WARN("error parsing esds");
283 return -1;
284 }
285 config_len = mp4_desc_length(&ptr);
286 if (NEAAC(a, Init2, a->hAac, ptr, config_len, samplerate_p, channels_p) == 0) {
287 - LOG_DEBUG("playable aac track: %u", trak);
288 + LOG_SQ_DEBUG("playable aac track: %u", trak);
289 play = trak;
290 }
291 }
292 @@ -164,14 +164,14 @@ static int read_mp4_header(unsigned long
293 a->sttssamples += count * size;
294 ptr += 8;
295 }
296 - LOG_DEBUG("total number of samples contained in stts: " FMT_u64, a->sttssamples);
297 + LOG_SQ_DEBUG("total number of samples contained in stts: " FMT_u64, a->sttssamples);
298 }
299
300 // stash sample to chunk info, assume it comes before stco
301 if (!strcmp(type, "stsc") && bytes > len && !a->chunkinfo) {
302 a->stsc = malloc(len - 12);
303 if (a->stsc == NULL) {
304 - LOG_WARN("malloc fail");
305 + LOG_SQ_WARN("malloc fail");
306 return -1;
307 }
308 memcpy(a->stsc, streambuf->readp + 12, len - 12);
309 @@ -186,7 +186,7 @@ static int read_mp4_header(unsigned long
310 ptr += 4;
311 a->chunkinfo = malloc(sizeof(struct chunk_table) * (entries + 1));
312 if (a->chunkinfo == NULL) {
313 - LOG_WARN("malloc fail");
314 + LOG_SQ_WARN("malloc fail");
315 return -1;
316 }
317 for (i = 0; i < entries; ++i) {
318 @@ -232,10 +232,10 @@ static int read_mp4_header(unsigned long
319 a->pos += 8;
320 bytes -= 8;
321 if (play) {
322 - LOG_DEBUG("type: mdat len: %u pos: %u", len, a->pos);
323 + LOG_SQ_DEBUG("type: mdat len: %u pos: %u", len, a->pos);
324 if (a->chunkinfo && a->chunkinfo[0].offset > a->pos) {
325 u32_t skip = a->chunkinfo[0].offset - a->pos;
326 - LOG_DEBUG("skipping: %u", skip);
327 + LOG_SQ_DEBUG("skipping: %u", skip);
328 if (skip <= bytes) {
329 _buf_inc_readp(streambuf, skip);
330 a->pos += skip;
331 @@ -246,7 +246,7 @@ static int read_mp4_header(unsigned long
332 a->sample = a->nextchunk = 1;
333 return 1;
334 } else {
335 - LOG_DEBUG("type: mdat len: %u, no playable track found", len);
336 + LOG_SQ_DEBUG("type: mdat len: %u, no playable track found", len);
337 return -1;
338 }
339 }
340 @@ -265,9 +265,9 @@ static int read_mp4_header(unsigned long
341 // data is stored as hex strings: 0 start end samples
342 u32_t b, c; u64_t d;
343 if (sscanf((const char *)(ptr + 16), "%x %x %x " FMT_x64, &b, &b, &c, &d) == 4) {
344 - LOG_DEBUG("iTunSMPB start: %u end: %u samples: " FMT_u64, b, c, d);
345 + LOG_SQ_DEBUG("iTunSMPB start: %u end: %u samples: " FMT_u64, b, c, d);
346 if (a->sttssamples && a->sttssamples < b + c + d) {
347 - LOG_DEBUG("reducing samples as stts count is less");
348 + LOG_SQ_DEBUG("reducing samples as stts count is less");
349 d = a->sttssamples - (b + c);
350 }
351 a->skip = b;
352 @@ -291,13 +291,13 @@ static int read_mp4_header(unsigned long
353
354 // consume rest of box if it has been parsed (all in the buffer) or is not one we want to parse
355 if (bytes >= consume) {
356 - LOG_DEBUG("type: %s len: %u consume: %u", type, len, consume);
357 + LOG_SQ_DEBUG("type: %s len: %u consume: %u", type, len, consume);
358 _buf_inc_readp(streambuf, consume);
359 a->pos += consume;
360 bytes -= consume;
361 } else if ( !(!strcmp(type, "esds") || !strcmp(type, "stts") || !strcmp(type, "stsc") ||
362 !strcmp(type, "stco") || !strcmp(type, "----")) ) {
363 - LOG_DEBUG("type: %s len: %u consume: %u - partial consume: %u", type, len, consume, bytes);
364 + LOG_SQ_DEBUG("type: %s len: %u consume: %u - partial consume: %u", type, len, consume, bytes);
365 _buf_inc_readp(streambuf, bytes);
366 a->pos += bytes;
367 a->consume = consume - bytes;
368 @@ -329,7 +329,7 @@ static decode_state faad_decode(void) {
369
370 if (a->consume) {
371 u32_t consume = min(a->consume, bytes_wrap);
372 - LOG_DEBUG("consume: %u of %u", consume, a->consume);
373 + LOG_SQ_DEBUG("consume: %u of %u", consume, a->consume);
374 _buf_inc_readp(streambuf, consume);
375 a->pos += consume;
376 a->consume -= consume;
377 @@ -369,12 +369,12 @@ static decode_state faad_decode(void) {
378
379 if (found == 1) {
380
381 - LOG_INFO("samplerate: %u channels: %u", samplerate, channels);
382 + LOG_SQ_INFO("samplerate: %u channels: %u", samplerate, channels);
383 bytes_total = _buf_used(streambuf);
384 bytes_wrap = min(bytes_total, _buf_cont_read(streambuf));
385
386 LOCK_O;
387 - LOG_INFO("setting track_start");
388 + LOG_SQ_INFO("setting track_start");
389 output.next_sample_rate = decode_newstream(samplerate, output.supported_rates);
390 IF_DSD( output.next_dop = false; )
391 output.track_start = outputbuf->writep;
392 @@ -384,7 +384,7 @@ static decode_state faad_decode(void) {
393
394 } else if (found == -1) {
395
396 - LOG_WARN("error reading stream header");
397 + LOG_SQ_WARN("error reading stream header");
398 UNLOCK_S;
399 return DECODE_ERROR;
400
401 @@ -411,7 +411,7 @@ static decode_state faad_decode(void) {
402 }
403
404 if (info.error) {
405 - LOG_WARN("error: %u %s", info.error, NEAAC(a, GetErrorMessage, info.error));
406 + LOG_SQ_WARN("error: %u %s", info.error, NEAAC(a, GetErrorMessage, info.error));
407 }
408
409 endstream = false;
410 @@ -422,7 +422,7 @@ static decode_state faad_decode(void) {
411 if (a->chunkinfo[a->nextchunk].offset > a->pos) {
412 u32_t skip = a->chunkinfo[a->nextchunk].offset - a->pos;
413 if (skip != info.bytesconsumed) {
414 - LOG_DEBUG("skipping to next chunk pos: %u consumed: %u != skip: %u", a->pos, info.bytesconsumed, skip);
415 + LOG_SQ_DEBUG("skipping to next chunk pos: %u consumed: %u != skip: %u", a->pos, info.bytesconsumed, skip);
416 }
417 if (bytes_total >= skip) {
418 _buf_inc_readp(streambuf, skip);
419 @@ -432,7 +432,7 @@ static decode_state faad_decode(void) {
420 }
421 a->nextchunk++;
422 } else {
423 - LOG_ERROR("error: need to skip backwards!");
424 + LOG_SQ_ERROR("error: need to skip backwards!");
425 endstream = true;
426 }
427
428 @@ -450,7 +450,7 @@ static decode_state faad_decode(void) {
429 UNLOCK_S;
430
431 if (endstream) {
432 - LOG_WARN("unable to decode further");
433 + LOG_SQ_WARN("unable to decode further");
434 return DECODE_ERROR;
435 }
436
437 @@ -466,10 +466,10 @@ static decode_state faad_decode(void) {
438 if (a->empty) {
439 a->empty = false;
440 a->skip -= frames;
441 - LOG_DEBUG("gapless: first frame empty, skipped %u frames at start", frames);
442 + LOG_SQ_DEBUG("gapless: first frame empty, skipped %u frames at start", frames);
443 }
444 skip = min(frames, a->skip);
445 - LOG_DEBUG("gapless: skipping %u frames at start", skip);
446 + LOG_SQ_DEBUG("gapless: skipping %u frames at start", skip);
447 frames -= skip;
448 a->skip -= skip;
449 iptr += skip * info.channels;
450 @@ -477,13 +477,13 @@ static decode_state faad_decode(void) {
451
452 if (a->samples) {
453 if (a->samples < frames) {
454 - LOG_DEBUG("gapless: trimming %u frames from end", frames - a->samples);
455 + LOG_SQ_DEBUG("gapless: trimming %u frames from end", frames - a->samples);
456 frames = (frames_t)a->samples;
457 }
458 a->samples -= frames;
459 }
460
461 - LOG_SDEBUG("write %u frames", frames);
462 + LOG_SQ_SDEBUG("write %u frames", frames);
463
464 LOCK_O_direct;
465
466 @@ -515,7 +515,7 @@ static decode_state faad_decode(void) {
467 *optr++ = *iptr++ << 8;
468 }
469 } else {
470 - LOG_WARN("unsupported number of channels");
471 + LOG_SQ_WARN("unsupported number of channels");
472 }
473
474 frames -= f;
475 @@ -525,7 +525,7 @@ static decode_state faad_decode(void) {
476 );
477 IF_PROCESS(
478 process.in_frames = f;
479 - if (frames) LOG_ERROR("unhandled case");
480 + if (frames) LOG_SQ_ERROR("unhandled case");
481 );
482 }
483
484 @@ -537,7 +537,7 @@ static decode_state faad_decode(void) {
485 static void faad_open(u8_t size, u8_t rate, u8_t chan, u8_t endianness) {
486 NeAACDecConfigurationPtr conf;
487
488 - LOG_INFO("opening %s stream", size == '2' ? "adts" : "mp4");
489 + LOG_SQ_INFO("opening %s stream", size == '2' ? "adts" : "mp4");
490
491 a->type = size;
492 a->pos = a->consume = a->sample = a->nextchunk = 0;
493 @@ -566,7 +566,7 @@ static void faad_open(u8_t size, u8_t ra
494 conf->downMatrix = 1;
495
496 if (!NEAAC(a, SetConfiguration, a->hAac, conf)) {
497 - LOG_WARN("error setting config");
498 + LOG_SQ_WARN("error setting config");
499 };
500 }
501
502 @@ -589,7 +589,7 @@ static bool load_faad() {
503 char *err;
504
505 if (!handle) {
506 - LOG_INFO("dlerror: %s", dlerror());
507 + LOG_SQ_INFO("dlerror: %s", dlerror());
508 return false;
509 }
510
511 @@ -603,11 +603,11 @@ static bool load_faad() {
512 a->NeAACDecGetErrorMessage = dlsym(handle, "NeAACDecGetErrorMessage");
513
514 if ((err = dlerror()) != NULL) {
515 - LOG_INFO("dlerror: %s", err);
516 + LOG_SQ_INFO("dlerror: %s", err);
517 return false;
518 }
519
520 - LOG_INFO("loaded "LIBFAAD"");
521 + LOG_SQ_INFO("loaded "LIBFAAD"");
522 #endif
523
524 return true;
525 @@ -637,6 +637,6 @@ struct codec *register_faad(void) {
526 return NULL;
527 }
528
529 - LOG_INFO("using faad to decode aac");
530 + LOG_SQ_INFO("using faad to decode aac");
531 return &ret;
532 }
533 --- squeezelite-1.8.orig/ffmpeg.c
534 +++ squeezelite-1.8/ffmpeg.c
535 @@ -144,7 +144,7 @@ static int _parse_packlen(void) {
536 }
537 if (!memcmp(ptr, file_props_guid, 16) && len == 104) {
538 u32_t packlen = *(ptr+92) | *(ptr+93) << 8 | *(ptr+94) << 16 | *(ptr+95) << 24;
539 - LOG_INFO("asf packet len: %u", packlen);
540 + LOG_SQ_INFO("asf packet len: %u", packlen);
541 return packlen;
542 }
543 ptr += len;
544 @@ -152,7 +152,7 @@ static int _parse_packlen(void) {
545 remain -= len;
546 }
547
548 - LOG_WARN("could not parse packet length");
549 + LOG_SQ_WARN("could not parse packet length");
550 return 0;
551 }
552
553 @@ -204,7 +204,7 @@ static int _read_data(void *opaque, u8_t
554 bytes = min(bytes, buf_size);
555 } else {
556 // should not get here...
557 - LOG_ERROR("chunk parser stalled bytes: %u %u", bytes, _buf_used(streambuf));
558 + LOG_SQ_ERROR("chunk parser stalled bytes: %u %u", bytes, _buf_used(streambuf));
559 UNLOCK_S;
560 return 0;
561 }
562 @@ -218,7 +218,7 @@ static int _read_data(void *opaque, u8_t
563 // asf data packet - add padding
564 ff->mmsh_bytes_pad = ff->mmsh_packet_len - chunk_len + 8;
565 } else {
566 - LOG_INFO("unknown chunk: %04x", chunk_type);
567 + LOG_SQ_INFO("unknown chunk: %04x", chunk_type);
568 // other packet - no padding
569 ff->mmsh_bytes_pad = 0;
570 }
571 @@ -272,7 +272,7 @@ static decode_state ff_decode(void) {
572
573 ff->formatC = AVFORMAT(ff, alloc_context);
574 if (ff->formatC == NULL) {
575 - LOG_ERROR("null context");
576 + LOG_SQ_ERROR("null context");
577 return DECODE_ERROR;
578 }
579
580 @@ -281,21 +281,21 @@ static decode_state ff_decode(void) {
581
582 o = AVFORMAT(ff, open_input, &ff->formatC, "", ff->input_format, NULL);
583 if (o < 0) {
584 - LOG_WARN("avformat_open_input: %d %s", o, av__err2str(o));
585 + LOG_SQ_WARN("avformat_open_input: %d %s", o, av__err2str(o));
586 return DECODE_ERROR;
587 }
588
589 - LOG_INFO("format: name:%s lname:%s", ff->formatC->iformat->name, ff->formatC->iformat->long_name);
590 + LOG_SQ_INFO("format: name:%s lname:%s", ff->formatC->iformat->name, ff->formatC->iformat->long_name);
591
592 o = AVFORMAT(ff, find_stream_info, ff->formatC, NULL);
593 if (o < 0) {
594 - LOG_WARN("avformat_find_stream_info: %d %s", o, av__err2str(o));
595 + LOG_SQ_WARN("avformat_find_stream_info: %d %s", o, av__err2str(o));
596 return DECODE_ERROR;
597 }
598
599 if (ff->wma && ff->wma_playstream < ff->formatC->nb_streams) {
600 if (ff->formatC->streams[ff->wma_playstream]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
601 - LOG_INFO("using wma stream sent from server: %i", ff->wma_playstream);
602 + LOG_SQ_INFO("using wma stream sent from server: %i", ff->wma_playstream);
603 audio_stream = ff->wma_playstream;
604 }
605 }
606 @@ -305,14 +305,14 @@ static decode_state ff_decode(void) {
607 for (i = 0; i < ff->formatC->nb_streams; ++i) {
608 if (ff->formatC->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
609 audio_stream = i;
610 - LOG_INFO("found stream: %i", i);
611 + LOG_SQ_INFO("found stream: %i", i);
612 break;
613 }
614 }
615 }
616
617 if (audio_stream == -1) {
618 - LOG_WARN("no audio stream found");
619 + LOG_SQ_WARN("no audio stream found");
620 return DECODE_ERROR;
621 }
622
623 @@ -328,7 +328,7 @@ static decode_state ff_decode(void) {
624
625 ff->avpkt = AV(ff, malloc, sizeof(AVPacket));
626 if (ff->avpkt == NULL) {
627 - LOG_ERROR("can't allocate avpkt");
628 + LOG_SQ_ERROR("can't allocate avpkt");
629 return DECODE_ERROR;
630 }
631
632 @@ -337,7 +337,7 @@ static decode_state ff_decode(void) {
633 ff->avpkt->size = 0;
634
635 LOCK_O;
636 - LOG_INFO("setting track_start");
637 + LOG_SQ_INFO("setting track_start");
638 output.next_sample_rate = decode_newstream(ff->codecC->sample_rate, output.supported_rates);
639 IF_DSD( output.next_dop = false; )
640 output.track_start = outputbuf->writep;
641 @@ -351,13 +351,13 @@ static decode_state ff_decode(void) {
642 if ((r = AV(ff, read_frame, ff->formatC, ff->avpkt)) < 0) {
643 if (r == AVERROR_EOF) {
644 if (ff->end_of_stream) {
645 - LOG_INFO("decode complete");
646 + LOG_SQ_INFO("decode complete");
647 return DECODE_COMPLETE;
648 } else {
649 - LOG_INFO("codec end of file");
650 + LOG_SQ_INFO("codec end of file");
651 }
652 } else {
653 - LOG_ERROR("av_read_frame error: %i %s", r, av__err2str(r));
654 + LOG_SQ_ERROR("av_read_frame error: %i %s", r, av__err2str(r));
655 }
656 return DECODE_RUNNING;
657 }
658 @@ -374,7 +374,7 @@ static decode_state ff_decode(void) {
659
660 len = AVCODEC(ff, decode_audio4, ff->codecC, ff->frame, &got_frame, &pkt_c);
661 if (len < 0) {
662 - LOG_ERROR("avcodec_decode_audio4 error: %i %s", len, av__err2str(len));
663 + LOG_SQ_ERROR("avcodec_decode_audio4 error: %i %s", len, av__err2str(len));
664 return DECODE_RUNNING;
665 }
666
667 @@ -394,7 +394,7 @@ static decode_state ff_decode(void) {
668
669 frames_t frames = ff->frame->nb_samples;
670
671 - LOG_SDEBUG("got audio channels: %u samples: %u format: %u", ff->codecC->channels, ff->frame->nb_samples,
672 + LOG_SQ_SDEBUG("got audio channels: %u samples: %u format: %u", ff->codecC->channels, ff->frame->nb_samples,
673 ff->codecC->sample_fmt);
674
675 LOCK_O_direct;
676 @@ -411,7 +411,7 @@ static decode_state ff_decode(void) {
677
678 IF_PROCESS(
679 if (process.in_frames + frames > process.max_in_frames) {
680 - LOG_WARN("exceeded process buffer size - dropping frames");
681 + LOG_SQ_WARN("exceeded process buffer size - dropping frames");
682 break;
683 }
684 f = frames;
685 @@ -452,7 +452,7 @@ static decode_state ff_decode(void) {
686 *optr++ = (s32_t)scaledr;
687 }
688 } else {
689 - LOG_WARN("unsupported sample format: %u", ff->codecC->sample_fmt);
690 + LOG_SQ_WARN("unsupported sample format: %u", ff->codecC->sample_fmt);
691 }
692 } else if (ff->codecC->channels == 1) {
693 if (ff->codecC->sample_fmt == AV_SAMPLE_FMT_S16) {
694 @@ -484,10 +484,10 @@ static decode_state ff_decode(void) {
695 *optr++ = (s32_t)scaled;
696 }
697 } else {
698 - LOG_WARN("unsupported sample format: %u", ff->codecC->sample_fmt);
699 + LOG_SQ_WARN("unsupported sample format: %u", ff->codecC->sample_fmt);
700 }
701 } else {
702 - LOG_WARN("unsupported number of channels");
703 + LOG_SQ_WARN("unsupported number of channels");
704 }
705
706 frames -= f;
707 @@ -541,7 +541,7 @@ static void ff_open_wma(u8_t size, u8_t
708
709 ff->input_format = AV(ff, find_input_format, "asf");
710 if (ff->input_format == NULL) {
711 - LOG_ERROR("asf format not supported by ffmpeg library");
712 + LOG_SQ_ERROR("asf format not supported by ffmpeg library");
713 }
714
715 ff->wma = true;
716 @@ -549,7 +549,7 @@ static void ff_open_wma(u8_t size, u8_t
717 ff->wma_playstream = rate - 1;
718 ff->wma_metadatastream = chan != '?' ? chan : 0;
719
720 - LOG_INFO("open wma chunking: %u playstream: %u metadatastream: %u", ff->wma_mmsh, ff->wma_playstream, ff->wma_metadatastream);
721 + LOG_SQ_INFO("open wma chunking: %u playstream: %u metadatastream: %u", ff->wma_mmsh, ff->wma_playstream, ff->wma_metadatastream);
722 }
723
724 static void ff_open_alac(u8_t size, u8_t rate, u8_t chan, u8_t endianness) {
725 @@ -557,13 +557,13 @@ static void ff_open_alac(u8_t size, u8_t
726
727 ff->input_format = AV(ff, find_input_format, "mp4");
728 if (ff->input_format == NULL) {
729 - LOG_ERROR("mp4 format not supported by ffmpeg library");
730 + LOG_SQ_ERROR("mp4 format not supported by ffmpeg library");
731 }
732
733 ff->wma = false;
734 ff->wma_mmsh = 0;
735
736 - LOG_INFO("open alac");
737 + LOG_SQ_INFO("open alac");
738 }
739
740 static void ff_close(void) {
741 @@ -586,21 +586,21 @@ static bool load_ff() {
742 sprintf(name, LIBAVCODEC, LIBAVCODEC_VERSION_MAJOR);
743 handle_codec = dlopen(name, RTLD_NOW);
744 if (!handle_codec) {
745 - LOG_INFO("dlerror: %s", dlerror());
746 + LOG_SQ_INFO("dlerror: %s", dlerror());
747 return false;
748 }
749
750 sprintf(name, LIBAVFORMAT, LIBAVFORMAT_VERSION_MAJOR);
751 handle_format = dlopen(name, RTLD_NOW);
752 if (!handle_format) {
753 - LOG_INFO("dlerror: %s", dlerror());
754 + LOG_SQ_INFO("dlerror: %s", dlerror());
755 return false;
756 }
757
758 sprintf(name, LIBAVUTIL, LIBAVUTIL_VERSION_MAJOR);
759 handle_util = dlopen(name, RTLD_NOW);
760 if (!handle_util) {
761 - LOG_INFO("dlerror: %s", dlerror());
762 + LOG_SQ_INFO("dlerror: %s", dlerror());
763 return false;
764 }
765
766 @@ -614,11 +614,11 @@ static bool load_ff() {
767 ff->av_free_packet = dlsym(handle_codec, "av_free_packet");
768
769 if ((err = dlerror()) != NULL) {
770 - LOG_INFO("dlerror: %s", err);
771 + LOG_SQ_INFO("dlerror: %s", err);
772 return false;
773 }
774
775 - LOG_INFO("loaded "LIBAVCODEC" (%u.%u.%u)", LIBAVCODEC_VERSION_MAJOR, ff->avcodec_version() >> 16, (ff->avcodec_version() >> 8) & 0xff, ff->avcodec_version() & 0xff);
776 + LOG_SQ_INFO("loaded "LIBAVCODEC" (%u.%u.%u)", LIBAVCODEC_VERSION_MAJOR, ff->avcodec_version() >> 16, (ff->avcodec_version() >> 8) & 0xff, ff->avcodec_version() & 0xff);
777
778 ff->avformat_version = dlsym(handle_format, "avformat_version");
779 ff->avformat_alloc_context = dlsym(handle_format, "avformat_alloc_context");
780 @@ -631,11 +631,11 @@ static bool load_ff() {
781 ff->av_register_all = dlsym(handle_format, "av_register_all");
782
783 if ((err = dlerror()) != NULL) {
784 - LOG_INFO("dlerror: %s", err);
785 + LOG_SQ_INFO("dlerror: %s", err);
786 return false;
787 }
788
789 - LOG_INFO("loaded "LIBAVFORMAT" (%u.%u.%u)", LIBAVFORMAT_VERSION_MAJOR, ff->avformat_version() >> 16, (ff->avformat_version() >> 8) & 0xff, ff->avformat_version() & 0xff);
790 + LOG_SQ_INFO("loaded "LIBAVFORMAT" (%u.%u.%u)", LIBAVFORMAT_VERSION_MAJOR, ff->avformat_version() >> 16, (ff->avformat_version() >> 8) & 0xff, ff->avformat_version() & 0xff);
791
792 ff->avutil_version = dlsym(handle_util, "avutil_version");
793 ff->av_log_set_callback = dlsym(handle_util, "av_log_set_callback");
794 @@ -645,11 +645,11 @@ static bool load_ff() {
795 ff->av_freep = dlsym(handle_util, "av_freep");
796
797 if ((err = dlerror()) != NULL) {
798 - LOG_INFO("dlerror: %s", err);
799 + LOG_SQ_INFO("dlerror: %s", err);
800 return false;
801 }
802
803 - LOG_INFO("loaded "LIBAVUTIL" (%u.%u.%u)", LIBAVUTIL_VERSION_MAJOR, ff->avutil_version() >> 16, (ff->avutil_version() >> 8) & 0xff, ff->avutil_version() & 0xff);
804 + LOG_SQ_INFO("loaded "LIBAVUTIL" (%u.%u.%u)", LIBAVUTIL_VERSION_MAJOR, ff->avutil_version() >> 16, (ff->avutil_version() >> 8) & 0xff, ff->avutil_version() & 0xff);
805
806 #endif
807
808 @@ -712,7 +712,7 @@ struct codec *register_ff(const char *co
809 ff_decode, // decode
810 };
811
812 - LOG_INFO("using ffmpeg to decode wma,wmap,wmal");
813 + LOG_SQ_INFO("using ffmpeg to decode wma,wmap,wmal");
814 return &ret;
815 }
816
817 @@ -728,7 +728,7 @@ struct codec *register_ff(const char *co
818 ff_decode, // decode
819 };
820
821 - LOG_INFO("using ffmpeg to decode alc");
822 + LOG_SQ_INFO("using ffmpeg to decode alc");
823 return &ret;
824 }
825
826 --- squeezelite-1.8.orig/flac.c
827 +++ squeezelite-1.8/flac.c
828 @@ -113,13 +113,13 @@ static FLAC__StreamDecoderWriteStatus wr
829
830 if (decode.new_stream) {
831 LOCK_O;
832 - LOG_INFO("setting track_start");
833 + LOG_SQ_INFO("setting track_start");
834 output.track_start = outputbuf->writep;
835 decode.new_stream = false;
836
837 #if DSD
838 if (output.has_dop && bits_per_sample == 24 && is_flac_dop((u32_t *)lptr, (u32_t *)rptr, frames)) {
839 - LOG_INFO("file contains DOP");
840 + LOG_SQ_INFO("file contains DOP");
841 output.next_dop = true;
842 output.next_sample_rate = frame->header.sample_rate;
843 output.fade = FADE_INACTIVE;
844 @@ -177,7 +177,7 @@ static FLAC__StreamDecoderWriteStatus wr
845 *optr++ = *rptr++;
846 }
847 } else {
848 - LOG_ERROR("unsupported bits per sample: %u", bits_per_sample);
849 + LOG_SQ_ERROR("unsupported bits per sample: %u", bits_per_sample);
850 }
851
852 frames -= f;
853 @@ -187,7 +187,7 @@ static FLAC__StreamDecoderWriteStatus wr
854 );
855 IF_PROCESS(
856 process.in_frames = f;
857 - if (frames) LOG_ERROR("unhandled case");
858 + if (frames) LOG_SQ_ERROR("unhandled case");
859 );
860 }
861
862 @@ -197,7 +197,7 @@ static FLAC__StreamDecoderWriteStatus wr
863 }
864
865 static void error_cb(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) {
866 - LOG_INFO("flac error: %s", FLAC_A(f, StreamDecoderErrorStatusString)[status]);
867 + LOG_SQ_INFO("flac error: %s", FLAC_A(f, StreamDecoderErrorStatusString)[status]);
868 }
869
870 static void flac_open(u8_t sample_size, u8_t sample_rate, u8_t channels, u8_t endianness) {
871 @@ -219,7 +219,7 @@ static decode_state flac_decode(void) {
872 FLAC__StreamDecoderState state = FLAC(f, stream_decoder_get_state, f->decoder);
873
874 if (!ok && state != FLAC__STREAM_DECODER_END_OF_STREAM) {
875 - LOG_INFO("flac error: %s", FLAC_A(f, StreamDecoderStateString)[state]);
876 + LOG_SQ_INFO("flac error: %s", FLAC_A(f, StreamDecoderStateString)[state]);
877 };
878
879 if (state == FLAC__STREAM_DECODER_END_OF_STREAM) {
880 @@ -237,7 +237,7 @@ static bool load_flac() {
881 char *err;
882
883 if (!handle) {
884 - LOG_INFO("dlerror: %s", dlerror());
885 + LOG_SQ_INFO("dlerror: %s", dlerror());
886 return false;
887 }
888
889 @@ -251,11 +251,11 @@ static bool load_flac() {
890 f->FLAC__stream_decoder_get_state = dlsym(handle, "FLAC__stream_decoder_get_state");
891
892 if ((err = dlerror()) != NULL) {
893 - LOG_INFO("dlerror: %s", err);
894 + LOG_SQ_INFO("dlerror: %s", err);
895 return false;
896 }
897
898 - LOG_INFO("loaded "LIBFLAC);
899 + LOG_SQ_INFO("loaded "LIBFLAC);
900 #endif
901
902 return true;
903 @@ -283,6 +283,6 @@ struct codec *register_flac(void) {
904 return NULL;
905 }
906
907 - LOG_INFO("using flac to decode flc");
908 + LOG_SQ_INFO("using flac to decode flc");
909 return &ret;
910 }
911 --- squeezelite-1.8.orig/ir.c
912 +++ squeezelite-1.8/ir.c
913 @@ -115,7 +115,7 @@ static u32_t ir_key_map(const char *c, c
914 if (keymap[i].repeat || !strcmp(r, "00")) {
915 return keymap[i].code;
916 }
917 - LOG_DEBUG("repeat suppressed");
918 + LOG_SQ_DEBUG("repeat suppressed");
919 break;
920 }
921 }
922 @@ -139,7 +139,7 @@ static void *ir_thread() {
923 while (LIRC(i, code2char, config, code, &c) == 0 && c != NULL) {
924 ir_code = ir_cmd_map(c);
925 if (ir_code) {
926 - LOG_DEBUG("ir cmd: %s -> %x", c, ir_code);
927 + LOG_SQ_DEBUG("ir cmd: %s -> %x", c, ir_code);
928 }
929 }
930 }
931 @@ -153,14 +153,14 @@ static void *ir_thread() {
932 b = strtok(NULL, " \n"); // key name
933 if (r && b) {
934 ir_code = ir_key_map(b, r);
935 - LOG_DEBUG("ir lirc: %s [%s] -> %x", b, r, ir_code);
936 + LOG_SQ_DEBUG("ir lirc: %s [%s] -> %x", b, r, ir_code);
937 }
938 }
939
940 if (ir_code) {
941 LOCK_I;
942 if (ir.code) {
943 - LOG_DEBUG("code dropped");
944 + LOG_SQ_DEBUG("code dropped");
945 }
946 ir.code = ir_code;
947 ir.ts = now;
948 @@ -180,7 +180,7 @@ static bool load_lirc() {
949 char *err;
950
951 if (!handle) {
952 - LOG_INFO("dlerror: %s", dlerror());
953 + LOG_SQ_INFO("dlerror: %s", dlerror());
954 return false;
955 }
956
957 @@ -192,11 +192,11 @@ static bool load_lirc() {
958 i->lirc_code2char = dlsym(handle, "lirc_code2char");
959
960 if ((err = dlerror()) != NULL) {
961 - LOG_INFO("dlerror: %s", err);
962 + LOG_SQ_INFO("dlerror: %s", err);
963 return false;
964 }
965
966 - LOG_INFO("loaded "LIBLIRC);
967 + LOG_SQ_INFO("loaded "LIBLIRC);
968 return true;
969 }
970 #endif
971 @@ -215,7 +215,7 @@ void ir_init(log_level level, char *lirc
972
973 if (fd > 0) {
974 if (LIRC(i, readconfig,lircrc, &config, NULL) != 0) {
975 - LOG_WARN("error reading config: %s", lircrc);
976 + LOG_SQ_WARN("error reading config: %s", lircrc);
977 }
978
979 mutex_create(ir.mutex);
980 @@ -227,7 +227,7 @@ void ir_init(log_level level, char *lirc
981 pthread_attr_destroy(&attr);
982
983 } else {
984 - LOG_WARN("failed to connect to lircd - ir processing disabled");
985 + LOG_SQ_WARN("failed to connect to lircd - ir processing disabled");
986 }
987 }
988
989 --- squeezelite-1.8.orig/mad.c
990 +++ squeezelite-1.8/mad.c
991 @@ -107,7 +107,7 @@ static unsigned _check_id3_tag(size_t by
992 // size is encoded as syncsafe integer, add 10 if footer present
993 if (*(ptr+6) < 0x80 && *(ptr+7) < 0x80 && *(ptr+8) < 0x80 && *(ptr+9) < 0x80) {
994 size = 10 + (*(ptr+6) << 21) + (*(ptr+7) << 14) + (*(ptr+8) << 7) + *(ptr+9) + ((*(ptr+5) & 0x10) ? 10 : 0);
995 - LOG_DEBUG("id3.2 tag len: %u", size);
996 + LOG_SQ_DEBUG("id3.2 tag len: %u", size);
997 }
998 }
999
1000 @@ -156,7 +156,7 @@ static void _check_lame_header(size_t by
1001 m->samples = frame_count * 1152 - enc_delay - enc_padding;
1002 m->padding = enc_padding;
1003
1004 - LOG_INFO("gapless: skip: %u samples: " FMT_u64 " delay: %u padding: %u", m->skip, m->samples, enc_delay, enc_padding);
1005 + LOG_SQ_INFO("gapless: skip: %u samples: " FMT_u64 " delay: %u padding: %u", m->skip, m->samples, enc_delay, enc_padding);
1006 }
1007 }
1008
1009 @@ -174,7 +174,7 @@ static decode_state mad_decode(void) {
1010 }
1011 if (m->consume) {
1012 u32_t consume = min(m->consume, bytes);
1013 - LOG_DEBUG("consume: %u of %u", consume, m->consume);
1014 + LOG_SQ_DEBUG("consume: %u of %u", consume, m->consume);
1015 _buf_inc_readp(streambuf, consume);
1016 m->consume -= consume;
1017 UNLOCK_S;
1018 @@ -200,7 +200,7 @@ static decode_state mad_decode(void) {
1019
1020 if (stream.state <= DISCONNECT && _buf_used(streambuf) == 0) {
1021 eos = true;
1022 - LOG_DEBUG("end of stream");
1023 + LOG_SQ_DEBUG("end of stream");
1024 memset(m->readbuf + m->readbuf_len, 0, MAD_BUFFER_GUARD);
1025 m->readbuf_len += MAD_BUFFER_GUARD;
1026 }
1027 @@ -222,12 +222,12 @@ static decode_state mad_decode(void) {
1028 } else if (eos && (m->stream.error == MAD_ERROR_BUFLEN || m->stream.error == MAD_ERROR_LOSTSYNC)) {
1029 ret = DECODE_COMPLETE;
1030 } else if (!MAD_RECOVERABLE(m->stream.error)) {
1031 - LOG_INFO("mad_frame_decode error: %s - stopping decoder", MAD(m, stream_errorstr, &m->stream));
1032 + LOG_SQ_INFO("mad_frame_decode error: %s - stopping decoder", MAD(m, stream_errorstr, &m->stream));
1033 ret = DECODE_COMPLETE;
1034 } else {
1035 if (m->stream.error != m->last_error) {
1036 // suppress repeat error messages
1037 - LOG_DEBUG("mad_frame_decode error: %s", MAD(m, stream_errorstr, &m->stream));
1038 + LOG_SQ_DEBUG("mad_frame_decode error: %s", MAD(m, stream_errorstr, &m->stream));
1039 }
1040 ret = DECODE_RUNNING;
1041 }
1042 @@ -239,7 +239,7 @@ static decode_state mad_decode(void) {
1043
1044 if (decode.new_stream) {
1045 LOCK_O;
1046 - LOG_INFO("setting track_start");
1047 + LOG_SQ_INFO("setting track_start");
1048 output.next_sample_rate = decode_newstream(m->synth.pcm.samplerate, output.supported_rates);
1049 IF_DSD( output.next_dop = false; )
1050 output.track_start = outputbuf->writep;
1051 @@ -258,7 +258,7 @@ static decode_state mad_decode(void) {
1052 );
1053
1054 if (m->synth.pcm.length > max_frames) {
1055 - LOG_WARN("too many samples - dropping samples");
1056 + LOG_SQ_WARN("too many samples - dropping samples");
1057 m->synth.pcm.length = max_frames;
1058 }
1059
1060 @@ -268,7 +268,7 @@ static decode_state mad_decode(void) {
1061
1062 if (m->skip) {
1063 u32_t skip = min(m->skip, frames);
1064 - LOG_DEBUG("gapless: skipping %u frames at start", skip);
1065 + LOG_SQ_DEBUG("gapless: skipping %u frames at start", skip);
1066 frames -= skip;
1067 m->skip -= skip;
1068 iptrl += skip;
1069 @@ -277,14 +277,14 @@ static decode_state mad_decode(void) {
1070
1071 if (m->samples) {
1072 if (m->samples < frames) {
1073 - LOG_DEBUG("gapless: trimming %u frames from end", frames - m->samples);
1074 + LOG_SQ_DEBUG("gapless: trimming %u frames from end", frames - m->samples);
1075 frames = (size_t)m->samples;
1076 }
1077 m->samples -= frames;
1078 if (m->samples > 0 && eos && !(m->stream.next_frame[0] == 0xff && (m->stream.next_frame[1] & 0xf0) == 0xf0)) {
1079 // this is the last frame to be decoded, but more samples expected so we must have skipped, remove padding
1080 // note this only works if the padding is less than one frame of 1152 bytes otherswise some gap will remain
1081 - LOG_DEBUG("gapless: early end - trimming padding from end");
1082 + LOG_SQ_DEBUG("gapless: early end - trimming padding from end");
1083 if (frames >= m->padding) {
1084 frames -= m->padding;
1085 } else {
1086 @@ -294,7 +294,7 @@ static decode_state mad_decode(void) {
1087 }
1088 }
1089
1090 - LOG_SDEBUG("write %u frames", frames);
1091 + LOG_SQ_SDEBUG("write %u frames", frames);
1092
1093 while (frames > 0) {
1094 size_t f, count;
1095 @@ -361,7 +361,7 @@ static bool load_mad() {
1096 char *err;
1097
1098 if (!handle) {
1099 - LOG_INFO("dlerror: %s", dlerror());
1100 + LOG_SQ_INFO("dlerror: %s", dlerror());
1101 return false;
1102 }
1103
1104 @@ -376,11 +376,11 @@ static bool load_mad() {
1105 m->mad_stream_errorstr = dlsym(handle, "mad_stream_errorstr");
1106
1107 if ((err = dlerror()) != NULL) {
1108 - LOG_INFO("dlerror: %s", err);
1109 + LOG_SQ_INFO("dlerror: %s", err);
1110 return false;
1111 }
1112
1113 - LOG_INFO("loaded "LIBMAD);
1114 + LOG_SQ_INFO("loaded "LIBMAD);
1115 #endif
1116
1117 return true;
1118 @@ -409,6 +409,6 @@ struct codec *register_mad(void) {
1119 return NULL;
1120 }
1121
1122 - LOG_INFO("using mad to decode mp3");
1123 + LOG_SQ_INFO("using mad to decode mp3");
1124 return &ret;
1125 }
1126 --- squeezelite-1.8.orig/main.c
1127 +++ squeezelite-1.8/main.c
1128 @@ -339,7 +339,7 @@ int main(int argc, char **argv) {
1129 int byte = 0;
1130 char *tmp;
1131 if (!strncmp(optarg, "00:04:20", 8)) {
1132 - LOG_ERROR("ignoring mac address from hardware player range 00:04:20:**:**:**");
1133 + LOG_SQ_ERROR("ignoring mac address from hardware player range 00:04:20:**:**:**");
1134 } else {
1135 char *t = strtok(optarg, ":");
1136 while (t && byte < 6) {
1137 --- squeezelite-1.8.orig/mpg.c
1138 +++ squeezelite-1.8/mpg.c
1139 @@ -121,7 +121,7 @@ static decode_state mpg_decode(void) {
1140
1141 MPG123(m, getformat, m->h, &rate, &channels, &enc);
1142
1143 - LOG_INFO("setting track_start");
1144 + LOG_SQ_INFO("setting track_start");
1145 LOCK_O_not_direct;
1146 output.next_sample_rate = decode_newstream(rate, output.supported_rates);
1147 IF_DSD( output.next_dop = false; )
1148 @@ -131,7 +131,7 @@ static decode_state mpg_decode(void) {
1149 UNLOCK_O_not_direct;
1150
1151 } else {
1152 - LOG_WARN("format change mid stream - not supported");
1153 + LOG_SQ_WARN("format change mid stream - not supported");
1154 }
1155 }
1156
1157 @@ -159,18 +159,18 @@ static decode_state mpg_decode(void) {
1158
1159 UNLOCK_O_direct;
1160
1161 - LOG_SDEBUG("write %u frames", size / BYTES_PER_FRAME);
1162 + LOG_SQ_SDEBUG("write %u frames", size / BYTES_PER_FRAME);
1163
1164 if (ret == MPG123_DONE || (bytes == 0 && size == 0 && stream.state <= DISCONNECT)) {
1165 UNLOCK_S;
1166 - LOG_INFO("stream complete");
1167 + LOG_SQ_INFO("stream complete");
1168 return DECODE_COMPLETE;
1169 }
1170
1171 UNLOCK_S;
1172
1173 if (ret == MPG123_ERR) {
1174 - LOG_WARN("Error");
1175 + LOG_SQ_WARN("Error");
1176 return DECODE_COMPLETE;
1177 }
1178
1179 @@ -190,7 +190,7 @@ static void mpg_open(u8_t size, u8_t rat
1180 m->h = MPG123(m, new, NULL, &err);
1181
1182 if (m->h == NULL) {
1183 - LOG_WARN("new error: %s", MPG123(m, plain_strerror, err));
1184 + LOG_SQ_WARN("new error: %s", MPG123(m, plain_strerror, err));
1185 }
1186
1187 // restrict output to 32bit or 16bit signed 2 channel based on library capability
1188 @@ -203,7 +203,7 @@ static void mpg_open(u8_t size, u8_t rat
1189 err = MPG123(m, open_feed, m->h);
1190
1191 if (err) {
1192 - LOG_WARN("open feed error: %s", MPG123(m, plain_strerror, err));
1193 + LOG_SQ_WARN("open feed error: %s", MPG123(m, plain_strerror, err));
1194 }
1195 }
1196
1197 @@ -218,7 +218,7 @@ static bool load_mpg() {
1198 char *err;
1199
1200 if (!handle) {
1201 - LOG_INFO("dlerror: %s", dlerror());
1202 + LOG_SQ_INFO("dlerror: %s", dlerror());
1203 return false;
1204 }
1205
1206 @@ -235,11 +235,11 @@ static bool load_mpg() {
1207 m->mpg123_plain_strerror = dlsym(handle, "mpg123_plain_strerror");
1208
1209 if ((err = dlerror()) != NULL) {
1210 - LOG_INFO("dlerror: %s", err);
1211 + LOG_SQ_INFO("dlerror: %s", err);
1212 return false;
1213 }
1214
1215 - LOG_INFO("loaded "LIBMPG);
1216 + LOG_SQ_INFO("loaded "LIBMPG);
1217 #endif
1218
1219 return true;
1220 @@ -271,6 +271,6 @@ struct codec *register_mpg(void) {
1221
1222 m->use16bit = MPG123(m, feature, MPG123_FEATURE_OUTPUT_32BIT);
1223
1224 - LOG_INFO("using mpg to decode mp3");
1225 + LOG_SQ_INFO("using mpg to decode mp3");
1226 return &ret;
1227 }
1228 --- squeezelite-1.8.orig/output.c
1229 +++ squeezelite-1.8/output.c
1230 @@ -58,7 +58,7 @@ frames_t _output_frames(frames_t avail)
1231 // start when threshold met
1232 if (output.state == OUTPUT_BUFFER && frames > output.threshold * output.next_sample_rate / 100 && frames > output.start_frames) {
1233 output.state = OUTPUT_RUNNING;
1234 - LOG_INFO("start buffer frames: %u", frames);
1235 + LOG_SQ_INFO("start buffer frames: %u", frames);
1236 wake_controller();
1237 }
1238
1239 @@ -66,7 +66,7 @@ frames_t _output_frames(frames_t avail)
1240 if (output.state == OUTPUT_SKIP_FRAMES) {
1241 if (frames > 0) {
1242 frames_t skip = min(frames, output.skip_frames);
1243 - LOG_INFO("skip %u of %u frames", skip, output.skip_frames);
1244 + LOG_SQ_INFO("skip %u of %u frames", skip, output.skip_frames);
1245 frames -= skip;
1246 output.frames_played += skip;
1247 while (skip > 0) {
1248 @@ -80,7 +80,7 @@ frames_t _output_frames(frames_t avail)
1249
1250 // pause frames - play silence for required frames
1251 if (output.state == OUTPUT_PAUSE_FRAMES) {
1252 - LOG_INFO("pause %u frames", output.pause_frames);
1253 + LOG_SQ_INFO("pause %u frames", output.pause_frames);
1254 if (output.pause_frames == 0) {
1255 output.state = OUTPUT_RUNNING;
1256 } else {
1257 @@ -110,7 +110,7 @@ frames_t _output_frames(frames_t avail)
1258 frames = min(avail, MAX_SILENCE_FRAMES);
1259 }
1260
1261 - LOG_SDEBUG("avail: %d frames: %d silence: %d", avail, frames, silence);
1262 + LOG_SQ_SDEBUG("avail: %d frames: %d silence: %d", avail, frames, silence);
1263 frames = min(frames, avail);
1264 size = frames;
1265
1266 @@ -143,7 +143,7 @@ frames_t _output_frames(frames_t avail)
1267 output.delay_active = false; // second delay - process track start
1268 }
1269 }
1270 - LOG_INFO("track start sample rate: %u replay_gain: %u", output.next_sample_rate, output.next_replay_gain);
1271 + LOG_SQ_INFO("track start sample rate: %u replay_gain: %u", output.next_sample_rate, output.next_replay_gain);
1272 output.frames_played = 0;
1273 output.track_started = true;
1274 output.track_start_time = gettime_ms();
1275 @@ -171,7 +171,7 @@ frames_t _output_frames(frames_t avail)
1276 if (output.fade && !silence) {
1277 if (output.fade == FADE_DUE) {
1278 if (output.fade_start == outputbuf->readp) {
1279 - LOG_INFO("fade start reached");
1280 + LOG_SQ_INFO("fade start reached");
1281 output.fade = FADE_ACTIVE;
1282 } else if (output.fade_start > outputbuf->readp) {
1283 cont_frames = min(cont_frames, (output.fade_start - outputbuf->readp) / BYTES_PER_FRAME);
1284 @@ -185,7 +185,7 @@ frames_t _output_frames(frames_t avail)
1285 (output.fade_end + outputbuf->size - output.fade_start) / BYTES_PER_FRAME;
1286 if (cur_f >= dur_f) {
1287 if (output.fade_mode == FADE_INOUT && output.fade_dir == FADE_DOWN) {
1288 - LOG_INFO("fade down complete, starting fade up");
1289 + LOG_SQ_INFO("fade down complete, starting fade up");
1290 output.fade_dir = FADE_UP;
1291 output.fade_start = outputbuf->readp;
1292 output.fade_end = outputbuf->readp + dur_f * BYTES_PER_FRAME;
1293 @@ -194,17 +194,17 @@ frames_t _output_frames(frames_t avail)
1294 }
1295 cur_f = 0;
1296 } else if (output.fade_mode == FADE_CROSSFADE) {
1297 - LOG_INFO("crossfade complete");
1298 + LOG_SQ_INFO("crossfade complete");
1299 if (_buf_used(outputbuf) >= dur_f * BYTES_PER_FRAME) {
1300 _buf_inc_readp(outputbuf, dur_f * BYTES_PER_FRAME);
1301 - LOG_INFO("skipped crossfaded start");
1302 + LOG_SQ_INFO("skipped crossfaded start");
1303 } else {
1304 - LOG_WARN("unable to skip crossfaded start");
1305 + LOG_SQ_WARN("unable to skip crossfaded start");
1306 }
1307 output.fade = FADE_INACTIVE;
1308 output.current_replay_gain = output.next_replay_gain;
1309 } else {
1310 - LOG_INFO("fade complete");
1311 + LOG_SQ_INFO("fade complete");
1312 output.fade = FADE_INACTIVE;
1313 }
1314 }
1315 @@ -241,7 +241,7 @@ frames_t _output_frames(frames_t avail)
1316 if (output.invert) { gainL = -gainL; gainR = -gainR; }
1317 cross_ptr = (s32_t *)(output.fade_end + cur_f * BYTES_PER_FRAME);
1318 } else {
1319 - LOG_INFO("unable to continue crossfade - too few samples");
1320 + LOG_SQ_INFO("unable to continue crossfade - too few samples");
1321 output.fade = FADE_INACTIVE;
1322 }
1323 }
1324 @@ -270,7 +270,7 @@ frames_t _output_frames(frames_t avail)
1325 }
1326 }
1327
1328 - LOG_SDEBUG("wrote %u frames", frames);
1329 + LOG_SQ_SDEBUG("wrote %u frames", frames);
1330
1331 return frames;
1332 }
1333 @@ -278,7 +278,7 @@ frames_t _output_frames(frames_t avail)
1334 void _checkfade(bool start) {
1335 frames_t bytes;
1336
1337 - LOG_INFO("fade mode: %u duration: %u %s", output.fade_mode, output.fade_secs, start ? "track-start" : "track-end");
1338 + LOG_SQ_INFO("fade mode: %u duration: %u %s", output.fade_mode, output.fade_secs, start ? "track-start" : "track-end");
1339
1340 bytes = output.next_sample_rate * BYTES_PER_FRAME * output.fade_secs;
1341 if (output.fade_mode == FADE_INOUT) {
1342 @@ -287,7 +287,7 @@ void _checkfade(bool start) {
1343
1344 if (start && (output.fade_mode == FADE_IN || (output.fade_mode == FADE_INOUT && _buf_used(outputbuf) == 0))) {
1345 bytes = min(bytes, outputbuf->size - BYTES_PER_FRAME); // shorter than full buffer otherwise start and end align
1346 - LOG_INFO("fade IN: %u frames", bytes / BYTES_PER_FRAME);
1347 + LOG_SQ_INFO("fade IN: %u frames", bytes / BYTES_PER_FRAME);
1348 output.fade = FADE_DUE;
1349 output.fade_dir = FADE_UP;
1350 output.fade_start = outputbuf->writep;
1351 @@ -299,7 +299,7 @@ void _checkfade(bool start) {
1352
1353 if (!start && (output.fade_mode == FADE_OUT || output.fade_mode == FADE_INOUT)) {
1354 bytes = min(_buf_used(outputbuf), bytes);
1355 - LOG_INFO("fade %s: %u frames", output.fade_mode == FADE_INOUT ? "IN-OUT" : "OUT", bytes / BYTES_PER_FRAME);
1356 + LOG_SQ_INFO("fade %s: %u frames", output.fade_mode == FADE_INOUT ? "IN-OUT" : "OUT", bytes / BYTES_PER_FRAME);
1357 output.fade = FADE_DUE;
1358 output.fade_dir = FADE_DOWN;
1359 output.fade_start = outputbuf->writep - bytes;
1360 @@ -312,12 +312,12 @@ void _checkfade(bool start) {
1361 if (start && output.fade_mode == FADE_CROSSFADE) {
1362 if (_buf_used(outputbuf) != 0) {
1363 if (output.next_sample_rate != output.current_sample_rate) {
1364 - LOG_INFO("crossfade disabled as sample rates differ");
1365 + LOG_SQ_INFO("crossfade disabled as sample rates differ");
1366 return;
1367 }
1368 bytes = min(bytes, _buf_used(outputbuf)); // max of current remaining samples from previous track
1369 bytes = min(bytes, (frames_t)(outputbuf->size * 0.9)); // max of 90% of outputbuf as we consume additional buffer during crossfade
1370 - LOG_INFO("CROSSFADE: %u frames", bytes / BYTES_PER_FRAME);
1371 + LOG_SQ_INFO("CROSSFADE: %u frames", bytes / BYTES_PER_FRAME);
1372 output.fade = FADE_DUE;
1373 output.fade_dir = FADE_CROSS;
1374 output.fade_start = outputbuf->writep - bytes;
1375 @@ -328,7 +328,7 @@ void _checkfade(bool start) {
1376 output.track_start = output.fade_start;
1377 } else if (outputbuf->size == OUTPUTBUF_SIZE && outputbuf->readp == outputbuf->buf) {
1378 // if default setting used and nothing in buffer attempt to resize to provide full crossfade support
1379 - LOG_INFO("resize outputbuf for crossfade");
1380 + LOG_SQ_INFO("resize outputbuf for crossfade");
1381 _buf_resize(outputbuf, OUTPUTBUF_SIZE_CROSSFADE);
1382 #if LINUX || FREEBSD
1383 touch_memory(outputbuf->buf, outputbuf->size);
1384 @@ -343,17 +343,17 @@ void output_init_common(log_level level,
1385 loglevel = level;
1386
1387 output_buf_size = output_buf_size - (output_buf_size % BYTES_PER_FRAME);
1388 - LOG_DEBUG("outputbuf size: %u", output_buf_size);
1389 + LOG_SQ_DEBUG("outputbuf size: %u", output_buf_size);
1390
1391 buf_init(outputbuf, output_buf_size);
1392 if (!outputbuf->buf) {
1393 - LOG_ERROR("unable to malloc output buffer");
1394 + LOG_SQ_ERROR("unable to malloc output buffer");
1395 exit(0);
1396 }
1397
1398 silencebuf = malloc(MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
1399 if (!silencebuf) {
1400 - LOG_ERROR("unable to malloc silence buffer");
1401 + LOG_SQ_ERROR("unable to malloc silence buffer");
1402 exit(0);
1403 }
1404 memset(silencebuf, 0, MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
1405 @@ -361,13 +361,13 @@ void output_init_common(log_level level,
1406 IF_DSD(
1407 silencebuf_dop = malloc(MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
1408 if (!silencebuf_dop) {
1409 - LOG_ERROR("unable to malloc silence dop buffer");
1410 + LOG_SQ_ERROR("unable to malloc silence dop buffer");
1411 exit(0);
1412 }
1413 dop_silence_frames((u32_t *)silencebuf_dop, MAX_SILENCE_FRAMES);
1414 )
1415
1416 - LOG_DEBUG("idle timeout: %u", idle);
1417 + LOG_SQ_DEBUG("idle timeout: %u", idle);
1418
1419 output.state = idle ? OUTPUT_OFF: OUTPUT_STOPPED;
1420 output.device = device;
1421 @@ -378,7 +378,7 @@ void output_init_common(log_level level,
1422
1423 if (!rates[0]) {
1424 if (!test_open(output.device, output.supported_rates)) {
1425 - LOG_ERROR("unable to open output device");
1426 + LOG_SQ_ERROR("unable to open output device");
1427 exit(0);
1428 }
1429 } else {
1430 @@ -407,7 +407,7 @@ void output_init_common(log_level level,
1431 sprintf(s, "%d ", output.supported_rates[i]);
1432 strcat(rates_buf, s);
1433 }
1434 - LOG_INFO("supported rates: %s", rates_buf);
1435 + LOG_SQ_INFO("supported rates: %s", rates_buf);
1436 }
1437 }
1438
1439 @@ -420,7 +420,7 @@ void output_close_common(void) {
1440 }
1441
1442 void output_flush(void) {
1443 - LOG_INFO("flush output buffer");
1444 + LOG_SQ_INFO("flush output buffer");
1445 buf_flush(outputbuf);
1446 LOCK;
1447 output.fade = FADE_INACTIVE;
1448 --- squeezelite-1.8.orig/output_alsa.c
1449 +++ squeezelite-1.8/output_alsa.c
1450 @@ -103,24 +103,24 @@ void list_mixers(const char *output_devi
1451 snd_mixer_elem_t *elem;
1452 snd_mixer_selem_id_alloca(&sid);
1453
1454 - LOG_INFO("listing mixers for: %s", output_device);
1455 + LOG_SQ_INFO("listing mixers for: %s", output_device);
1456
1457 if ((err = snd_mixer_open(&handle, 0)) < 0) {
1458 - LOG_ERROR("open error: %s", snd_strerror(err));
1459 + LOG_SQ_ERROR("open error: %s", snd_strerror(err));
1460 return;
1461 }
1462 if ((err = snd_mixer_attach(handle, output_device)) < 0) {
1463 - LOG_ERROR("attach error: %s", snd_strerror(err));
1464 + LOG_SQ_ERROR("attach error: %s", snd_strerror(err));
1465 snd_mixer_close(handle);
1466 return;
1467 }
1468 if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) {
1469 - LOG_ERROR("register error: %s", snd_strerror(err));
1470 + LOG_SQ_ERROR("register error: %s", snd_strerror(err));
1471 snd_mixer_close(handle);
1472 return;
1473 }
1474 if ((err = snd_mixer_load(handle)) < 0) {
1475 - LOG_ERROR("load error: %s", snd_strerror(err));
1476 + LOG_SQ_ERROR("load error: %s", snd_strerror(err));
1477 snd_mixer_close(handle);
1478 return;
1479 }
1480 @@ -152,21 +152,21 @@ static void set_mixer(const char *device
1481 snd_mixer_elem_t* elem;
1482
1483 if ((err = snd_mixer_open(&handle, 0)) < 0) {
1484 - LOG_ERROR("open error: %s", snd_strerror(err));
1485 + LOG_SQ_ERROR("open error: %s", snd_strerror(err));
1486 return;
1487 }
1488 if ((err = snd_mixer_attach(handle, device)) < 0) {
1489 - LOG_ERROR("attach error: %s", snd_strerror(err));
1490 + LOG_SQ_ERROR("attach error: %s", snd_strerror(err));
1491 snd_mixer_close(handle);
1492 return;
1493 }
1494 if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) {
1495 - LOG_ERROR("register error: %s", snd_strerror(err));
1496 + LOG_SQ_ERROR("register error: %s", snd_strerror(err));
1497 snd_mixer_close(handle);
1498 return;
1499 }
1500 if ((err = snd_mixer_load(handle)) < 0) {
1501 - LOG_ERROR("load error: %s", snd_strerror(err));
1502 + LOG_SQ_ERROR("load error: %s", snd_strerror(err));
1503 snd_mixer_close(handle);
1504 return;
1505 }
1506 @@ -177,7 +177,7 @@ static void set_mixer(const char *device
1507 snd_mixer_selem_id_set_name(sid, mixer);
1508
1509 if ((elem = snd_mixer_find_selem(handle, sid)) == NULL) {
1510 - LOG_ERROR("error find selem %s", mixer);
1511 + LOG_SQ_ERROR("error find selem %s", mixer);
1512 snd_mixer_close(handle);
1513 return;
1514 }
1515 @@ -191,7 +191,7 @@ static void set_mixer(const char *device
1516 if (err < 0 || max - min < 1000) {
1517 // unable to get db range or range is less than 10dB - ignore and set using raw values
1518 if ((err = snd_mixer_selem_get_playback_volume_range(elem, &min, &max)) < 0) {
1519 - LOG_ERROR("unable to get volume raw range");
1520 + LOG_SQ_ERROR("unable to get volume raw range");
1521 } else {
1522 long lraw, rraw;
1523 if (setmax) {
1524 @@ -200,17 +200,17 @@ static void set_mixer(const char *device
1525 lraw = ((ldB > -MINVOL_DB ? MINVOL_DB + floor(ldB) : 0) / MINVOL_DB * (max-min)) + min;
1526 rraw = ((rdB > -MINVOL_DB ? MINVOL_DB + floor(rdB) : 0) / MINVOL_DB * (max-min)) + min;
1527 }
1528 - LOG_DEBUG("setting vol raw [%ld..%ld]", min, max);
1529 + LOG_SQ_DEBUG("setting vol raw [%ld..%ld]", min, max);
1530 if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, lraw)) < 0) {
1531 - LOG_ERROR("error setting left volume: %s", snd_strerror(err));
1532 + LOG_SQ_ERROR("error setting left volume: %s", snd_strerror(err));
1533 }
1534 if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, rraw)) < 0) {
1535 - LOG_ERROR("error setting right volume: %s", snd_strerror(err));
1536 + LOG_SQ_ERROR("error setting right volume: %s", snd_strerror(err));
1537 }
1538 }
1539 } else {
1540 // set db directly
1541 - LOG_DEBUG("setting vol dB [%ld..%ld]", min, max);
1542 + LOG_SQ_DEBUG("setting vol dB [%ld..%ld]", min, max);
1543 if (setmax) {
1544 // set to 0dB if available as this should be max volume for music recored at max pcm values
1545 if (max >= 0 && min <= 0) {
1546 @@ -220,21 +220,21 @@ static void set_mixer(const char *device
1547 }
1548 }
1549 if ((err = snd_mixer_selem_set_playback_dB(elem, SND_MIXER_SCHN_FRONT_LEFT, 100 * ldB, 1)) < 0) {
1550 - LOG_ERROR("error setting left volume: %s", snd_strerror(err));
1551 + LOG_SQ_ERROR("error setting left volume: %s", snd_strerror(err));
1552 }
1553 if ((err = snd_mixer_selem_set_playback_dB(elem, SND_MIXER_SCHN_FRONT_RIGHT, 100 * rdB, 1)) < 0) {
1554 - LOG_ERROR("error setting right volume: %s", snd_strerror(err));
1555 + LOG_SQ_ERROR("error setting right volume: %s", snd_strerror(err));
1556 }
1557 }
1558
1559 if ((err = snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, &nleft)) < 0) {
1560 - LOG_ERROR("error getting left vol: %s", snd_strerror(err));
1561 + LOG_SQ_ERROR("error getting left vol: %s", snd_strerror(err));
1562 }
1563 if ((err = snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, &nright)) < 0) {
1564 - LOG_ERROR("error getting right vol: %s", snd_strerror(err));
1565 + LOG_SQ_ERROR("error getting right vol: %s", snd_strerror(err));
1566 }
1567
1568 - LOG_DEBUG("%s left: %3.1fdB -> %ld right: %3.1fdB -> %ld", mixer, ldB, nleft, rdB, nright);
1569 + LOG_SQ_DEBUG("%s left: %3.1fdB -> %ld right: %3.1fdB -> %ld", mixer, ldB, nleft, rdB, nright);
1570
1571 snd_mixer_close(handle);
1572 }
1573 @@ -243,7 +243,7 @@ void set_volume(unsigned left, unsigned
1574 float ldB, rdB;
1575
1576 if (!alsa.volume_mixer_name) {
1577 - LOG_DEBUG("setting internal gain left: %u right: %u", left, right);
1578 + LOG_SQ_DEBUG("setting internal gain left: %u right: %u", left, right);
1579 LOCK;
1580 output.gainL = left;
1581 output.gainR = right;
1582 @@ -278,7 +278,7 @@ static void *alsa_error_handler(const ch
1583 static void alsa_close(void) {
1584 int err;
1585 if ((err = snd_pcm_close(pcmp)) < 0) {
1586 - LOG_INFO("snd_pcm_close error: %s", snd_strerror(err));
1587 + LOG_SQ_INFO("snd_pcm_close error: %s", snd_strerror(err));
1588 }
1589 }
1590
1591 @@ -291,13 +291,13 @@ bool test_open(const char *device, unsig
1592
1593 // open device
1594 if ((err = snd_pcm_open(&pcm, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
1595 - LOG_ERROR("playback open error: %s", snd_strerror(err));
1596 + LOG_SQ_ERROR("playback open error: %s", snd_strerror(err));
1597 return false;
1598 }
1599
1600 // get max params
1601 if ((err = snd_pcm_hw_params_any(pcm, hw_params)) < 0) {
1602 - LOG_ERROR("hwparam init error: %s", snd_strerror(err));
1603 + LOG_SQ_ERROR("hwparam init error: %s", snd_strerror(err));
1604 return false;
1605 }
1606
1607 @@ -312,7 +312,7 @@ bool test_open(const char *device, unsig
1608 }
1609
1610 if ((err = snd_pcm_close(pcm)) < 0) {
1611 - LOG_ERROR("snd_pcm_close error: %s", snd_strerror(err));
1612 + LOG_SQ_ERROR("snd_pcm_close error: %s", snd_strerror(err));
1613 return false;
1614 }
1615
1616 @@ -328,7 +328,7 @@ static bool pcm_probe(const char *device
1617 }
1618
1619 if ((err = snd_pcm_close(pcm)) < 0) {
1620 - LOG_ERROR("snd_pcm_close error: %s", snd_strerror(err));
1621 + LOG_SQ_ERROR("snd_pcm_close error: %s", snd_strerror(err));
1622 }
1623
1624 return true;
1625 @@ -348,24 +348,24 @@ static int alsa_open(const char *device,
1626 strcpy(alsa.device, device);
1627
1628 if (strlen(device) > MAX_DEVICE_LEN - 4 - 1) {
1629 - LOG_ERROR("device name too long: %s", device);
1630 + LOG_SQ_ERROR("device name too long: %s", device);
1631 return -1;
1632 }
1633
1634 - LOG_INFO("opening device at: %u", sample_rate);
1635 + LOG_SQ_INFO("opening device at: %u", sample_rate);
1636
1637 bool retry;
1638 do {
1639 // open device
1640 if ((err = snd_pcm_open(&pcmp, alsa.device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
1641 - LOG_ERROR("playback open error: %s", snd_strerror(err));
1642 + LOG_SQ_ERROR("playback open error: %s", snd_strerror(err));
1643 return err;
1644 }
1645
1646 // init params
1647 memset(hw_params, 0, snd_pcm_hw_params_sizeof());
1648 if ((err = snd_pcm_hw_params_any(pcmp, hw_params)) < 0) {
1649 - LOG_ERROR("hwparam init error: %s", snd_strerror(err));
1650 + LOG_SQ_ERROR("hwparam init error: %s", snd_strerror(err));
1651 return err;
1652 }
1653
1654 @@ -374,7 +374,7 @@ static int alsa_open(const char *device,
1655 retry = false;
1656
1657 if ((err = snd_pcm_hw_params_set_rate_resample(pcmp, hw_params, !hw)) < 0) {
1658 - LOG_ERROR("resampling setup failed: %s", snd_strerror(err));
1659 + LOG_SQ_ERROR("resampling setup failed: %s", snd_strerror(err));
1660 return err;
1661 }
1662
1663 @@ -382,7 +382,7 @@ static int alsa_open(const char *device,
1664 if (hw) {
1665 strcpy(alsa.device + 4, device);
1666 memcpy(alsa.device, "plug", 4);
1667 - LOG_INFO("reopening device %s in plug mode as %s for resampling", device, alsa.device);
1668 + LOG_SQ_INFO("reopening device %s in plug mode as %s for resampling", device, alsa.device);
1669 snd_pcm_close(pcmp);
1670 retry = true;
1671 }
1672 @@ -393,7 +393,7 @@ static int alsa_open(const char *device,
1673 // set access
1674 if (!alsa.mmap || snd_pcm_hw_params_set_access(pcmp, hw_params, SND_PCM_ACCESS_MMAP_INTERLEAVED) < 0) {
1675 if ((err = snd_pcm_hw_params_set_access(pcmp, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) {
1676 - LOG_ERROR("access type not available: %s", snd_strerror(err));
1677 + LOG_SQ_ERROR("access type not available: %s", snd_strerror(err));
1678 return err;
1679 }
1680 alsa.mmap = false;
1681 @@ -403,17 +403,17 @@ static int alsa_open(const char *device,
1682 snd_pcm_format_t *fmt = alsa.format ? &alsa.format : (snd_pcm_format_t *)fmts;
1683 do {
1684 if (snd_pcm_hw_params_set_format(pcmp, hw_params, *fmt) >= 0) {
1685 - LOG_INFO("opened device %s using format: %s sample rate: %u mmap: %u", alsa.device, snd_pcm_format_name(*fmt), sample_rate, alsa.mmap);
1686 + LOG_SQ_INFO("opened device %s using format: %s sample rate: %u mmap: %u", alsa.device, snd_pcm_format_name(*fmt), sample_rate, alsa.mmap);
1687 alsa.format = *fmt;
1688 break;
1689 }
1690 if (alsa.format) {
1691 - LOG_ERROR("unable to open audio device requested format: %s", snd_pcm_format_name(alsa.format));
1692 + LOG_SQ_ERROR("unable to open audio device requested format: %s", snd_pcm_format_name(alsa.format));
1693 return -1;
1694 }
1695 ++fmt;
1696 if (*fmt == SND_PCM_FORMAT_UNKNOWN) {
1697 - LOG_ERROR("unable to open audio device with any supported format");
1698 + LOG_SQ_ERROR("unable to open audio device with any supported format");
1699 return -1;
1700 }
1701 } while (*fmt != SND_PCM_FORMAT_UNKNOWN);
1702 @@ -434,7 +434,7 @@ static int alsa_open(const char *device,
1703
1704 // set channels
1705 if ((err = snd_pcm_hw_params_set_channels (pcmp, hw_params, 2)) < 0) {
1706 - LOG_ERROR("channel count not available: %s", snd_strerror(err));
1707 + LOG_SQ_ERROR("channel count not available: %s", snd_strerror(err));
1708 return err;
1709 }
1710
1711 @@ -442,14 +442,14 @@ static int alsa_open(const char *device,
1712 if (alsa_period < 50) {
1713 unsigned count = alsa_period;
1714 if ((err = snd_pcm_hw_params_set_periods_near(pcmp, hw_params, &count, 0)) < 0) {
1715 - LOG_ERROR("unable to set period count %s", snd_strerror(err));
1716 + LOG_SQ_ERROR("unable to set period count %s", snd_strerror(err));
1717 return err;
1718 }
1719 } else {
1720 snd_pcm_uframes_t size = alsa_period;
1721 int dir = 0;
1722 if ((err = snd_pcm_hw_params_set_period_size_near(pcmp, hw_params, &size, &dir)) < 0) {
1723 - LOG_ERROR("unable to set period size %s", snd_strerror(err));
1724 + LOG_SQ_ERROR("unable to set period size %s", snd_strerror(err));
1725 return err;
1726 }
1727 }
1728 @@ -459,30 +459,30 @@ static int alsa_open(const char *device,
1729 unsigned time = alsa_buffer * 1000;
1730 int dir = 0;
1731 if ((err = snd_pcm_hw_params_set_buffer_time_near(pcmp, hw_params, &time, &dir)) < 0) {
1732 - LOG_ERROR("unable to set buffer time %s", snd_strerror(err));
1733 + LOG_SQ_ERROR("unable to set buffer time %s", snd_strerror(err));
1734 return err;
1735 }
1736 } else {
1737 snd_pcm_uframes_t size = alsa_buffer;
1738 if ((err = snd_pcm_hw_params_set_buffer_size_near(pcmp, hw_params, &size)) < 0) {
1739 - LOG_ERROR("unable to set buffer size %s", snd_strerror(err));
1740 + LOG_SQ_ERROR("unable to set buffer size %s", snd_strerror(err));
1741 return err;
1742 }
1743 }
1744
1745 // get period_size
1746 if ((err = snd_pcm_hw_params_get_period_size(hw_params, &alsa.period_size, 0)) < 0) {
1747 - LOG_ERROR("unable to get period size: %s", snd_strerror(err));
1748 + LOG_SQ_ERROR("unable to get period size: %s", snd_strerror(err));
1749 return err;
1750 }
1751
1752 // get buffer_size
1753 if ((err = snd_pcm_hw_params_get_buffer_size(hw_params, &alsa.buffer_size)) < 0) {
1754 - LOG_ERROR("unable to get buffer size: %s", snd_strerror(err));
1755 + LOG_SQ_ERROR("unable to get buffer size: %s", snd_strerror(err));
1756 return err;
1757 }
1758
1759 - LOG_INFO("buffer: %u period: %u -> buffer size: %u period size: %u", alsa_buffer, alsa_period, alsa.buffer_size, alsa.period_size);
1760 + LOG_SQ_INFO("buffer: %u period: %u -> buffer size: %u period size: %u", alsa_buffer, alsa_period, alsa.buffer_size, alsa.period_size);
1761
1762 // ensure we have two buffer sizes of samples before starting output
1763 output.start_frames = alsa.buffer_size * 2;
1764 @@ -492,14 +492,14 @@ static int alsa_open(const char *device,
1765 if (!alsa.mmap && !alsa.write_buf && alsa.format != NATIVE_FORMAT) {
1766 alsa.write_buf = malloc(alsa.buffer_size * BYTES_PER_FRAME);
1767 if (!alsa.write_buf) {
1768 - LOG_ERROR("unable to malloc write_buf");
1769 + LOG_SQ_ERROR("unable to malloc write_buf");
1770 return -1;
1771 }
1772 }
1773
1774 // set params
1775 if ((err = snd_pcm_hw_params(pcmp, hw_params)) < 0) {
1776 - LOG_ERROR("unable to set hw params: %s", snd_strerror(err));
1777 + LOG_SQ_ERROR("unable to set hw params: %s", snd_strerror(err));
1778 return err;
1779 }
1780
1781 @@ -531,7 +531,7 @@ static int _write_frames(frames_t out_fr
1782 snd_pcm_avail_update(pcmp);
1783
1784 if ((err = snd_pcm_mmap_begin(pcmp, &areas, &offset, &alsa_frames)) < 0) {
1785 - LOG_WARN("error from mmap_begin: %s", snd_strerror(err));
1786 + LOG_SQ_WARN("error from mmap_begin: %s", snd_strerror(err));
1787 return -1;
1788 }
1789
1790 @@ -578,7 +578,7 @@ static int _write_frames(frames_t out_fr
1791
1792 snd_pcm_sframes_t w = snd_pcm_mmap_commit(pcmp, offset, out_frames);
1793 if (w < 0 || w != out_frames) {
1794 - LOG_WARN("mmap_commit error");
1795 + LOG_SQ_WARN("mmap_commit error");
1796 return -1;
1797 }
1798
1799 @@ -589,7 +589,7 @@ static int _write_frames(frames_t out_fr
1800 //if (w != -EAGAIN && ((err = snd_pcm_recover(pcmp, w, 1)) < 0)) {
1801 if (((err = snd_pcm_recover(pcmp, w, 1)) < 0)) {
1802 static unsigned recover_count = 0;
1803 - LOG_WARN("recover failed: %s [%u]", snd_strerror(err), ++recover_count);
1804 + LOG_SQ_WARN("recover failed: %s [%u]", snd_strerror(err), ++recover_count);
1805 if (recover_count >= 10) {
1806 recover_count = 0;
1807 alsa_close();
1808 @@ -599,7 +599,7 @@ static int _write_frames(frames_t out_fr
1809 return -1;
1810 } else {
1811 if (w != out_frames) {
1812 - LOG_WARN("writei only wrote %u of %u", w, out_frames);
1813 + LOG_SQ_WARN("writei only wrote %u of %u", w, out_frames);
1814 }
1815 out_frames = w;
1816 }
1817 @@ -628,14 +628,14 @@ static void *output_thread(void *arg) {
1818 // wait until device returns - to allow usb audio devices to be turned off
1819 if (probe_device) {
1820 while (!pcm_probe(output.device)) {
1821 - LOG_DEBUG("waiting for device %s to return", output.device);
1822 + LOG_SQ_DEBUG("waiting for device %s to return", output.device);
1823 sleep(5);
1824 }
1825 probe_device = false;
1826 }
1827
1828 if (!pcmp || alsa.rate != output.current_sample_rate) {
1829 - LOG_INFO("open output device: %s", output.device);
1830 + LOG_SQ_INFO("open output device: %s", output.device);
1831 LOCK;
1832
1833 // FIXME - some alsa hardware requires opening twice for a new sample rate to work
1834 @@ -658,18 +658,18 @@ static void *output_thread(void *arg) {
1835 snd_pcm_state_t state = snd_pcm_state(pcmp);
1836
1837 if (state == SND_PCM_STATE_XRUN) {
1838 - LOG_INFO("XRUN");
1839 + LOG_SQ_INFO("XRUN");
1840 if ((err = snd_pcm_recover(pcmp, -EPIPE, 1)) < 0) {
1841 - LOG_INFO("XRUN recover failed: %s", snd_strerror(err));
1842 + LOG_SQ_INFO("XRUN recover failed: %s", snd_strerror(err));
1843 }
1844 start = true;
1845 continue;
1846 } else if (state == SND_PCM_STATE_SUSPENDED) {
1847 if ((err = snd_pcm_recover(pcmp, -ESTRPIPE, 1)) < 0) {
1848 - LOG_INFO("SUSPEND recover failed: %s", snd_strerror(err));
1849 + LOG_SQ_INFO("SUSPEND recover failed: %s", snd_strerror(err));
1850 }
1851 } else if (state == SND_PCM_STATE_DISCONNECTED) {
1852 - LOG_INFO("Device %s no longer available", output.device);
1853 + LOG_SQ_INFO("Device %s no longer available", output.device);
1854 alsa_close();
1855 pcmp = NULL;
1856 probe_device = true;
1857 @@ -681,13 +681,13 @@ static void *output_thread(void *arg) {
1858 if (avail < 0) {
1859 if ((err = snd_pcm_recover(pcmp, avail, 1)) < 0) {
1860 if (err == -ENODEV) {
1861 - LOG_INFO("Device %s no longer available", output.device);
1862 + LOG_SQ_INFO("Device %s no longer available", output.device);
1863 alsa_close();
1864 pcmp = NULL;
1865 probe_device = true;
1866 continue;
1867 }
1868 - LOG_WARN("recover failed: %s", snd_strerror(err));
1869 + LOG_SQ_WARN("recover failed: %s", snd_strerror(err));
1870 }
1871 start = true;
1872 continue;
1873 @@ -698,13 +698,13 @@ static void *output_thread(void *arg) {
1874 if (alsa.mmap && ((err = snd_pcm_start(pcmp)) < 0)) {
1875 if ((err = snd_pcm_recover(pcmp, err, 1)) < 0) {
1876 if (err == -ENODEV) {
1877 - LOG_INFO("Device %s no longer available", output.device);
1878 + LOG_SQ_INFO("Device %s no longer available", output.device);
1879 alsa_close();
1880 pcmp = NULL;
1881 probe_device = true;
1882 continue;
1883 }
1884 - LOG_INFO("start error: %s", snd_strerror(err));
1885 + LOG_SQ_INFO("start error: %s", snd_strerror(err));
1886 usleep(10000);
1887 }
1888 } else {
1889 @@ -713,7 +713,7 @@ static void *output_thread(void *arg) {
1890 } else {
1891 if ((err = snd_pcm_wait(pcmp, 1000)) < 0) {
1892 if ((err = snd_pcm_recover(pcmp, err, 1)) < 0) {
1893 - LOG_INFO("pcm wait error: %s", snd_strerror(err));
1894 + LOG_SQ_INFO("pcm wait error: %s", snd_strerror(err));
1895 }
1896 start = true;
1897 }
1898 @@ -731,7 +731,7 @@ static void *output_thread(void *arg) {
1899
1900 // avoid spinning in cases where wait returns but no bytes available (seen with pulse audio)
1901 if (avail == 0) {
1902 - LOG_SDEBUG("avail 0 - sleeping");
1903 + LOG_SQ_SDEBUG("avail 0 - sleeping");
1904 usleep(10000);
1905 continue;
1906 }
1907 @@ -741,7 +741,7 @@ static void *output_thread(void *arg) {
1908 // turn off if requested
1909 if (output.state == OUTPUT_OFF) {
1910 UNLOCK;
1911 - LOG_INFO("disabling output");
1912 + LOG_SQ_INFO("disabling output");
1913 alsa_close();
1914 pcmp = NULL;
1915 output_off = true;
1916 @@ -759,11 +759,11 @@ static void *output_thread(void *arg) {
1917 } else if (err == -EIO) {
1918 // EIO can occur with non existant pulse server
1919 UNLOCK;
1920 - LOG_SDEBUG("snd_pcm_delay returns: EIO - sleeping");
1921 + LOG_SQ_SDEBUG("snd_pcm_delay returns: EIO - sleeping");
1922 usleep(100000);
1923 continue;
1924 } else {
1925 - LOG_DEBUG("snd_pcm_delay returns: %d", err);
1926 + LOG_SQ_DEBUG("snd_pcm_delay returns: %d", err);
1927 }
1928 } else {
1929 output.device_frames = delay;
1930 @@ -778,7 +778,7 @@ static void *output_thread(void *arg) {
1931
1932 // some output devices such as alsa null refuse any data, avoid spinning
1933 if (!wrote) {
1934 - LOG_SDEBUG("wrote 0 - sleeping");
1935 + LOG_SQ_SDEBUG("wrote 0 - sleeping");
1936 usleep(10000);
1937 }
1938 }
1939 @@ -814,7 +814,7 @@ void output_init_alsa(log_level level, c
1940
1941 loglevel = level;
1942
1943 - LOG_INFO("init output");
1944 + LOG_SQ_INFO("init output");
1945
1946 memset(&output, 0, sizeof(output));
1947
1948 @@ -842,7 +842,7 @@ void output_init_alsa(log_level level, c
1949 if (!strcmp(alsa_sample_fmt, "16")) alsa.format = SND_PCM_FORMAT_S16_LE;
1950 }
1951
1952 - LOG_INFO("requested alsa_buffer: %u alsa_period: %u format: %s mmap: %u", output.buffer, output.period,
1953 + LOG_SQ_INFO("requested alsa_buffer: %u alsa_period: %u format: %s mmap: %u", output.buffer, output.period,
1954 alsa_sample_fmt ? alsa_sample_fmt : "any", alsa.mmap);
1955
1956 snd_lib_error_set_handler((snd_lib_error_handler_t)alsa_error_handler);
1957 @@ -857,9 +857,9 @@ void output_init_alsa(log_level level, c
1958 // RT linux - aim to avoid pagefaults by locking memory:
1959 // https://rt.wiki.kernel.org/index.php/Threaded_RT-application_with_memory_locking_and_stack_handling_example
1960 if (mlockall(MCL_CURRENT | MCL_FUTURE) == -1) {
1961 - LOG_INFO("unable to lock memory: %s", strerror(errno));
1962 + LOG_SQ_INFO("unable to lock memory: %s", strerror(errno));
1963 } else {
1964 - LOG_INFO("memory locked");
1965 + LOG_SQ_INFO("memory locked");
1966 }
1967
1968 mallopt(M_TRIM_THRESHOLD, -1);
1969 @@ -880,14 +880,14 @@ void output_init_alsa(log_level level, c
1970 struct sched_param param;
1971 param.sched_priority = rt_priority;
1972 if (pthread_setschedparam(thread, SCHED_FIFO, &param) != 0) {
1973 - LOG_DEBUG("unable to set output sched fifo: %s", strerror(errno));
1974 + LOG_SQ_DEBUG("unable to set output sched fifo: %s", strerror(errno));
1975 } else {
1976 - LOG_DEBUG("set output sched fifo rt: %u", param.sched_priority);
1977 + LOG_SQ_DEBUG("set output sched fifo rt: %u", param.sched_priority);
1978 }
1979 }
1980
1981 void output_close_alsa(void) {
1982 - LOG_INFO("close output");
1983 + LOG_SQ_INFO("close output");
1984
1985 LOCK;
1986 running = false;
1987 --- squeezelite-1.8.orig/output_pa.c
1988 +++ squeezelite-1.8/output_pa.c
1989 @@ -55,7 +55,7 @@ void list_devices(void) {
1990 int i;
1991
1992 if ((err = Pa_Initialize()) != paNoError) {
1993 - LOG_WARN("error initialising port audio: %s", Pa_GetErrorText(err));
1994 + LOG_SQ_WARN("error initialising port audio: %s", Pa_GetErrorText(err));
1995 return;
1996 }
1997
1998 @@ -68,12 +68,12 @@ void list_devices(void) {
1999 printf("\n");
2000
2001 if ((err = Pa_Terminate()) != paNoError) {
2002 - LOG_WARN("error closing port audio: %s", Pa_GetErrorText(err));
2003 + LOG_SQ_WARN("error closing port audio: %s", Pa_GetErrorText(err));
2004 }
2005 }
2006
2007 void set_volume(unsigned left, unsigned right) {
2008 - LOG_DEBUG("setting internal gain left: %u right: %u", left, right);
2009 + LOG_SQ_DEBUG("setting internal gain left: %u right: %u", left, right);
2010 LOCK;
2011 output.gainL = left;
2012 output.gainR = right;
2013 @@ -113,7 +113,7 @@ bool test_open(const char *device, unsig
2014 int device_id, i, ind;
2015
2016 if ((device_id = pa_device_id(device)) == -1) {
2017 - LOG_INFO("device %s not found", device);
2018 + LOG_SQ_INFO("device %s not found", device);
2019 return false;
2020 }
2021
2022 @@ -136,7 +136,7 @@ bool test_open(const char *device, unsig
2023 }
2024
2025 if (!rates[0]) {
2026 - LOG_WARN("no available rate found");
2027 + LOG_SQ_WARN("no available rate found");
2028 return false;
2029 }
2030
2031 @@ -146,7 +146,7 @@ bool test_open(const char *device, unsig
2032
2033 static void pa_stream_finished(void *userdata) {
2034 if (running) {
2035 - LOG_INFO("stream finished");
2036 + LOG_SQ_INFO("stream finished");
2037 LOCK;
2038 output.pa_reopen = true;
2039 wake_controller();
2040 @@ -163,12 +163,12 @@ static void *pa_monitor() {
2041 LOCK;
2042
2043 if (monitor_thread_running) {
2044 - LOG_DEBUG("monitor thread already running");
2045 + LOG_SQ_DEBUG("monitor thread already running");
2046 UNLOCK;
2047 return 0;
2048 }
2049
2050 - LOG_DEBUG("start monitor thread");
2051 + LOG_SQ_DEBUG("start monitor thread");
2052
2053 monitor_thread_running = true;
2054 output_off = (output.state == OUTPUT_OFF);
2055 @@ -176,18 +176,18 @@ static void *pa_monitor() {
2056 while (monitor_thread_running) {
2057 if (output_off) {
2058 if (output.state != OUTPUT_OFF) {
2059 - LOG_INFO("output on");
2060 + LOG_SQ_INFO("output on");
2061 break;
2062 }
2063 } else {
2064 // this is a hack to partially support hot plugging of devices
2065 // we rely on terminating and reinitalising PA to get an updated list of devices and use name for output.device
2066 - LOG_INFO("probing device %s", output.device);
2067 + LOG_SQ_INFO("probing device %s", output.device);
2068 Pa_Terminate();
2069 Pa_Initialize();
2070 pa.stream = NULL;
2071 if (pa_device_id(output.device) != -1) {
2072 - LOG_INFO("device reopen");
2073 + LOG_SQ_INFO("device reopen");
2074 break;
2075 }
2076 }
2077 @@ -197,7 +197,7 @@ static void *pa_monitor() {
2078 LOCK;
2079 }
2080
2081 - LOG_DEBUG("end monitor thread");
2082 + LOG_SQ_DEBUG("end monitor thread");
2083
2084 monitor_thread_running = false;
2085 pa.stream = NULL;
2086 @@ -216,7 +216,7 @@ void _pa_open(void) {
2087
2088 if (pa.stream) {
2089 if ((err = Pa_CloseStream(pa.stream)) != paNoError) {
2090 - LOG_WARN("error closing stream: %s", Pa_GetErrorText(err));
2091 + LOG_SQ_WARN("error closing stream: %s", Pa_GetErrorText(err));
2092 }
2093 }
2094
2095 @@ -226,7 +226,7 @@ void _pa_open(void) {
2096 err = 1;
2097
2098 } else if ((device_id = pa_device_id(output.device)) == -1) {
2099 - LOG_INFO("device %s not found", output.device);
2100 + LOG_SQ_INFO("device %s not found", output.device);
2101 err = 1;
2102
2103 } else {
2104 @@ -245,10 +245,10 @@ void _pa_open(void) {
2105 PaMacCoreStreamInfo macInfo;
2106 unsigned long streamInfoFlags;
2107 if (output.osx_playnice) {
2108 - LOG_INFO("opening device in PlayNice mode");
2109 + LOG_SQ_INFO("opening device in PlayNice mode");
2110 streamInfoFlags = paMacCorePlayNice;
2111 } else {
2112 - LOG_INFO("opening device in Pro mode");
2113 + LOG_SQ_INFO("opening device in Pro mode");
2114 streamInfoFlags = paMacCorePro;
2115 }
2116 PaMacCore_SetupStreamInfo(&macInfo, streamInfoFlags);
2117 @@ -259,24 +259,24 @@ void _pa_open(void) {
2118 if (!err &&
2119 (err = Pa_OpenStream(&pa.stream, NULL, &outputParameters, (double)output.current_sample_rate, paFramesPerBufferUnspecified,
2120 paPrimeOutputBuffersUsingStreamCallback | paDitherOff, pa_callback, NULL)) != paNoError) {
2121 - LOG_WARN("error opening device %i - %s : %s", outputParameters.device, Pa_GetDeviceInfo(outputParameters.device)->name,
2122 + LOG_SQ_WARN("error opening device %i - %s : %s", outputParameters.device, Pa_GetDeviceInfo(outputParameters.device)->name,
2123 Pa_GetErrorText(err));
2124 }
2125
2126 if (!err) {
2127 - LOG_INFO("opened device %i - %s at %u latency %u ms", outputParameters.device, Pa_GetDeviceInfo(outputParameters.device)->name,
2128 + LOG_SQ_INFO("opened device %i - %s at %u latency %u ms", outputParameters.device, Pa_GetDeviceInfo(outputParameters.device)->name,
2129 (unsigned int)Pa_GetStreamInfo(pa.stream)->sampleRate, (unsigned int)(Pa_GetStreamInfo(pa.stream)->outputLatency * 1000));
2130
2131 pa.rate = output.current_sample_rate;
2132
2133 if ((err = Pa_SetStreamFinishedCallback(pa.stream, pa_stream_finished)) != paNoError) {
2134 - LOG_WARN("error setting finish callback: %s", Pa_GetErrorText(err));
2135 + LOG_SQ_WARN("error setting finish callback: %s", Pa_GetErrorText(err));
2136 }
2137
2138 UNLOCK; // StartStream can call pa_callback in a sychronised thread on freebsd, remove lock while it is called
2139
2140 if ((err = Pa_StartStream(pa.stream)) != paNoError) {
2141 - LOG_WARN("error starting stream: %s", Pa_GetErrorText(err));
2142 + LOG_SQ_WARN("error starting stream: %s", Pa_GetErrorText(err));
2143 }
2144
2145 LOCK;
2146 @@ -367,12 +367,12 @@ static int pa_callback(const void *pa_in
2147 } while (pa_frames_wanted > 0 && frames != 0);
2148
2149 if (pa_frames_wanted > 0) {
2150 - LOG_DEBUG("pad with silence");
2151 + LOG_SQ_DEBUG("pad with silence");
2152 memset(optr, 0, pa_frames_wanted * BYTES_PER_FRAME);
2153 }
2154
2155 if (output.state == OUTPUT_OFF) {
2156 - LOG_INFO("output off");
2157 + LOG_SQ_INFO("output off");
2158 ret = paComplete;
2159 } else if (pa.rate != output.current_sample_rate) {
2160 ret = paComplete;
2161 @@ -399,7 +399,7 @@ void output_init_pa(log_level level, con
2162
2163 loglevel = level;
2164
2165 - LOG_INFO("init output");
2166 + LOG_SQ_INFO("init output");
2167
2168 memset(&output, 0, sizeof(output));
2169
2170 @@ -411,10 +411,10 @@ void output_init_pa(log_level level, con
2171 output.rate_delay = rate_delay;
2172 pa.stream = NULL;
2173
2174 - LOG_INFO("requested latency: %u", output.latency);
2175 + LOG_SQ_INFO("requested latency: %u", output.latency);
2176
2177 if ((err = Pa_Initialize()) != paNoError) {
2178 - LOG_WARN("error initialising port audio: %s", Pa_GetErrorText(err));
2179 + LOG_SQ_WARN("error initialising port audio: %s", Pa_GetErrorText(err));
2180 exit(0);
2181 }
2182
2183 @@ -430,7 +430,7 @@ void output_init_pa(log_level level, con
2184 void output_close_pa(void) {
2185 PaError err;
2186
2187 - LOG_INFO("close output");
2188 + LOG_SQ_INFO("close output");
2189
2190 LOCK;
2191
2192 @@ -439,12 +439,12 @@ void output_close_pa(void) {
2193
2194 if (pa.stream) {
2195 if ((err = Pa_AbortStream(pa.stream)) != paNoError) {
2196 - LOG_WARN("error closing stream: %s", Pa_GetErrorText(err));
2197 + LOG_SQ_WARN("error closing stream: %s", Pa_GetErrorText(err));
2198 }
2199 }
2200
2201 if ((err = Pa_Terminate()) != paNoError) {
2202 - LOG_WARN("error closing port audio: %s", Pa_GetErrorText(err));
2203 + LOG_SQ_WARN("error closing port audio: %s", Pa_GetErrorText(err));
2204 }
2205
2206 UNLOCK;
2207 --- squeezelite-1.8.orig/output_stdout.c
2208 +++ squeezelite-1.8/output_stdout.c
2209 @@ -123,11 +123,11 @@ static thread_type thread;
2210 void output_init_stdout(log_level level, unsigned output_buf_size, char *params, unsigned rates[], unsigned rate_delay) {
2211 loglevel = level;
2212
2213 - LOG_INFO("init output stdout");
2214 + LOG_SQ_INFO("init output stdout");
2215
2216 buf = malloc(FRAME_BLOCK * BYTES_PER_FRAME);
2217 if (!buf) {
2218 - LOG_ERROR("unable to malloc buf");
2219 + LOG_SQ_ERROR("unable to malloc buf");
2220 return;
2221 }
2222 buffill = 0;
2223 @@ -165,7 +165,7 @@ void output_init_stdout(log_level level,
2224 }
2225
2226 void output_close_stdout(void) {
2227 - LOG_INFO("close output");
2228 + LOG_SQ_INFO("close output");
2229
2230 LOCK;
2231 running = false;
2232 --- squeezelite-1.8.orig/output_vis.c
2233 +++ squeezelite-1.8/output_vis.c
2234 @@ -65,7 +65,7 @@ void _vis_export(struct buffer *outputbu
2235 }
2236
2237 if (err) {
2238 - LOG_DEBUG("failed to get wrlock - skipping visulizer export");
2239 + LOG_SQ_DEBUG("failed to get wrlock - skipping visulizer export");
2240
2241 } else {
2242
2243 @@ -132,9 +132,9 @@ void output_vis_init(log_level level, u8
2244 vis_mmap->running = false;
2245 vis_mmap->rate = 44100;
2246 pthread_rwlockattr_destroy(&attr);
2247 - LOG_INFO("opened visulizer shared memory as %s", vis_shm_path);
2248 + LOG_SQ_INFO("opened visulizer shared memory as %s", vis_shm_path);
2249 } else {
2250 - LOG_WARN("unable to open visualizer shared memory");
2251 + LOG_SQ_WARN("unable to open visualizer shared memory");
2252 vis_mmap = NULL;
2253 }
2254
2255 --- squeezelite-1.8.orig/pcm.c
2256 +++ squeezelite-1.8/pcm.c
2257 @@ -74,10 +74,10 @@ static void _check_header(void) {
2258
2259 if (bytes > 12) {
2260 if (!memcmp(ptr, "RIFF", 4) && !memcmp(ptr+8, "WAVE", 4)) {
2261 - LOG_INFO("WAVE");
2262 + LOG_SQ_INFO("WAVE");
2263 format = WAVE;
2264 } else if (!memcmp(ptr, "FORM", 4) && (!memcmp(ptr+8, "AIFF", 4) || !memcmp(ptr+8, "AIFC", 4))) {
2265 - LOG_INFO("AIFF");
2266 + LOG_SQ_INFO("AIFF");
2267 format = AIFF;
2268 }
2269 }
2270 @@ -98,13 +98,13 @@ static void _check_header(void) {
2271 len = *(ptr+4) << 24 | *(ptr+5) << 16 | *(ptr+6) << 8 | *(ptr+7);
2272 }
2273
2274 - LOG_INFO("header: %s len: %d", id, len);
2275 + LOG_SQ_INFO("header: %s len: %d", id, len);
2276
2277 if (format == WAVE && !memcmp(ptr, "data", 4)) {
2278 ptr += 8;
2279 _buf_inc_readp(streambuf, ptr - streambuf->readp);
2280 audio_left = len;
2281 - LOG_INFO("audio size: %u", audio_left);
2282 + LOG_SQ_INFO("audio size: %u", audio_left);
2283 limit = true;
2284 return;
2285 }
2286 @@ -115,7 +115,7 @@ static void _check_header(void) {
2287 ptr += 8 + 8;
2288 _buf_inc_readp(streambuf, ptr + offset - streambuf->readp);
2289 audio_left = len - 8 - offset;
2290 - LOG_INFO("audio size: %u", audio_left);
2291 + LOG_SQ_INFO("audio size: %u", audio_left);
2292 limit = true;
2293 return;
2294 }
2295 @@ -126,7 +126,7 @@ static void _check_header(void) {
2296 sample_rate = *(ptr+12) | *(ptr+13) << 8 | *(ptr+14) << 16 | *(ptr+15) << 24;
2297 sample_size = (*(ptr+22) | *(ptr+23) << 8) / 8;
2298 bigendian = 0;
2299 - LOG_INFO("pcm size: %u rate: %u chan: %u bigendian: %u", sample_size, sample_rate, channels, bigendian);
2300 + LOG_SQ_INFO("pcm size: %u rate: %u chan: %u bigendian: %u", sample_size, sample_rate, channels, bigendian);
2301 }
2302
2303 if (format == AIFF && !memcmp(ptr, "COMM", 4) && bytes >= 26) {
2304 @@ -141,20 +141,20 @@ static void _check_header(void) {
2305 sample_rate = *(ptr+18) << 24 | *(ptr+19) << 16 | *(ptr+20) << 8 | *(ptr+21);
2306 while (exponent < 0) { sample_rate >>= 1; ++exponent; }
2307 while (exponent > 0) { sample_rate <<= 1; --exponent; }
2308 - LOG_INFO("pcm size: %u rate: %u chan: %u bigendian: %u", sample_size, sample_rate, channels, bigendian);
2309 + LOG_SQ_INFO("pcm size: %u rate: %u chan: %u bigendian: %u", sample_size, sample_rate, channels, bigendian);
2310 }
2311
2312 if (bytes >= len + 8) {
2313 ptr += len + 8;
2314 bytes -= (len + 8);
2315 } else {
2316 - LOG_WARN("run out of data");
2317 + LOG_SQ_WARN("run out of data");
2318 return;
2319 }
2320 }
2321
2322 } else {
2323 - LOG_WARN("unknown format - can't parse header");
2324 + LOG_SQ_WARN("unknown format - can't parse header");
2325 }
2326 }
2327
2328 @@ -189,7 +189,7 @@ static decode_state pcm_decode(void) {
2329 }
2330
2331 if (decode.new_stream) {
2332 - LOG_INFO("setting track_start");
2333 + LOG_SQ_INFO("setting track_start");
2334 LOCK_O_not_direct;
2335 output.next_sample_rate = decode_newstream(sample_rate, output.supported_rates);
2336 output.track_start = outputbuf->writep;
2337 @@ -226,7 +226,7 @@ static decode_state pcm_decode(void) {
2338 frames = min(frames, MAX_DECODE_FRAMES);
2339
2340 if (limit && frames * bytes_per_frame > audio_left) {
2341 - LOG_INFO("reached end of audio");
2342 + LOG_SQ_INFO("reached end of audio");
2343 frames = audio_left / bytes_per_frame;
2344 }
2345
2346 @@ -331,10 +331,10 @@ static decode_state pcm_decode(void) {
2347 }
2348 }
2349 } else {
2350 - LOG_ERROR("unsupported channels");
2351 + LOG_SQ_ERROR("unsupported channels");
2352 }
2353
2354 - LOG_SDEBUG("decoded %u frames", frames);
2355 + LOG_SQ_SDEBUG("decoded %u frames", frames);
2356
2357 _buf_inc_readp(streambuf, frames * bytes_per_frame);
2358
2359 @@ -362,7 +362,7 @@ static void pcm_open(u8_t size, u8_t rat
2360 bigendian = (endianness == '0');
2361 limit = false;
2362
2363 - LOG_INFO("pcm size: %u rate: %u chan: %u bigendian: %u", sample_size, sample_rate, channels, bigendian);
2364 + LOG_SQ_INFO("pcm size: %u rate: %u chan: %u bigendian: %u", sample_size, sample_rate, channels, bigendian);
2365 buf_adjust(streambuf, sample_size * channels);
2366 }
2367
2368 @@ -381,6 +381,6 @@ struct codec *register_pcm(void) {
2369 pcm_decode, // decode
2370 };
2371
2372 - LOG_INFO("using pcm to decode aif,pcm");
2373 + LOG_SQ_INFO("using pcm to decode aif,pcm");
2374 return &ret;
2375 }
2376 --- squeezelite-1.8.orig/process.c
2377 +++ squeezelite-1.8/process.c
2378 @@ -81,7 +81,7 @@ static void _write_samples(void) {
2379 } else {
2380
2381 // bail out if no space found after 100ms to avoid locking
2382 - LOG_ERROR("unable to get space in output buffer");
2383 + LOG_SQ_ERROR("unable to get space in output buffer");
2384 UNLOCK_O;
2385 return;
2386 }
2387 @@ -112,7 +112,7 @@ void process_drain(void) {
2388
2389 } while (!done);
2390
2391 - LOG_DEBUG("processing track complete - frames in: %lu out: %lu", process.total_in, process.total_out);
2392 + LOG_SQ_DEBUG("processing track complete - frames in: %lu out: %lu", process.total_in, process.total_out);
2393 }
2394
2395 // new stream - called with decode mutex set
2396 @@ -120,7 +120,7 @@ unsigned process_newstream(bool *direct,
2397
2398 bool active = NEWSTREAM_FUNC(&process, raw_sample_rate, supported_rates);
2399
2400 - LOG_INFO("processing: %s", active ? "active" : "inactive");
2401 + LOG_SQ_INFO("processing: %s", active ? "active" : "inactive");
2402
2403 *direct = !active;
2404
2405 @@ -141,21 +141,21 @@ unsigned process_newstream(bool *direct,
2406 }
2407
2408 if (process.max_in_frames != max_in_frames) {
2409 - LOG_DEBUG("creating process buf in frames: %u", max_in_frames);
2410 + LOG_SQ_DEBUG("creating process buf in frames: %u", max_in_frames);
2411 if (process.inbuf) free(process.inbuf);
2412 process.inbuf = malloc(max_in_frames * BYTES_PER_FRAME);
2413 process.max_in_frames = max_in_frames;
2414 }
2415
2416 if (process.max_out_frames != max_out_frames) {
2417 - LOG_DEBUG("creating process buf out frames: %u", max_out_frames);
2418 + LOG_SQ_DEBUG("creating process buf out frames: %u", max_out_frames);
2419 if (process.outbuf) free(process.outbuf);
2420 process.outbuf = malloc(max_out_frames * BYTES_PER_FRAME);
2421 process.max_out_frames = max_out_frames;
2422 }
2423
2424 if (!process.inbuf || !process.outbuf) {
2425 - LOG_ERROR("malloc fail creating process buffers");
2426 + LOG_SQ_ERROR("malloc fail creating process buffers");
2427 *direct = true;
2428 return raw_sample_rate;
2429 }
2430 @@ -169,7 +169,7 @@ unsigned process_newstream(bool *direct,
2431 // process flush - called with decode mutex set
2432 void process_flush(void) {
2433
2434 - LOG_INFO("process flush");
2435 + LOG_SQ_INFO("process flush");
2436
2437 FLUSH_FUNC();
2438
2439 --- squeezelite-1.8.orig/resample.c
2440 +++ squeezelite-1.8/resample.c
2441 @@ -73,13 +73,13 @@ void resample_samples(struct processstat
2442 soxr_error_t error =
2443 SOXR(r, process, r->resampler, process->inbuf, process->in_frames, &idone, process->outbuf, process->max_out_frames, &odone);
2444 if (error) {
2445 - LOG_INFO("soxr_process error: %s", soxr_strerror(error));
2446 + LOG_SQ_INFO("soxr_process error: %s", soxr_strerror(error));
2447 return;
2448 }
2449
2450 if (idone != process->in_frames) {
2451 // should not get here if buffers are big enough...
2452 - LOG_ERROR("should not get here - partial sox process: %u of %u processed %u of %u out",
2453 + LOG_SQ_ERROR("should not get here - partial sox process: %u of %u processed %u of %u out",
2454 (unsigned)idone, process->in_frames, (unsigned)odone, process->max_out_frames);
2455 }
2456
2457 @@ -89,7 +89,7 @@ void resample_samples(struct processstat
2458
2459 clip_cnt = *(SOXR(r, num_clips, r->resampler));
2460 if (clip_cnt - r->old_clips) {
2461 - LOG_SDEBUG("resampling clips: %u", (unsigned)(clip_cnt - r->old_clips));
2462 + LOG_SQ_SDEBUG("resampling clips: %u", (unsigned)(clip_cnt - r->old_clips));
2463 r->old_clips = clip_cnt;
2464 }
2465 }
2466 @@ -100,7 +100,7 @@ bool resample_drain(struct processstate
2467
2468 soxr_error_t error = SOXR(r, process, r->resampler, NULL, 0, NULL, process->outbuf, process->max_out_frames, &odone);
2469 if (error) {
2470 - LOG_INFO("soxr_process error: %s", soxr_strerror(error));
2471 + LOG_SQ_INFO("soxr_process error: %s", soxr_strerror(error));
2472 return true;
2473 }
2474
2475 @@ -109,13 +109,13 @@ bool resample_drain(struct processstate
2476
2477 clip_cnt = *(SOXR(r, num_clips, r->resampler));
2478 if (clip_cnt - r->old_clips) {
2479 - LOG_DEBUG("resampling clips: %u", (unsigned)(clip_cnt - r->old_clips));
2480 + LOG_SQ_DEBUG("resampling clips: %u", (unsigned)(clip_cnt - r->old_clips));
2481 r->old_clips = clip_cnt;
2482 }
2483
2484 if (odone == 0) {
2485
2486 - LOG_INFO("resample track complete - total track clips: %u", r->old_clips);
2487 + LOG_SQ_INFO("resample track complete - total track clips: %u", r->old_clips);
2488
2489 SOXR(r, delete, r->resampler);
2490 r->resampler = NULL;
2491 @@ -185,7 +185,7 @@ bool resample_newstream(struct processst
2492 soxr_runtime_spec_t r_spec;
2493 #endif
2494
2495 - LOG_INFO("resampling from %u -> %u", raw_sample_rate, outrate);
2496 + LOG_SQ_INFO("resampling from %u -> %u", raw_sample_rate, outrate);
2497
2498 io_spec = SOXR(r, io_spec, SOXR_INT32_I, SOXR_INT32_I);
2499 io_spec.scale = r->scale;
2500 @@ -208,7 +208,7 @@ bool resample_newstream(struct processst
2501 r_spec = SOXR(r, runtime_spec, 0); // make use of libsoxr OpenMP support allowing parallel execution if multiple cores
2502 #endif
2503
2504 - LOG_DEBUG("resampling with soxr_quality_spec_t[precision: %03.1f, passband_end: %03.6f, stopband_begin: %03.6f, "
2505 + LOG_SQ_DEBUG("resampling with soxr_quality_spec_t[precision: %03.1f, passband_end: %03.6f, stopband_begin: %03.6f, "
2506 "phase_response: %03.1f, flags: 0x%02x], soxr_io_spec_t[scale: %03.2f]", q_spec.precision,
2507 q_spec.passband_end, q_spec.stopband_begin, q_spec.phase_response, q_spec.flags, io_spec.scale);
2508
2509 @@ -219,7 +219,7 @@ bool resample_newstream(struct processst
2510 #endif
2511
2512 if (error) {
2513 - LOG_INFO("soxr_create error: %s", soxr_strerror(error));
2514 + LOG_SQ_INFO("soxr_create error: %s", soxr_strerror(error));
2515 return false;
2516 }
2517
2518 @@ -228,7 +228,7 @@ bool resample_newstream(struct processst
2519
2520 } else {
2521
2522 - LOG_INFO("disable resampling - rates match");
2523 + LOG_SQ_INFO("disable resampling - rates match");
2524 return false;
2525 }
2526 }
2527 @@ -246,7 +246,7 @@ static bool load_soxr(void) {
2528 char *err;
2529
2530 if (!handle) {
2531 - LOG_INFO("dlerror: %s", dlerror());
2532 + LOG_SQ_INFO("dlerror: %s", dlerror());
2533 return false;
2534 }
2535
2536 @@ -261,11 +261,11 @@ static bool load_soxr(void) {
2537 #endif
2538
2539 if ((err = dlerror()) != NULL) {
2540 - LOG_INFO("dlerror: %s", err);
2541 + LOG_SQ_INFO("dlerror: %s", err);
2542 return false;
2543 }
2544
2545 - LOG_INFO("loaded "LIBSOXR);
2546 + LOG_SQ_INFO("loaded "LIBSOXR);
2547 #endif
2548
2549 return true;
2550 @@ -278,7 +278,7 @@ bool resample_init(char *opt) {
2551
2552 r = malloc(sizeof(struct soxr));
2553 if (!r) {
2554 - LOG_WARN("resampling disabled");
2555 + LOG_SQ_WARN("resampling disabled");
2556 return false;
2557 }
2558
2559 @@ -288,7 +288,7 @@ bool resample_init(char *opt) {
2560 r->exception = false;
2561
2562 if (!load_soxr()) {
2563 - LOG_WARN("resampling disabled");
2564 + LOG_SQ_WARN("resampling disabled");
2565 return false;
2566 }
2567
2568 @@ -356,7 +356,7 @@ bool resample_init(char *opt) {
2569 r->q_phase_response = atof(phase_response);
2570 }
2571
2572 - LOG_INFO("resampling %s recipe: 0x%02x, flags: 0x%02x, scale: %03.2f, precision: %03.1f, passband_end: %03.5f, stopband_begin: %03.5f, phase_response: %03.1f",
2573 + LOG_SQ_INFO("resampling %s recipe: 0x%02x, flags: 0x%02x, scale: %03.2f, precision: %03.1f, passband_end: %03.5f, stopband_begin: %03.5f, phase_response: %03.1f",
2574 r->max_rate ? "async" : "sync",
2575 r->q_recipe, r->q_flags, r->scale, r->q_precision, r->q_passband_end, r->q_stopband_begin, r->q_phase_response);
2576
2577 --- squeezelite-1.8.orig/slimproto.c
2578 +++ squeezelite-1.8/slimproto.c
2579 @@ -95,11 +95,11 @@ void send_packet(u8_t *packet, size_t le
2580 n = send(sock, ptr, len, MSG_NOSIGNAL);
2581 if (n <= 0) {
2582 if (n < 0 && last_error() == ERROR_WOULDBLOCK && try < 10) {
2583 - LOG_DEBUG("retrying (%d) writing to socket", ++try);
2584 + LOG_SQ_DEBUG("retrying (%d) writing to socket", ++try);
2585 usleep(1000);
2586 continue;
2587 }
2588 - LOG_INFO("failed writing to socket: %s", strerror(last_error()));
2589 + LOG_SQ_INFO("failed writing to socket: %s", strerror(last_error()));
2590 return;
2591 }
2592 ptr += n;
2593 @@ -121,9 +121,9 @@ static void sendHELO(bool reconnect, con
2594 packN(&pkt.bytes_received_L, (u64_t)status.stream_bytes & 0xffffffff);
2595 memcpy(pkt.mac, mac, 6);
2596
2597 - LOG_INFO("mac: %02x:%02x:%02x:%02x:%02x:%02x", pkt.mac[0], pkt.mac[1], pkt.mac[2], pkt.mac[3], pkt.mac[4], pkt.mac[5]);
2598 + LOG_SQ_INFO("mac: %02x:%02x:%02x:%02x:%02x:%02x", pkt.mac[0], pkt.mac[1], pkt.mac[2], pkt.mac[3], pkt.mac[4], pkt.mac[5]);
2599
2600 - LOG_INFO("cap: %s%s%s", base_cap, fixed_cap, var_cap);
2601 + LOG_SQ_INFO("cap: %s%s%s", base_cap, fixed_cap, var_cap);
2602
2603 send_packet((u8_t *)&pkt, sizeof(pkt));
2604 send_packet((u8_t *)base_cap, strlen(base_cap));
2605 @@ -139,12 +139,12 @@ static void sendSTAT(const char *event,
2606 if (status.current_sample_rate && status.frames_played && status.frames_played > status.device_frames) {
2607 ms_played = (u32_t)(((u64_t)(status.frames_played - status.device_frames) * (u64_t)1000) / (u64_t)status.current_sample_rate);
2608 if (now > status.updated) ms_played += (now - status.updated);
2609 - LOG_SDEBUG("ms_played: %u (frames_played: %u device_frames: %u)", ms_played, status.frames_played, status.device_frames);
2610 + LOG_SQ_SDEBUG("ms_played: %u (frames_played: %u device_frames: %u)", ms_played, status.frames_played, status.device_frames);
2611 } else if (status.frames_played && now > status.stream_start) {
2612 ms_played = now - status.stream_start;
2613 - LOG_SDEBUG("ms_played: %u using elapsed time (frames_played: %u device_frames: %u)", ms_played, status.frames_played, status.device_frames);
2614 + LOG_SQ_SDEBUG("ms_played: %u using elapsed time (frames_played: %u device_frames: %u)", ms_played, status.frames_played, status.device_frames);
2615 } else {
2616 - LOG_SDEBUG("ms_played: 0");
2617 + LOG_SQ_SDEBUG("ms_played: 0");
2618 ms_played = 0;
2619 }
2620
2621 @@ -168,10 +168,10 @@ static void sendSTAT(const char *event,
2622 pkt.server_timestamp = server_timestamp; // keep this is server format - don't unpack/pack
2623 // error_code;
2624
2625 - LOG_DEBUG("STAT: %s", event);
2626 + LOG_SQ_DEBUG("STAT: %s", event);
2627
2628 if (loglevel == lSDEBUG) {
2629 - LOG_SDEBUG("received bytesL: %u streambuf: %u outputbuf: %u calc elapsed: %u real elapsed: %u (diff: %d) device: %u delay: %d",
2630 + LOG_SQ_SDEBUG("received bytesL: %u streambuf: %u outputbuf: %u calc elapsed: %u real elapsed: %u (diff: %d) device: %u delay: %d",
2631 (u32_t)status.stream_bytes, status.stream_full, status.output_full, ms_played, now - status.stream_start,
2632 ms_played - now + status.stream_start, status.device_frames * 1000 / status.current_sample_rate, now - status.updated);
2633 }
2634 @@ -187,7 +187,7 @@ static void sendDSCO(disconnect_code dis
2635 pkt.length = htonl(sizeof(pkt) - 8);
2636 pkt.reason = disconnect & 0xFF;
2637
2638 - LOG_DEBUG("DSCO: %d", disconnect);
2639 + LOG_SQ_DEBUG("DSCO: %d", disconnect);
2640
2641 send_packet((u8_t *)&pkt, sizeof(pkt));
2642 }
2643 @@ -199,7 +199,7 @@ static void sendRESP(const char *header,
2644 memcpy(&pkt_header.opcode, "RESP", 4);
2645 pkt_header.length = htonl(sizeof(pkt_header) + len - 8);
2646
2647 - LOG_DEBUG("RESP");
2648 + LOG_SQ_DEBUG("RESP");
2649
2650 send_packet((u8_t *)&pkt_header, sizeof(pkt_header));
2651 send_packet((u8_t *)header, len);
2652 @@ -212,7 +212,7 @@ static void sendMETA(const char *meta, s
2653 memcpy(&pkt_header.opcode, "META", 4);
2654 pkt_header.length = htonl(sizeof(pkt_header) + len - 8);
2655
2656 - LOG_DEBUG("META");
2657 + LOG_SQ_DEBUG("META");
2658
2659 send_packet((u8_t *)&pkt_header, sizeof(pkt_header));
2660 send_packet((u8_t *)meta, len);
2661 @@ -227,7 +227,7 @@ static void sendSETDName(const char *nam
2662 pkt_header.id = 0; // id 0 is playername S:P:Squeezebox2
2663 pkt_header.length = htonl(sizeof(pkt_header) + strlen(name) + 1 - 8);
2664
2665 - LOG_DEBUG("set playername: %s", name);
2666 + LOG_SQ_DEBUG("set playername: %s", name);
2667
2668 send_packet((u8_t *)&pkt_header, sizeof(pkt_header));
2669 send_packet((u8_t *)name, strlen(name) + 1);
2670 @@ -244,7 +244,7 @@ void sendIR(u32_t code, u32_t ts) {
2671 packN(&pkt.jiffies, ts);
2672 pkt.ir_code = htonl(code);
2673
2674 - LOG_DEBUG("IR: ir code: 0x%x ts: %u", code, ts);
2675 + LOG_SQ_DEBUG("IR: ir code: 0x%x ts: %u", code, ts);
2676
2677 send_packet((u8_t *)&pkt, sizeof(pkt));
2678 }
2679 @@ -253,7 +253,7 @@ void sendIR(u32_t code, u32_t ts) {
2680 static void process_strm(u8_t *pkt, int len) {
2681 struct strm_packet *strm = (struct strm_packet *)pkt;
2682
2683 - LOG_DEBUG("strm command %c", strm->command);
2684 + LOG_SQ_DEBUG("strm command %c", strm->command);
2685
2686 switch(strm->command) {
2687 case 't':
2688 @@ -289,7 +289,7 @@ static void process_strm(u8_t *pkt, int
2689 }
2690 UNLOCK_O;
2691 if (!interval) sendSTAT("STMp", 0);
2692 - LOG_DEBUG("pause interval: %u", interval);
2693 + LOG_SQ_DEBUG("pause interval: %u", interval);
2694 }
2695 break;
2696 case 'a':
2697 @@ -299,7 +299,7 @@ static void process_strm(u8_t *pkt, int
2698 output.skip_frames = interval * status.current_sample_rate / 1000;
2699 output.state = OUTPUT_SKIP_FRAMES;
2700 UNLOCK_O;
2701 - LOG_DEBUG("skip ahead interval: %u", interval);
2702 + LOG_SQ_DEBUG("skip ahead interval: %u", interval);
2703 }
2704 break;
2705 case 'u':
2706 @@ -309,7 +309,7 @@ static void process_strm(u8_t *pkt, int
2707 output.state = jiffies ? OUTPUT_START_AT : OUTPUT_RUNNING;
2708 output.start_at = jiffies;
2709 UNLOCK_O;
2710 - LOG_DEBUG("unpause at: %u now: %u", jiffies, gettime_ms());
2711 + LOG_SQ_DEBUG("unpause at: %u now: %u", jiffies, gettime_ms());
2712 sendSTAT("STMr", 0);
2713 }
2714 break;
2715 @@ -321,22 +321,22 @@ static void process_strm(u8_t *pkt, int
2716 u16_t port = strm->server_port; // keep in network byte order
2717 if (ip == 0) ip = slimproto_ip;
2718
2719 - LOG_DEBUG("strm s autostart: %c transition period: %u transition type: %u codec: %c",
2720 + LOG_SQ_DEBUG("strm s autostart: %c transition period: %u transition type: %u codec: %c",
2721 strm->autostart, strm->transition_period, strm->transition_type - '0', strm->format);
2722
2723 autostart = strm->autostart - '0';
2724 sendSTAT("STMf", 0);
2725 if (header_len > MAX_HEADER -1) {
2726 - LOG_WARN("header too long: %u", header_len);
2727 + LOG_SQ_WARN("header too long: %u", header_len);
2728 break;
2729 }
2730 if (strm->format != '?') {
2731 codec_open(strm->format, strm->pcm_sample_size, strm->pcm_sample_rate, strm->pcm_channels, strm->pcm_endianness);
2732 } else if (autostart >= 2) {
2733 // extension to slimproto to allow server to detect codec from response header and send back in codc message
2734 - LOG_DEBUG("streaming unknown codec");
2735 + LOG_SQ_DEBUG("streaming unknown codec");
2736 } else {
2737 - LOG_WARN("unknown codec requires autostart >= 2");
2738 + LOG_SQ_WARN("unknown codec requires autostart >= 2");
2739 break;
2740 }
2741 if (ip == LOCAL_PLAYER_IP && port == LOCAL_PLAYER_PORT) {
2742 @@ -354,12 +354,12 @@ static void process_strm(u8_t *pkt, int
2743 output.fade_mode = strm->transition_type - '0';
2744 output.fade_secs = strm->transition_period;
2745 output.invert = (strm->flags & 0x03) == 0x03;
2746 - LOG_DEBUG("set fade mode: %u", output.fade_mode);
2747 + LOG_SQ_DEBUG("set fade mode: %u", output.fade_mode);
2748 UNLOCK_O;
2749 }
2750 break;
2751 default:
2752 - LOG_WARN("unhandled strm %c", strm->command);
2753 + LOG_SQ_WARN("unhandled strm %c", strm->command);
2754 break;
2755 }
2756 }
2757 @@ -368,7 +368,7 @@ static void process_cont(u8_t *pkt, int
2758 struct cont_packet *cont = (struct cont_packet *)pkt;
2759 cont->metaint = unpackN(&cont->metaint);
2760
2761 - LOG_DEBUG("cont metaint: %u loop: %u", cont->metaint, cont->loop);
2762 + LOG_SQ_DEBUG("cont metaint: %u loop: %u", cont->metaint, cont->loop);
2763
2764 if (autostart > 1) {
2765 autostart -= 2;
2766 @@ -385,14 +385,14 @@ static void process_cont(u8_t *pkt, int
2767 static void process_codc(u8_t *pkt, int len) {
2768 struct codc_packet *codc = (struct codc_packet *)pkt;
2769
2770 - LOG_DEBUG("codc: %c", codc->format);
2771 + LOG_SQ_DEBUG("codc: %c", codc->format);
2772 codec_open(codc->format, codc->pcm_sample_size, codc->pcm_sample_rate, codc->pcm_channels, codc->pcm_endianness);
2773 }
2774
2775 static void process_aude(u8_t *pkt, int len) {
2776 struct aude_packet *aude = (struct aude_packet *)pkt;
2777
2778 - LOG_DEBUG("enable spdif: %d dac: %d", aude->enable_spdif, aude->enable_dac);
2779 + LOG_SQ_DEBUG("enable spdif: %d dac: %d", aude->enable_spdif, aude->enable_dac);
2780
2781 LOCK_O;
2782 if (!aude->enable_spdif && output.state != OUTPUT_OFF) {
2783 @@ -410,7 +410,7 @@ static void process_audg(u8_t *pkt, int
2784 audg->gainL = unpackN(&audg->gainL);
2785 audg->gainR = unpackN(&audg->gainR);
2786
2787 - LOG_DEBUG("audg gainL: %u gainR: %u adjust: %u", audg->gainL, audg->gainR, audg->adjust);
2788 + LOG_SQ_DEBUG("audg gainL: %u gainR: %u adjust: %u", audg->gainL, audg->gainR, audg->adjust);
2789
2790 set_volume(audg->adjust ? audg->gainL : FIXED_ONE, audg->adjust ? audg->gainR : FIXED_ONE);
2791 }
2792 @@ -427,18 +427,18 @@ static void process_setd(u8_t *pkt, int
2793 } else if (len > 5) {
2794 strncpy(player_name, setd->data, PLAYER_NAME_LEN);
2795 player_name[PLAYER_NAME_LEN] = '\0';
2796 - LOG_INFO("set name: %s", setd->data);
2797 + LOG_SQ_INFO("set name: %s", setd->data);
2798 // confirm change to server
2799 sendSETDName(setd->data);
2800 // write name to name_file if -N option set
2801 if (name_file) {
2802 FILE *fp = fopen(name_file, "w");
2803 if (fp) {
2804 - LOG_INFO("storing name in %s", name_file);
2805 + LOG_SQ_INFO("storing name in %s", name_file);
2806 fputs(player_name, fp);
2807 fclose(fp);
2808 } else {
2809 - LOG_WARN("unable to store new name in %s", name_file);
2810 + LOG_SQ_WARN("unable to store new name in %s", name_file);
2811 }
2812 }
2813 }
2814 @@ -451,7 +451,7 @@ static void process_setd(u8_t *pkt, int
2815 static void process_serv(u8_t *pkt, int len) {
2816 struct serv_packet *serv = (struct serv_packet *)pkt;
2817
2818 - LOG_INFO("switch server");
2819 + LOG_SQ_INFO("switch server");
2820
2821 new_server = serv->server_ip;
2822
2823 @@ -491,11 +491,11 @@ static void process(u8_t *pack, int len)
2824 while (h->handler && strncmp((char *)pack, h->opcode, 4)) { h++; }
2825
2826 if (h->handler) {
2827 - LOG_DEBUG("%s", h->opcode);
2828 + LOG_SQ_DEBUG("%s", h->opcode);
2829 h->handler(pack, len);
2830 } else {
2831 pack[4] = '\0';
2832 - LOG_WARN("unhandled %s", (char *)pack);
2833 + LOG_SQ_WARN("unhandled %s", (char *)pack);
2834 }
2835 }
2836
2837 @@ -527,7 +527,7 @@ static void slimproto_run() {
2838 if (n < 0 && last_error() == ERROR_WOULDBLOCK) {
2839 continue;
2840 }
2841 - LOG_INFO("error reading from socket: %s", n ? strerror(last_error()) : "closed");
2842 + LOG_SQ_INFO("error reading from socket: %s", n ? strerror(last_error()) : "closed");
2843 return;
2844 }
2845 expect -= n;
2846 @@ -542,7 +542,7 @@ static void slimproto_run() {
2847 if (n < 0 && last_error() == ERROR_WOULDBLOCK) {
2848 continue;
2849 }
2850 - LOG_INFO("error reading from socket: %s", n ? strerror(last_error()) : "closed");
2851 + LOG_SQ_INFO("error reading from socket: %s", n ? strerror(last_error()) : "closed");
2852 return;
2853 }
2854 got += n;
2855 @@ -550,12 +550,12 @@ static void slimproto_run() {
2856 expect = buffer[0] << 8 | buffer[1]; // length pack 'n'
2857 got = 0;
2858 if (expect > MAXBUF) {
2859 - LOG_ERROR("FATAL: slimproto packet too big: %d > %d", expect, MAXBUF);
2860 + LOG_SQ_ERROR("FATAL: slimproto packet too big: %d > %d", expect, MAXBUF);
2861 return;
2862 }
2863 }
2864 } else {
2865 - LOG_ERROR("FATAL: negative expect");
2866 + LOG_SQ_ERROR("FATAL: negative expect");
2867 return;
2868 }
2869
2870 @@ -570,7 +570,7 @@ static void slimproto_run() {
2871 } else if (++timeouts > 35) {
2872
2873 // expect message from server every 5 seconds, but 30 seconds on mysb.com so timeout after 35 seconds
2874 - LOG_INFO("No messages from server - connection dead");
2875 + LOG_SQ_INFO("No messages from server - connection dead");
2876 return;
2877 }
2878
2879 @@ -676,7 +676,7 @@ static void slimproto_run() {
2880 _decode_state == DECODE_STOPPED) {
2881 _sendSTMu = true;
2882 sentSTMu = true;
2883 - LOG_DEBUG("output underrun");
2884 + LOG_SQ_DEBUG("output underrun");
2885 output.state = OUTPUT_STOPPED;
2886 output.stop_time = now;
2887 }
2888 @@ -686,7 +686,7 @@ static void slimproto_run() {
2889 }
2890 if (output.state == OUTPUT_STOPPED && output.idle_to && (now - output.stop_time > output.idle_to)) {
2891 output.state = OUTPUT_OFF;
2892 - LOG_DEBUG("output timeout");
2893 + LOG_SQ_DEBUG("output timeout");
2894 }
2895 if (output.state == OUTPUT_RUNNING && now - status.last > 1000) {
2896 _sendSTMt = true;
2897 @@ -753,18 +753,18 @@ in_addr_t discover_server(void) {
2898
2899 do {
2900
2901 - LOG_INFO("sending discovery");
2902 + LOG_SQ_INFO("sending discovery");
2903 memset(&s, 0, sizeof(s));
2904
2905 if (sendto(disc_sock, buf, 1, 0, (struct sockaddr *)&d, sizeof(d)) < 0) {
2906 - LOG_INFO("error sending disovery");
2907 + LOG_SQ_INFO("error sending disovery");
2908 }
2909
2910 if (poll(&pollinfo, 1, 5000) == 1) {
2911 char readbuf[10];
2912 socklen_t slen = sizeof(s);
2913 recvfrom(disc_sock, readbuf, 10, 0, (struct sockaddr *)&s, &slen);
2914 - LOG_INFO("got response from: %s:%d", inet_ntoa(s.sin_addr), ntohs(s.sin_port));
2915 + LOG_SQ_INFO("got response from: %s:%d", inet_ntoa(s.sin_addr), ntohs(s.sin_port));
2916 }
2917
2918 } while (s.sin_addr.s_addr == 0 && running);
2919 @@ -820,7 +820,7 @@ void slimproto(log_level level, char *se
2920 if (len > 0 && player_name[len - 1] == '\n') {
2921 player_name[len - 1] = '\0';
2922 }
2923 - LOG_INFO("retrieved name %s from %s", player_name, name_file);
2924 + LOG_SQ_INFO("retrieved name %s from %s", player_name, name_file);
2925 }
2926 fclose(fp);
2927 }
2928 @@ -845,7 +845,7 @@ void slimproto(log_level level, char *se
2929 serv_addr.sin_addr.s_addr = slimproto_ip;
2930 serv_addr.sin_port = htons(slimproto_port);
2931
2932 - LOG_INFO("connecting to %s:%d", inet_ntoa(serv_addr.sin_addr), ntohs(serv_addr.sin_port));
2933 + LOG_SQ_INFO("connecting to %s:%d", inet_ntoa(serv_addr.sin_addr), ntohs(serv_addr.sin_port));
2934
2935 new_server = 0;
2936
2937 @@ -853,7 +853,7 @@ void slimproto(log_level level, char *se
2938
2939 if (new_server) {
2940 slimproto_ip = serv_addr.sin_addr.s_addr = new_server;
2941 - LOG_INFO("switching server to %s:%d", inet_ntoa(serv_addr.sin_addr), ntohs(serv_addr.sin_port));
2942 + LOG_SQ_INFO("switching server to %s:%d", inet_ntoa(serv_addr.sin_addr), ntohs(serv_addr.sin_port));
2943 new_server = 0;
2944 reconnect = false;
2945 }
2946 @@ -865,7 +865,7 @@ void slimproto(log_level level, char *se
2947
2948 if (connect_timeout(sock, (struct sockaddr *) &serv_addr, sizeof(serv_addr), 5) != 0) {
2949
2950 - LOG_INFO("unable to connect to server %u", failed_connect);
2951 + LOG_SQ_INFO("unable to connect to server %u", failed_connect);
2952 sleep(5);
2953
2954 // rediscover server if it was not set at startup
2955 @@ -878,7 +878,7 @@ void slimproto(log_level level, char *se
2956 struct sockaddr_in our_addr;
2957 socklen_t len;
2958
2959 - LOG_INFO("connected");
2960 + LOG_SQ_INFO("connected");
2961
2962 var_cap[0] = '\0';
2963 failed_connect = 0;
2964 @@ -889,7 +889,7 @@ void slimproto(log_level level, char *se
2965 getsockname(sock, (struct sockaddr *) &our_addr, &len);
2966
2967 if (our_addr.sin_addr.s_addr == serv_addr.sin_addr.s_addr) {
2968 - LOG_INFO("local player");
2969 + LOG_SQ_INFO("local player");
2970 strcat(var_cap, ",loc");
2971 }
2972
2973 @@ -916,6 +916,6 @@ void slimproto(log_level level, char *se
2974 }
2975
2976 void slimproto_stop(void) {
2977 - LOG_INFO("slimproto stop");
2978 + LOG_SQ_INFO("slimproto stop");
2979 running = false;
2980 }
2981 --- squeezelite-1.8.orig/squeezelite.h
2982 +++ squeezelite-1.8/squeezelite.h
2983 @@ -363,11 +363,11 @@ typedef enum { lERROR = 0, lWARN, lINFO,
2984 const char *logtime(void);
2985 void logprint(const char *fmt, ...);
2986
2987 -#define LOG_ERROR(fmt, ...) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2988 -#define LOG_WARN(fmt, ...) if (loglevel >= lWARN) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2989 -#define LOG_INFO(fmt, ...) if (loglevel >= lINFO) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2990 -#define LOG_DEBUG(fmt, ...) if (loglevel >= lDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2991 -#define LOG_SDEBUG(fmt, ...) if (loglevel >= lSDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2992 +#define LOG_SQ_ERROR(fmt, ...) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2993 +#define LOG_SQ_WARN(fmt, ...) if (loglevel >= lWARN) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2994 +#define LOG_SQ_INFO(fmt, ...) if (loglevel >= lINFO) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2995 +#define LOG_SQ_DEBUG(fmt, ...) if (loglevel >= lDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2996 +#define LOG_SQ_SDEBUG(fmt, ...) if (loglevel >= lSDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
2997
2998 // utils.c (non logging)
2999 typedef enum { EVENT_TIMEOUT = 0, EVENT_READ, EVENT_WAKE } event_type;
3000 --- squeezelite-1.8.orig/stream.c
3001 +++ squeezelite-1.8/stream.c
3002 @@ -47,21 +47,21 @@ static void send_header(void) {
3003 n = send(fd, ptr, len, MSG_NOSIGNAL);
3004 if (n <= 0) {
3005 if (n < 0 && last_error() == ERROR_WOULDBLOCK && try < 10) {
3006 - LOG_SDEBUG("retrying (%d) writing to socket", ++try);
3007 + LOG_SQ_SDEBUG("retrying (%d) writing to socket", ++try);
3008 usleep(1000);
3009 continue;
3010 }
3011 - LOG_INFO("failed writing to socket: %s", strerror(last_error()));
3012 + LOG_SQ_INFO("failed writing to socket: %s", strerror(last_error()));
3013 stream.disconnect = LOCAL_DISCONNECT;
3014 stream.state = DISCONNECT;
3015 wake_controller();
3016 return;
3017 }
3018 - LOG_SDEBUG("wrote %d bytes to socket", n);
3019 + LOG_SQ_SDEBUG("wrote %d bytes to socket", n);
3020 ptr += n;
3021 len -= n;
3022 }
3023 - LOG_SDEBUG("wrote header");
3024 + LOG_SQ_SDEBUG("wrote header");
3025 }
3026
3027 static bool running = true;
3028 @@ -95,16 +95,16 @@ static void *stream_thread() {
3029
3030 int n = read(fd, streambuf->writep, space);
3031 if (n == 0) {
3032 - LOG_INFO("end of stream");
3033 + LOG_SQ_INFO("end of stream");
3034 _disconnect(DISCONNECT, DISCONNECT_OK);
3035 }
3036 if (n > 0) {
3037 _buf_inc_writep(streambuf, n);
3038 stream.bytes += n;
3039 - LOG_SDEBUG("streambuf read %d bytes", n);
3040 + LOG_SQ_SDEBUG("streambuf read %d bytes", n);
3041 }