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,9 +164,14 @@ static SInt64 getSizeProc(void* clientData) {
|
||||||
size = sizeof(formatBitsPerSample);
|
size = sizeof(formatBitsPerSample);
|
||||||
err = AudioFileGetProperty(afi, kAudioFilePropertySourceBitDepth, &size, &formatBitsPerSample);
|
err = AudioFileGetProperty(afi, kAudioFilePropertySourceBitDepth, &size, &formatBitsPerSample);
|
||||||
if(err != noErr) {
|
if(err != noErr) {
|
||||||
|
if (err == kAudioFileUnsupportedPropertyError) {
|
||||||
|
formatBitsPerSample = 0; // floating point formats apparently don't return this any more
|
||||||
|
}
|
||||||
|
else {
|
||||||
err = ExtAudioFileDispose(_in);
|
err = ExtAudioFileDispose(_in);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UInt32 _bitrate;
|
UInt32 _bitrate;
|
||||||
size = sizeof(_bitrate);
|
size = sizeof(_bitrate);
|
||||||
|
|
Loading…
Reference in New Issue