mirror of
https://github.com/taglib/taglib.git
synced 2025-07-19 05:24:25 -04:00
Merge pull request #986 from ufleisch/ufleisch/wav-extensible-subformat
WAV: Support subformat in WAVE_FORMAT_EXTENSIBLE (#850)
This commit is contained in:
@ -184,6 +184,14 @@ void RIFF::WAV::Properties::read(File *file)
|
||||
}
|
||||
|
||||
d->format = data.toShort(0, false);
|
||||
if((d->format & 0xffff) == 0xfffe) {
|
||||
// if extensible then read the format from the subformat
|
||||
if(data.size() != 40) {
|
||||
debug("RIFF::WAV::Properties::read() - extensible size incorrect");
|
||||
return;
|
||||
}
|
||||
d->format = data.toShort(24, false);
|
||||
}
|
||||
if(d->format != FORMAT_PCM && d->format != FORMAT_IEEE_FLOAT && totalSamples == 0) {
|
||||
debug("RIFF::WAV::Properties::read() - Non-PCM format, but 'fact' chunk not found.");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user