CoreAudio input: Fixed new case where lossy inputs report file bit depth as unsupported field, causing some or possibly all lossy files to fail to decode
parent
5b73336cb0
commit
6395684001
|
@ -164,8 +164,13 @@ static SInt64 getSizeProc(void* clientData) {
|
|||
size = sizeof(formatBitsPerSample);
|
||||
err = AudioFileGetProperty(afi, kAudioFilePropertySourceBitDepth, &size, &formatBitsPerSample);
|
||||
if(err != noErr) {
|
||||
err = ExtAudioFileDispose(_in);
|
||||
return NO;
|
||||
if (err == kAudioFileUnsupportedPropertyError) {
|
||||
formatBitsPerSample = 0; // floating point formats apparently don't return this any more
|
||||
}
|
||||
else {
|
||||
err = ExtAudioFileDispose(_in);
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 _bitrate;
|
||||
|
|
Loading…
Reference in New Issue