configure.ac sets this, but this wasn't used for compiling third-party
libraries. This setting however is important for libnfs, which adds
fallback definitions for POLLIN and POLLOUT with bogus values.
libmad has been unmaintained for a long time, and it fails to build on
Windows. I could go and fix libmad's broken configure script, but I
prefer to just assign MP3 decoding to FFmpeg for now.
Closes#228
read_stream_art uses PRIu64 unconditionally with the Format
method of a Respone instance to output a size_t typed value.
If size_t is 32bit the output is garbeled. This patch uses
offset_type and PRIoffset to make sure the format string
and the type of the output value always match.
This addresses two problems:
1. the libFLAC write callback had to send an error status to its
caller when SubmitData() returned a command; this disrupted libFLAC
and the resulting command could not be used for anything;
2. the libFLAC function FLAC__stream_decoder_seek_absolute() also
calls the write callback, but its result cannot be used, because
seeking is still in progress, so we lose all data from one FLAC frame.
By moving the SubmitData() call until after CommandFinished(), we
avoid losing this data. This fixes another part of #113
Instead of passing whole chunks to the MusicPipe and checking the
end_time after each chunk, truncate the last chunk if it would exceed
the end_time. This requires keeping track of the absolute PCM frame
number.
This fixes a problem with gapless CUE song transitions: a small part
of the following song was always played twice.
Closes#113
The normal I/O event thread can have a large latency, e.g. when
libgnutls loads all TLS CA certificates for a https connect. This
makes it unreliable for the ALSA I/O notifications, and causes ring
buffer xruns. To avoid interfering with high latency events such as
CURL's, we move the ALSA I/O events to a separate I/O thread which
also obtains real-time scheduling (if possible).
Closes#221
Due to rounding errors, a slightly negative value can be passed to
set_normalized_volume(), which will make the log10() call fail.
Actually, volume 0 is already failing because log10(0) is illegal. So
let's fix this by implementing two corner cases: <=0 and >=100.
Closes#212