Commit 9f3bbab5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

include/vlc_input.h: This commit should have been part of r21062.

parent 1dc88b3c
......@@ -201,38 +201,33 @@ VLC_EXPORT( input_item_t *, input_ItemGetById, (playlist_t *, int ) );
static inline void vlc_audio_replay_gain_MergeFromMeta( audio_replay_gain_t *p_dst,
const vlc_meta_t *p_meta )
{
int i;
char * psz_value;
if( !p_meta )
return;
for( i = 0; i < p_meta->i_extra; i++ )
if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_GAIN" )) ||
(psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_RADIO" )) )
{
const char *psz_name = p_meta->ppsz_extra_name[i];
const char *psz_value = p_meta->ppsz_extra_value[i];
if( !strcasecmp( psz_name, "REPLAYGAIN_TRACK_GAIN" ) ||
!strcasecmp( psz_name, "RG_RADIO" ) )
{
p_dst->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( !strcasecmp( psz_name, "REPLAYGAIN_TRACK_PEAK" ) ||
!strcasecmp( psz_name, "RG_PEAK" ) )
{
p_dst->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( !strcasecmp( psz_name, "REPLAYGAIN_ALBUM_GAIN" ) ||
!strcasecmp( psz_name, "RG_AUDIOPHILE" ) )
{
p_dst->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
else if( !strcasecmp( psz_name, "REPLAYGAIN_ALBUM_PEAK" ) )
{
p_dst->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
p_dst->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_PEAK" )) ||
(psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_PEAK" )) )
{
p_dst->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
}
else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_GAIN" )) ||
(psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_AUDIOPHILE" )) )
{
p_dst->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
p_dst->pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_PEAK" )) )
{
p_dst->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
p_dst->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment