mirror of
https://github.com/taglib/taglib.git
synced 2026-07-22 19:30:53 -04:00
Proofreading (#1155)
--------- Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
This commit is contained in:
@@ -143,7 +143,7 @@ Frame *Frame::createTextualFrame(const String &key, const StringList &values) //
|
||||
frame->setText(values.front());
|
||||
return frame;
|
||||
}
|
||||
// if non of the above cases apply, we use a TXXX frame with the key as description
|
||||
// if none of the above cases apply, we use a TXXX frame with the key as description
|
||||
return new UserTextIdentificationFrame(keyToTXXX(key), values, String::UTF8);
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ Frame *FrameFactory::createFrame(const ByteVector &data, Frame::Header *header,
|
||||
ByteVector frameID = header->frameID();
|
||||
|
||||
// This is where things get necessarily nasty. Here we determine which
|
||||
// Frame subclass (or if none is found simply an Frame) based
|
||||
// Frame subclass (or if none is found simply a Frame) based
|
||||
// on the frame ID. Since there are a lot of possibilities, that means
|
||||
// a lot of if blocks.
|
||||
|
||||
@@ -488,7 +488,7 @@ bool FrameFactory::updateFrame(Frame::Header *header) const
|
||||
return false;
|
||||
}
|
||||
|
||||
// ID3v2.2 only used 3 bytes for the frame ID, so we need to convert all of
|
||||
// ID3v2.2 only used 3 bytes for the frame ID, so we need to convert all
|
||||
// the frames to their 4 byte ID3v2.4 equivalent.
|
||||
|
||||
for(const auto &[o, t] : frameConversion2) {
|
||||
|
||||
@@ -182,7 +182,7 @@ String ID3v2::Tag::genre() const
|
||||
|
||||
// ID3v2.4 lists genres as the fields in its frames field list. If the field
|
||||
// is simply a number it can be assumed that it is an ID3v1 genre number.
|
||||
// Here was assume that if an ID3v1 string is present that it should be
|
||||
// Here was assumed that if an ID3v1 string is present then it should be
|
||||
// appended to the genre string. Multiple fields will be appended as the
|
||||
// string is built.
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ void MPEG::Header::parse(File *file, offset_t offset, bool checkLength)
|
||||
std::array { 11025, 12000, 8000, 0 } // Version 2.5
|
||||
};
|
||||
|
||||
// The sample rate index is encoded as two bits in the 3nd byte, i.e. xxxx11xx
|
||||
// The sample rate index is encoded as two bits in the 3rd byte, i.e. xxxx11xx
|
||||
|
||||
const int samplerateIndex = (static_cast<unsigned char>(data[2]) >> 2) & 0x03;
|
||||
|
||||
@@ -230,7 +230,7 @@ void MPEG::Header::parse(File *file, offset_t offset, bool checkLength)
|
||||
return;
|
||||
}
|
||||
|
||||
// The channel mode is encoded as a 2 bit value at the end of the 3nd byte,
|
||||
// The channel mode is encoded as a 2 bit value at the end of the 3rd byte,
|
||||
// i.e. xxxxxx11
|
||||
|
||||
d->channelMode = static_cast<ChannelMode>((static_cast<unsigned char>(data[3]) >> 6) & 0x03);
|
||||
|
||||
Reference in New Issue
Block a user