tag/ApeReplayGain: add overload with InputStream& parameter
This commit is contained in:
parent
b5c206d3ae
commit
222b777552
@ -47,6 +47,23 @@ replay_gain_ape_callback(unsigned long flags, const char *key,
|
|||||||
return ParseReplayGainTag(info, key, value);
|
return ParseReplayGainTag(info, key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
replay_gain_ape_read(InputStream &is, ReplayGainInfo &info)
|
||||||
|
{
|
||||||
|
bool found = false;
|
||||||
|
|
||||||
|
auto callback = [&info, &found]
|
||||||
|
(unsigned long flags, const char *key,
|
||||||
|
StringView value) {
|
||||||
|
found |= replay_gain_ape_callback(flags, key,
|
||||||
|
value,
|
||||||
|
info);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
return tag_ape_scan(is, callback) && found;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
replay_gain_ape_read(Path path_fs, ReplayGainInfo &info)
|
replay_gain_ape_read(Path path_fs, ReplayGainInfo &info)
|
||||||
{
|
{
|
||||||
|
@ -22,9 +22,13 @@
|
|||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
|
class InputStream;
|
||||||
class Path;
|
class Path;
|
||||||
struct ReplayGainInfo;
|
struct ReplayGainInfo;
|
||||||
|
|
||||||
|
bool
|
||||||
|
replay_gain_ape_read(InputStream &is, ReplayGainInfo &info);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
replay_gain_ape_read(Path path_fs, ReplayGainInfo &info);
|
replay_gain_ape_read(Path path_fs, ReplayGainInfo &info);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user