mirror of
https://github.com/taglib/taglib.git
synced 2026-02-05 06:50:19 -05:00
Add methods RelativeVolumeFrame::identification and RelativeVolumeFrame::setIdentification.
BUG:150481 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@735098 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -162,20 +162,28 @@ void RelativeVolumeFrame::setPeakVolume(const PeakVolume &peak)
|
||||
setPeakVolume(peak, MasterVolume);
|
||||
}
|
||||
|
||||
String RelativeVolumeFrame::identification() const
|
||||
{
|
||||
return d->identification;
|
||||
}
|
||||
|
||||
void RelativeVolumeFrame::setIdentification(const String &s)
|
||||
{
|
||||
d->identification = s;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// protected members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void RelativeVolumeFrame::parseFields(const ByteVector &data)
|
||||
{
|
||||
ByteVector delimiter = textDelimiter(String::Latin1);
|
||||
uint pos = data.find(delimiter);
|
||||
d->identification = String(data.mid(0, pos), String::Latin1);
|
||||
pos += delimiter.size();
|
||||
int pos = 0;
|
||||
d->identification = readStringField(data, String::Latin1, &pos);
|
||||
|
||||
// Each channel is at least 4 bytes.
|
||||
|
||||
while(pos <= data.size() - 4) {
|
||||
while(pos <= (int)data.size() - 4) {
|
||||
|
||||
|
||||
ChannelType type = ChannelType(data[pos]);
|
||||
|
||||
@ -244,6 +244,18 @@ namespace TagLib {
|
||||
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Returns the identification for this frame.
|
||||
*/
|
||||
String identification() const;
|
||||
|
||||
/*!
|
||||
* Sets the identification of the frame to \a s. The string
|
||||
* is used to identify the situation and/or device where this
|
||||
* adjustment should apply.
|
||||
*/
|
||||
void setIdentification(const String &s);
|
||||
|
||||
protected:
|
||||
virtual void parseFields(const ByteVector &data);
|
||||
virtual ByteVector renderFields() const;
|
||||
|
||||
Reference in New Issue
Block a user