mirror of
https://github.com/taglib/taglib.git
synced 2026-02-21 23:53:02 -05:00
Add DSD information to WavPack properties (#1303)
This commit is contained in:
@ -51,6 +51,7 @@ public:
|
||||
int version { 0 };
|
||||
int bitsPerSample { 0 };
|
||||
bool lossless { false };
|
||||
bool dsd { false };
|
||||
unsigned int sampleFrames { 0 };
|
||||
};
|
||||
|
||||
@ -102,6 +103,11 @@ bool WavPack::Properties::isLossless() const
|
||||
return d->lossless;
|
||||
}
|
||||
|
||||
bool WavPack::Properties::isDsd() const
|
||||
{
|
||||
return d->dsd;
|
||||
}
|
||||
|
||||
unsigned int WavPack::Properties::sampleFrames() const
|
||||
{
|
||||
return d->sampleFrames;
|
||||
@ -291,6 +297,7 @@ void WavPack::Properties::read(File *file, offset_t streamLength)
|
||||
d->bitsPerSample = static_cast<int>(((flags & BYTES_STORED) + 1) * 8 - ((flags & SHIFT_MASK) >> SHIFT_LSB));
|
||||
d->sampleRate = static_cast<int>(smplRate);
|
||||
d->lossless = !(flags & HYBRID_FLAG);
|
||||
d->dsd = (flags & DSD_FLAG) != 0;
|
||||
d->sampleFrames = smplFrames;
|
||||
}
|
||||
|
||||
|
||||
@ -96,6 +96,11 @@ namespace TagLib {
|
||||
*/
|
||||
bool isLossless() const;
|
||||
|
||||
/*!
|
||||
* Returns whether or not the file is DSD (not PCM)
|
||||
*/
|
||||
bool isDsd() const;
|
||||
|
||||
/*!
|
||||
* Returns the total number of audio samples in file.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user