Fix RVA setting / parsing. Patch from Stephen Booth.

BUG:107025



git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@689477 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler
2007-07-18 11:36:26 +00:00
parent 12dcb75582
commit 711132c89f

View File

@ -130,7 +130,7 @@ float RelativeVolumeFrame::volumeAdjustment() const
void RelativeVolumeFrame::setVolumeAdjustment(float adjustment, ChannelType type)
{
d->channels[type].volumeAdjustment = short(adjustment / float(512));
d->channels[type].volumeAdjustment = short(adjustment * float(512));
}
void RelativeVolumeFrame::setVolumeAdjustment(float adjustment)
@ -164,8 +164,10 @@ void RelativeVolumeFrame::setPeakVolume(const PeakVolume &peak)
void RelativeVolumeFrame::parseFields(const ByteVector &data)
{
uint pos = data.find(textDelimiter(String::Latin1));
ByteVector delimiter = textDelimiter(String::Latin1);
uint pos = data.find(delimiter);
d->identification = String(data.mid(0, pos), String::Latin1);
pos += delimiter.size();
// Each channel is at least 4 bytes.