decoder/thread: load APE replay gain from remote files
This commit is contained in:
1
NEWS
1
NEWS
@@ -13,6 +13,7 @@ ver 0.20 (not yet released)
|
|||||||
(most importantly some mp3s)
|
(most importantly some mp3s)
|
||||||
- id3: remove the "id3v1_encoding" setting; by definition, all ID3v1 tags
|
- id3: remove the "id3v1_encoding" setting; by definition, all ID3v1 tags
|
||||||
are ISO-Latin-1
|
are ISO-Latin-1
|
||||||
|
- ape: support APE replay gain on remote files
|
||||||
* decoder
|
* decoder
|
||||||
- improved error logging
|
- improved error logging
|
||||||
- report I/O errors to clients
|
- report I/O errors to clients
|
||||||
|
@@ -241,6 +241,18 @@ decoder_run_stream_fallback(Decoder &decoder, InputStream &is)
|
|||||||
decoder_stream_decode(*plugin, decoder, is);
|
decoder_stream_decode(*plugin, decoder, is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempt to load replay gain data, and pass it to
|
||||||
|
* decoder_replay_gain().
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
LoadReplayGain(Decoder &decoder, InputStream &is)
|
||||||
|
{
|
||||||
|
ReplayGainInfo info;
|
||||||
|
if (replay_gain_ape_read(is, info))
|
||||||
|
decoder_replay_gain(decoder, &info);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try decoding a stream.
|
* Try decoding a stream.
|
||||||
*
|
*
|
||||||
@@ -256,6 +268,8 @@ decoder_run_stream(Decoder &decoder, const char *uri)
|
|||||||
if (input_stream == nullptr)
|
if (input_stream == nullptr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
LoadReplayGain(decoder, *input_stream);
|
||||||
|
|
||||||
const ScopeLock protect(dc.mutex);
|
const ScopeLock protect(dc.mutex);
|
||||||
|
|
||||||
bool tried = false;
|
bool tried = false;
|
||||||
|
Reference in New Issue
Block a user