Merge branch 'v0.17.x'
Conflicts: src/locate.c
This commit is contained in:
@@ -124,11 +124,10 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block,
|
||||
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
|
||||
if (flac_parse_replay_gain(&rgi, block))
|
||||
replay_gain_db = decoder_replay_gain(data->decoder, &rgi);
|
||||
if (flac_parse_mixramp(&mixramp_start, &mixramp_end, block)) {
|
||||
g_debug("setting mixramp_tags");
|
||||
|
||||
if (flac_parse_mixramp(&mixramp_start, &mixramp_end, block))
|
||||
decoder_mixramp(data->decoder, replay_gain_db,
|
||||
mixramp_start, mixramp_end);
|
||||
}
|
||||
|
||||
if (data->tag != NULL)
|
||||
flac_vorbis_comments_to_tag(data->tag, NULL,
|
||||
|
@@ -365,11 +365,10 @@ static void mp3_parse_id3(struct mp3_data *data, size_t tagsize,
|
||||
replay_gain_db = decoder_replay_gain(data->decoder, &rgi);
|
||||
data->found_replay_gain = true;
|
||||
}
|
||||
if (parse_id3_mixramp(&mixramp_start, &mixramp_end, id3_tag)) {
|
||||
g_debug("setting mixramp_tags");
|
||||
|
||||
if (parse_id3_mixramp(&mixramp_start, &mixramp_end, id3_tag))
|
||||
decoder_mixramp(data->decoder, replay_gain_db,
|
||||
mixramp_start, mixramp_end);
|
||||
}
|
||||
}
|
||||
|
||||
id3_tag_delete(id3_tag);
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include "utils.h"
|
||||
#include "tag_table.h"
|
||||
#include "tag_handler.h"
|
||||
#include "tag_ape.h"
|
||||
|
||||
#include <wavpack/wavpack.h>
|
||||
#include <glib.h>
|
||||
@@ -38,21 +39,6 @@
|
||||
|
||||
#define ERRORLEN 80
|
||||
|
||||
static const struct tag_table wavpack_tags[] = {
|
||||
{ "artist", TAG_ARTIST },
|
||||
{ "album", TAG_ALBUM },
|
||||
{ "title", TAG_TITLE },
|
||||
{ "track", TAG_TRACK },
|
||||
{ "name", TAG_NAME },
|
||||
{ "genre", TAG_GENRE },
|
||||
{ "date", TAG_DATE },
|
||||
{ "composer", TAG_COMPOSER },
|
||||
{ "performer", TAG_PERFORMER },
|
||||
{ "comment", TAG_COMMENT },
|
||||
{ "disc", TAG_DISC },
|
||||
{ NULL, TAG_NUM_OF_ITEM_TYPES }
|
||||
};
|
||||
|
||||
/** A pointer type for format converter function. */
|
||||
typedef void (*format_samples_t)(
|
||||
int bytes_per_sample,
|
||||
@@ -321,7 +307,17 @@ wavpack_scan_file(const char *fname,
|
||||
WavpackGetNumSamples(wpc) /
|
||||
WavpackGetSampleRate(wpc));
|
||||
|
||||
for (const struct tag_table *i = wavpack_tags; i->name != NULL; ++i)
|
||||
/* the WavPack format implies APEv2 tags, which means we can
|
||||
reuse the mapping from tag_ape.c */
|
||||
|
||||
for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; ++i) {
|
||||
const char *name = tag_item_names[i];
|
||||
if (name != NULL)
|
||||
wavpack_scan_tag_item(wpc, name, (enum tag_type)i,
|
||||
handler, handler_ctx);
|
||||
}
|
||||
|
||||
for (const struct tag_table *i = ape_tags; i->name != NULL; ++i)
|
||||
wavpack_scan_tag_item(wpc, i->name, i->type,
|
||||
handler, handler_ctx);
|
||||
|
||||
|
Reference in New Issue
Block a user