From 67de7ea1162f55b2a6d59d536827a66574bbebcd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 22 Aug 2006 06:36:56 +0000 Subject: fix Replay Gain reading for FLAC and OggFLAC This bug was NOT introduced in my OggFLAC additions, honest! As far as I can see, it was introduced way back in r2482, but nobody ever noticed until the post here: http://www.musicpd.org/forum/index.php?topic=1152.0 While we're at it, clean up some of the variable typing. git-svn-id: https://svn.musicpd.org/mpd/trunk@4664 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/_flac_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/inputPlugins/_flac_common.c') diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c index acf582709..e2b336a35 100644 --- a/src/inputPlugins/_flac_common.c +++ b/src/inputPlugins/_flac_common.c @@ -53,7 +53,7 @@ void init_FlacData(FlacData * data, OutputBuffer * cb, } static int flacFindVorbisCommentFloat(const FLAC__StreamMetadata * block, - char *cmnt, float *fl) + const char *cmnt, float *fl) { int offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, 0, cmnt); @@ -82,20 +82,20 @@ static int flacFindVorbisCommentFloat(const FLAC__StreamMetadata * block, static void flacParseReplayGain(const FLAC__StreamMetadata * block, FlacData * data) { - unsigned int found = 0; + int found = 0; if (data->replayGainInfo) freeReplayGainInfo(data->replayGainInfo); data->replayGainInfo = newReplayGainInfo(); - found &= flacFindVorbisCommentFloat(block, "replaygain_album_gain", + found |= flacFindVorbisCommentFloat(block, "replaygain_album_gain", &data->replayGainInfo->albumGain); - found &= flacFindVorbisCommentFloat(block, "replaygain_album_peak", + found |= flacFindVorbisCommentFloat(block, "replaygain_album_peak", &data->replayGainInfo->albumPeak); - found &= flacFindVorbisCommentFloat(block, "replaygain_track_gain", + found |= flacFindVorbisCommentFloat(block, "replaygain_track_gain", &data->replayGainInfo->trackGain); - found &= flacFindVorbisCommentFloat(block, "replaygain_track_peak", + found |= flacFindVorbisCommentFloat(block, "replaygain_track_peak", &data->replayGainInfo->trackPeak); if (!found) { -- cgit v1.2.3