CoreAudioSource: print more information in the case of errors

This commit is contained in:
Paul Davis 2020-09-09 17:23:02 -06:00
parent 8e22c4811e
commit 1f356e2883

View File

@ -123,7 +123,7 @@ CoreAudioSource::safe_read (Sample* dst, samplepos_t start, samplecnt_t cnt, Aud
try {
af.Seek (start+nread);
} catch (CAXException& cax) {
error << string_compose("CoreAudioSource: %1 to %2 (%3)", cax.mOperation, start+nread, _name.val().substr (1)) << endmsg;
error << string_compose("CoreAudioSource: %1 to %2 [%3] (%3)", cax.mOperation, start+nread, cax.mError, _name.val().substr (1)) << endmsg;
return -1;
}
@ -135,7 +135,7 @@ CoreAudioSource::safe_read (Sample* dst, samplepos_t start, samplecnt_t cnt, Aud
try {
af.Read (new_cnt, &abl);
} catch (CAXException& cax) {
error << string_compose("CoreAudioSource: %1 (%2)", cax.mOperation, _name);
error << string_compose("CoreAudioSource: %1 [%2] (%3)", cax.mOperation, cax.mError, _name);
return -1;
}