|
VLC 4.0.0-dev
|
Functions to read replay gain tags. More...
Data Structures | |
| struct | audio_replay_gain_t |
| Audio replay gain. More... | |
Macros | |
| #define | AUDIO_REPLAY_GAIN_TRACK (0) |
| Index for track values. | |
| #define | AUDIO_REPLAY_GAIN_ALBUM (1) |
| Index for album values. | |
| #define | AUDIO_REPLAY_GAIN_MAX (2) |
| Number of replay gain types. | |
Functions | |
| int | vlc_replay_gain_CopyFromMeta (audio_replay_gain_t *p_dst, const vlc_meta_t *p_meta) |
| Extracts replay gain info from metadata and copies it into a replay gain structure. | |
| float | replay_gain_CalcMultiplier (vlc_object_t *obj, const audio_replay_gain_t *p_rg) |
| Calculates the replay gain multiplier according to the Replay Gain 2.0 Specification. | |
| static void | replay_gain_Merge (audio_replay_gain_t *p_dst, const audio_replay_gain_t *p_src) |
| Merges replay gain structures. | |
| static bool | replay_gain_Compare (const audio_replay_gain_t *p_a, const audio_replay_gain_t *p_b) |
| Compares two replay gain structures. | |
| static void | replay_gain_Reset (audio_replay_gain_t *p_rg) |
| Reset replay gain structure values. | |
Functions to read replay gain tags.
| #define AUDIO_REPLAY_GAIN_ALBUM (1) |
Index for album values.
| #define AUDIO_REPLAY_GAIN_MAX (2) |
Number of replay gain types.
| #define AUDIO_REPLAY_GAIN_TRACK (0) |
Index for track values.
| float replay_gain_CalcMultiplier | ( | vlc_object_t * | obj, |
| const audio_replay_gain_t * | p_rg | ||
| ) |
Calculates the replay gain multiplier according to the Replay Gain 2.0 Specification.
User preferences control mode, pre-amp, default gain, and peak protection.
| obj | calling vlc object |
| p_rg | replay gain structure |
References AUDIO_REPLAY_GAIN_ALBUM, AUDIO_REPLAY_GAIN_MAX, AUDIO_REPLAY_GAIN_TRACK, likely, msg_Dbg, audio_replay_gain_t::pb_gain, audio_replay_gain_t::pb_peak, audio_replay_gain_t::pb_reference_loudness, audio_replay_gain_t::pf_gain, audio_replay_gain_t::pf_peak, audio_replay_gain_t::pf_reference_loudness, var_InheritBool(), var_InheritFloat(), and var_InheritString().
Referenced by ReplayGainCallback().
|
inlinestatic |
Compares two replay gain structures.
| p_a | First replay gain structure |
| p_b | Second replay gain structure |
References AUDIO_REPLAY_GAIN_MAX, audio_replay_gain_t::pb_gain, audio_replay_gain_t::pb_peak, audio_replay_gain_t::pb_reference_loudness, audio_replay_gain_t::pf_gain, audio_replay_gain_t::pf_peak, and audio_replay_gain_t::pf_reference_loudness.
Referenced by ModuleThread_UpdateAudioFormat().
|
inlinestatic |
Merges replay gain structures.
Only copies gain/peak/reference loudness values that are:
| p_dst | Destination replay gain structure |
| p_src | Source replay gain structure |
References AUDIO_REPLAY_GAIN_MAX, audio_replay_gain_t::pb_gain, audio_replay_gain_t::pb_peak, audio_replay_gain_t::pb_reference_loudness, audio_replay_gain_t::pf_gain, audio_replay_gain_t::pf_peak, and audio_replay_gain_t::pf_reference_loudness.
Referenced by CreateDecoder(), and EsOutFillEsFmt().
|
inlinestatic |
Reset replay gain structure values.
| p_dst | Replay gain structure |
References AUDIO_REPLAY_GAIN_MAX, audio_replay_gain_t::pb_gain, audio_replay_gain_t::pb_peak, audio_replay_gain_t::pb_reference_loudness, audio_replay_gain_t::pf_gain, audio_replay_gain_t::pf_peak, and audio_replay_gain_t::pf_reference_loudness.
| int vlc_replay_gain_CopyFromMeta | ( | audio_replay_gain_t * | p_dst, |
| const vlc_meta_t * | p_meta | ||
| ) |
Extracts replay gain info from metadata and copies it into a replay gain structure.
Supports both capitalized and lowercase metadata tags.
| p_dst | Destination replay gain structure to fill |
| p_meta | Metadata structure to extract values from |
References ARRAY_SIZE, AUDIO_REPLAY_GAIN_ALBUM, AUDIO_REPLAY_GAIN_TRACK, f_value, audio_replay_gain_t::pb_gain, audio_replay_gain_t::pb_peak, audio_replay_gain_t::pb_reference_loudness, audio_replay_gain_t::pf_gain, audio_replay_gain_t::pf_peak, audio_replay_gain_t::pf_reference_loudness, VLC_EGENERIC, VLC_EINVAL, vlc_meta_GetExtra(), vlc_strtof_c(), and VLC_SUCCESS.
Referenced by EsOutFillEsFmt().