diff options
author | Max Kellermann <max@duempel.org> | 2013-01-05 02:05:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-05 02:40:29 +0100 |
commit | 46ed91b53d4ee6df3f9b98bcfb4e36a97420b885 (patch) | |
tree | 2b1bfed19c42545822dcc524edaaadf11c1fc94f /src/decoder/FLACCommon.cxx | |
parent | 73f6fc428a2d9b58564f0dabdbc59080a731ed5c (diff) | |
download | mpd-46ed91b53d4ee6df3f9b98bcfb4e36a97420b885.tar.gz mpd-46ed91b53d4ee6df3f9b98bcfb4e36a97420b885.tar.xz mpd-46ed91b53d4ee6df3f9b98bcfb4e36a97420b885.zip |
DecoderAPI: _replay_gain() returns void
Let the function decoder_replay_gain() update
decoder_control::replay_gain_db instead of letting each decoder plugin
take care for that.
Diffstat (limited to 'src/decoder/FLACCommon.cxx')
-rw-r--r-- | src/decoder/FLACCommon.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoder/FLACCommon.cxx b/src/decoder/FLACCommon.cxx index 97743f332..25fd1f964 100644 --- a/src/decoder/FLACCommon.cxx +++ b/src/decoder/FLACCommon.cxx @@ -109,7 +109,6 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block, struct replay_gain_info rgi; char *mixramp_start; char *mixramp_end; - float replay_gain_db = 0; switch (block->type) { case FLAC__METADATA_TYPE_STREAMINFO: @@ -118,10 +117,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); + decoder_replay_gain(data->decoder, &rgi); if (flac_parse_mixramp(&mixramp_start, &mixramp_end, block)) - decoder_mixramp(data->decoder, replay_gain_db, + decoder_mixramp(data->decoder, mixramp_start, mixramp_end); if (data->tag != nullptr) |