using namespace TagLib;
+namespace
+{
+ // Quoted from RFC 2361.
+ enum WaveFormat
+ {
+ FORMAT_UNKNOWN = 0x0000,
+ FORMAT_PCM = 0x0001
+ };
+}
+
class RIFF::WAV::Properties::PropertiesPrivate
{
public:
}
d->format = data.toShort(0, false);
- if(d->format != 1 && totalSamples == 0) {
+ if(d->format != FORMAT_PCM && totalSamples == 0) {
debug("RIFF::WAV::Properties::read() - Non-PCM format, but 'fact' chunk not found.");
return;
}
/*!
* Returns the format ID of the file.
- * 0 for unknown, 1 for PCM, 2 for ADPCM, 3 for 32/64-bit IEEE754, and so forth.
+ * 0 for unknown, 1 for PCM, 2 for ADPCM, 3 for 32/64-bit IEEE754, and
+ * so forth.
*
- * \note For further information, refer to RFC 2361.
+ * \note For further information, refer to the WAVE Form Registration
+ * Numbers in RFC 2361.
*/
int format() const;