////////////////////////////////////////////////////////////////////////////////
Ogg::FLAC::File::File(const char *file, bool readProperties,
- Properties::ReadStyle propertiesStyle) : Ogg::File(file)
+ Properties::ReadStyle propertiesStyle) : Ogg::File(file)
{
d = new FilePrivate;
read(readProperties, propertiesStyle);
// Create FLAC metadata-block:
- // Put the size in the first 32 bit ( I assume no more than 24 bit are used )
+ // Put the size in the first 32 bit (I assume no more than 24 bit are used)
ByteVector v = ByteVector::fromUInt(d->xiphCommentData.size());
if(d->hasXiphComment)
d->comment = new Ogg::XiphComment(xiphCommentData());
- else {
- d->comment = new Ogg::XiphComment();
- }
+ else
+ d->comment = new Ogg::XiphComment;
if(readProperties)
ByteVector metadataHeader = packet(ipacket);
- if (metadataHeader == ByteVector::null)
+ if(metadataHeader.isNull())
return;
ByteVector header = metadataHeader.mid(0,4);
// Header format (from spec):
// <1> Last-metadata-block flag
// <7> BLOCK_TYPE
- // 0 : STREAMINFO
+ // 0 : STREAMINFO
// 1 : PADDING
// ..
// 4 : VORBIS_COMMENT
overhead += length;
if(blockType == 1) {
-// debug("Ogg::FLAC::File::scan() -- Padding found");
- } else
- if(blockType == 4) {
-// debug("Ogg::FLAC::File::scan() -- Vorbis-comments found");
+ // debug("Ogg::FLAC::File::scan() -- Padding found");
+ }
+ else if(blockType == 4) {
+ // debug("Ogg::FLAC::File::scan() -- Vorbis-comments found");
d->xiphCommentData = metadataHeader.mid(4, length);
d->hasXiphComment = true;
d->commentPacket = ipacket;
- } else
- if(blockType > 5) {
- debug("Ogg::FLAC::File::scan() -- Unknown metadata block");
}
+ else if(blockType > 5)
+ debug("Ogg::FLAC::File::scan() -- Unknown metadata block");
}
public:
/*!
* Contructs an Ogg/FLAC file from \a file. If \a readProperties is true
- * the file's audio properties will also be read using \a propertiesStyle. * If false, \a propertiesStyle is ignored.
+ * the file's audio properties will also be read using \a propertiesStyle.
+ * If false, \a propertiesStyle is ignored.
*/
File(const char *file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);