Merge #1051 into the main trunk.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3174 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjmedia/src/pjmedia-audiodev/errno.c b/pjmedia/src/pjmedia-audiodev/errno.c
index 2852249..d0ce4a1 100644
--- a/pjmedia/src/pjmedia-audiodev/errno.c
+++ b/pjmedia/src/pjmedia-audiodev/errno.c
@@ -75,6 +75,22 @@
 
 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
 
+
+    /* See if the error comes from Core Audio. */
+#if PJMEDIA_AUDIO_DEV_HAS_COREAUDIO
+    if (statcode >= PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_START &&
+	statcode <= PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_END)
+    {
+	int ca_err = PJMEDIA_AUDIODEV_COREAUDIO_ERRNO_START - statcode;
+
+	PJ_UNUSED_ARG(ca_err);
+	// TODO: create more helpful error messages
+	errstr.ptr = buf;
+	pj_strcpy2(&errstr, "Core audio error");
+	return errstr;
+    } else
+#endif
+
     /* See if the error comes from PortAudio. */
 #if PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO
     if (statcode >= PJMEDIA_AUDIODEV_PORTAUDIO_ERRNO_START &&