add support for new REPLAYGAIN_REFERENCE_LOUDNESS tag

This commit is contained in:
Josh Coalson
2006-09-14 00:40:03 +00:00
parent dcf04428fe
commit b292e75ebf
10 changed files with 100 additions and 31 deletions

View File

@@ -27,6 +27,7 @@
#include "share/grabbag.h"
void FLAC_plugin__replaygain_get_from_file(const char *filename,
double *reference, FLAC__bool *reference_set,
double *track_gain, FLAC__bool *track_gain_set,
double *album_gain, FLAC__bool *album_gain_set,
double *track_peak, FLAC__bool *track_peak_set,
@@ -43,11 +44,11 @@ void FLAC_plugin__replaygain_get_from_file(const char *filename,
if(FLAC__metadata_simple_iterator_get_block_type(iterator) == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
FLAC__StreamMetadata *block = FLAC__metadata_simple_iterator_get_block(iterator);
if(0 != block) {
if(grabbag__replaygain_load_from_vorbiscomment(block, /*album_mode=*/false, /*strict=*/true, track_gain, track_peak)) {
*track_gain_set = *track_peak_set = true;
if(grabbag__replaygain_load_from_vorbiscomment(block, /*album_mode=*/false, /*strict=*/true, reference, track_gain, track_peak)) {
*reference_set = *track_gain_set = *track_peak_set = true;
}
if(grabbag__replaygain_load_from_vorbiscomment(block, /*album_mode=*/true, /*strict=*/true, album_gain, album_peak)) {
*album_gain_set = *album_peak_set = true;
if(grabbag__replaygain_load_from_vorbiscomment(block, /*album_mode=*/true, /*strict=*/true, reference, album_gain, album_peak)) {
*reference_set = *album_gain_set = *album_peak_set = true;
}
FLAC__metadata_object_delete(block);
got_vorbis_comments = true;

View File

@@ -23,6 +23,7 @@
#include "FLAC/ordinals.h"
void FLAC_plugin__replaygain_get_from_file(const char *filename,
double *reference, FLAC__bool *reference_set,
double *track_gain, FLAC__bool *track_gain_set,
double *album_gain, FLAC__bool *album_gain_set,
double *track_peak, FLAC__bool *track_peak_set,