/*!
* Returns the MD5 signature of the uncompressed audio stream as read
- * from the stream info header header.
+ * from the stream info header header.
*/
ByteVector signature() const;
int pos = 1;
d->mimeType = readStringField(data, String::Latin1, &pos);
- /* Now we need at least two more bytes available */
+ /* Now we need at least two more bytes available */
if (uint(pos) + 1 >= data.size()) {
debug("Truncated picture frame.");
return;
// ID3v2.2 Attached Picture
- if(frameID == "PIC") {
+ if(frameID == "PIC") {
AttachedPictureFrame *f = new AttachedPictureFrameV22(data, header);
d->setTextEncoding(f);
return f;
}
- // Relative Volume Adjustment (frames 4.11)
+ // Relative Volume Adjustment (frames 4.11)
if(frameID == "RVA2")
return new RelativeVolumeFrame(data, header);
// APE tag location has changed, update if it exists
if(APETag())
- findAPE();
+ findAPE();
}
else if(stripOthers)
success = strip(ID3v2, false) && success;
else {
seek(0, End);
d->APELocation = tell();
- d->APEFooterLocation = d->APELocation
- + d->tag.access<APE::Tag>(APEIndex, false)->footer()->completeTagSize()
- - APE::Footer::size();
+ APE::Tag *apeTag = d->tag.access<APE::Tag>(APEIndex, false);
+ d->APEFooterLocation = d->APELocation
+ + apeTag->footer()->completeTagSize()
+ - APE::Footer::size();
writeBlock(APETag()->render());
d->APEOriginalSize = APETag()->footer()->completeTagSize();
d->hasAPE = true;
seek(d->APEFooterLocation);
APE::Footer footer(readBlock(APE::Footer::size()));
d->APELocation = d->APEFooterLocation - footer.completeTagSize()
- + APE::Footer::size();
+ + APE::Footer::size();
return;
}
}
// The first thing in the comment data is the vendor ID length, followed by a
// UTF8 string with the vendor ID.
- int pos = 0;
+ uint pos = 0;
int vendorLength = data.mid(0, 4).toUInt(false);
pos += 4;
double f;
int expon;
unsigned long hiMant, loMant;
-
+
expon = ((bytes[0] & 0x7F) << 8) | (bytes[1] & 0xFF);
hiMant = ((unsigned long)(bytes[2] & 0xFF) << 24) |
uint RIFF::AIFF::Properties::sampleFrames() const
{
- return d->sampleFrames;
+ return d->sampleFrames;
}
////////////////////////////////////////////////////////////////////////////////
class TAGLIB_EXPORT Properties : public AudioProperties
{
public:
- /*!
- * Create an instance of AIFF::Properties with the data read from the
- * ByteVector \a data.
- */
- Properties(const ByteVector &data, ReadStyle style);
+ /*!
+ * Create an instance of AIFF::Properties with the data read from the
+ * ByteVector \a data.
+ */
+ Properties(const ByteVector &data, ReadStyle style);
- /*!
- * Destroys this AIFF::Properties instance.
- */
- virtual ~Properties();
+ /*!
+ * Destroys this AIFF::Properties instance.
+ */
+ virtual ~Properties();
- // Reimplementations.
+ // Reimplementations.
- virtual int length() const;
- virtual int bitrate() const;
- virtual int sampleRate() const;
- virtual int channels() const;
+ virtual int length() const;
+ virtual int bitrate() const;
+ virtual int sampleRate() const;
+ virtual int channels() const;
- int sampleWidth() const;
- uint sampleFrames() const;
+ int sampleWidth() const;
+ uint sampleFrames() const;
private:
- Properties(const Properties &);
- Properties &operator=(const Properties &);
+ Properties(const Properties &);
+ Properties &operator=(const Properties &);
- void read(const ByteVector &data);
+ void read(const ByteVector &data);
- class PropertiesPrivate;
- PropertiesPrivate *d;
+ class PropertiesPrivate;
+ PropertiesPrivate *d;
};
}
}
uint RIFF::WAV::Properties::sampleFrames() const
{
- return d->sampleFrames;
+ return d->sampleFrames;
}
////////////////////////////////////////////////////////////////////////////////
class TAGLIB_EXPORT Properties : public AudioProperties
{
public:
- /*!
- * Create an instance of WAV::Properties with the data read from the
- * ByteVector \a data.
- */
- Properties(const ByteVector &data, ReadStyle style);
+ /*!
+ * Create an instance of WAV::Properties with the data read from the
+ * ByteVector \a data.
+ */
+ Properties(const ByteVector &data, ReadStyle style);
- /*!
- * Create an instance of WAV::Properties with the data read from the
- * ByteVector \a data and the length calculated using \a streamLength.
- */
- Properties(const ByteVector &data, uint streamLength, ReadStyle style);
+ /*!
+ * Create an instance of WAV::Properties with the data read from the
+ * ByteVector \a data and the length calculated using \a streamLength.
+ */
+ Properties(const ByteVector &data, uint streamLength, ReadStyle style);
- /*!
- * Destroys this WAV::Properties instance.
- */
- virtual ~Properties();
+ /*!
+ * Destroys this WAV::Properties instance.
+ */
+ virtual ~Properties();
- // Reimplementations.
+ // Reimplementations.
- virtual int length() const;
- virtual int bitrate() const;
- virtual int sampleRate() const;
- virtual int channels() const;
+ virtual int length() const;
+ virtual int bitrate() const;
+ virtual int sampleRate() const;
+ virtual int channels() const;
- int sampleWidth() const;
- uint sampleFrames() const;
+ int sampleWidth() const;
+ uint sampleFrames() const;
private:
- Properties(const Properties &);
- Properties &operator=(const Properties &);
+ Properties(const Properties &);
+ Properties &operator=(const Properties &);
- void read(const ByteVector &data);
+ void read(const ByteVector &data);
- class PropertiesPrivate;
- PropertiesPrivate *d;
+ class PropertiesPrivate;
+ PropertiesPrivate *d;
};
}
}
static ByteVector null;
/*!
- * Returns a hex-encoded copy of the byte vector.
- */
+ * Returns a hex-encoded copy of the byte vector.
+ */
ByteVector toHex() const;
protected:
readOnly = false;
else
file = _wfopen(name, L"rb");
- }
+ }
if(file)
return;