mirror of
https://github.com/taglib/taglib.git
synced 2025-11-16 06:32:52 -05:00
Added FLAC::Properties::signature()
BUG:160172 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1148630 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -52,6 +52,7 @@ public:
|
||||
int sampleRate;
|
||||
int sampleWidth;
|
||||
int channels;
|
||||
ByteVector signature;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -100,6 +101,11 @@ int FLAC::Properties::channels() const
|
||||
return d->channels;
|
||||
}
|
||||
|
||||
ByteVector FLAC::Properties::signature() const
|
||||
{
|
||||
return d->signature;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -147,4 +153,6 @@ void FLAC::Properties::read()
|
||||
// Real bitrate:
|
||||
|
||||
d->bitrate = d->length > 0 ? ((d->streamLength * 8UL) / d->length) / 1000 : 0;
|
||||
|
||||
d->signature = d->data.mid(pos, 32);
|
||||
}
|
||||
|
||||
@ -77,6 +77,12 @@ namespace TagLib {
|
||||
*/
|
||||
int sampleWidth() const;
|
||||
|
||||
/*!
|
||||
* Returns the MD5 signature of the uncompressed audio stream as read
|
||||
* from the stream info header header.
|
||||
*/
|
||||
ByteVector signature() const;
|
||||
|
||||
private:
|
||||
Properties(const Properties &);
|
||||
Properties &operator=(const Properties &);
|
||||
|
||||
Reference in New Issue
Block a user