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
This commit is contained in:
parent
5b73336cb0
commit
6395684001
1 changed files with 7 additions and 2 deletions
|
@ -164,8 +164,13 @@ 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) {
|
||||||
err = ExtAudioFileDispose(_in);
|
if (err == kAudioFileUnsupportedPropertyError) {
|
||||||
return NO;
|
formatBitsPerSample = 0; // floating point formats apparently don't return this any more
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
err = ExtAudioFileDispose(_in);
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UInt32 _bitrate;
|
UInt32 _bitrate;
|
||||||
|
|
Loading…
Reference in a new issue