From ae11b3db3832f8011f615f748eb54bf0bb15fb4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sun, 4 Nov 2012 09:52:03 +0100 Subject: [PATCH] Default parameter values in RelativeVolumeFrame --- .../mpeg/id3v2/frames/relativevolumeframe.cpp | 30 ------------------- .../mpeg/id3v2/frames/relativevolumeframe.h | 27 ----------------- 2 files changed, 57 deletions(-) diff --git a/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp b/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp index 955b3ad0..33254ede 100644 --- a/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp +++ b/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp @@ -107,61 +107,31 @@ short RelativeVolumeFrame::volumeAdjustmentIndex(ChannelType type) const return d->channels.contains(type) ? d->channels[type].volumeAdjustment : 0; } -short RelativeVolumeFrame::volumeAdjustmentIndex() const -{ - return volumeAdjustmentIndex(MasterVolume); -} - void RelativeVolumeFrame::setVolumeAdjustmentIndex(short index, ChannelType type) { d->channels[type].volumeAdjustment = index; } -void RelativeVolumeFrame::setVolumeAdjustmentIndex(short index) -{ - setVolumeAdjustmentIndex(index, MasterVolume); -} - float RelativeVolumeFrame::volumeAdjustment(ChannelType type) const { return d->channels.contains(type) ? float(d->channels[type].volumeAdjustment) / float(512) : 0; } -float RelativeVolumeFrame::volumeAdjustment() const -{ - return volumeAdjustment(MasterVolume); -} - void RelativeVolumeFrame::setVolumeAdjustment(float adjustment, ChannelType type) { d->channels[type].volumeAdjustment = short(adjustment * float(512)); } -void RelativeVolumeFrame::setVolumeAdjustment(float adjustment) -{ - setVolumeAdjustment(adjustment, MasterVolume); -} - RelativeVolumeFrame::PeakVolume RelativeVolumeFrame::peakVolume(ChannelType type) const { return d->channels.contains(type) ? d->channels[type].peakVolume : PeakVolume(); } -RelativeVolumeFrame::PeakVolume RelativeVolumeFrame::peakVolume() const -{ - return peakVolume(MasterVolume); -} - void RelativeVolumeFrame::setPeakVolume(const PeakVolume &peak, ChannelType type) { d->channels[type].peakVolume = peak; } -void RelativeVolumeFrame::setPeakVolume(const PeakVolume &peak) -{ - setPeakVolume(peak, MasterVolume); -} - String RelativeVolumeFrame::identification() const { return d->identification; diff --git a/taglib/mpeg/id3v2/frames/relativevolumeframe.h b/taglib/mpeg/id3v2/frames/relativevolumeframe.h index dad4e7d4..9efa362e 100644 --- a/taglib/mpeg/id3v2/frames/relativevolumeframe.h +++ b/taglib/mpeg/id3v2/frames/relativevolumeframe.h @@ -144,8 +144,6 @@ namespace TagLib { * least pretend that it looks clean. */ -#ifdef DOXYGEN - /*! * Returns the relative volume adjustment "index". As indicated by the * ID3v2 standard this is a 16-bit signed integer that reflects the @@ -219,31 +217,6 @@ namespace TagLib { */ void setPeakVolume(const PeakVolume &peak, ChannelType type = MasterVolume); -#else - - // BIC: Combine each of the following pairs of functions (or maybe just - // rework this junk altogether). - - short volumeAdjustmentIndex(ChannelType type) const; - short volumeAdjustmentIndex() const; - - void setVolumeAdjustmentIndex(short index, ChannelType type); - void setVolumeAdjustmentIndex(short index); - - float volumeAdjustment(ChannelType type) const; - float volumeAdjustment() const; - - void setVolumeAdjustment(float adjustment, ChannelType type); - void setVolumeAdjustment(float adjustment); - - PeakVolume peakVolume(ChannelType type) const; - PeakVolume peakVolume() const; - - void setPeakVolume(const PeakVolume &peak, ChannelType type); - void setPeakVolume(const PeakVolume &peak); - -#endif - /*! * Returns the identification for this frame. */