summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-05-03 14:44:45 +0000
committerBenny Prijono <bennylp@teluu.com>2007-05-03 14:44:45 +0000
commitabb1aee315f44c03cc3da3627a93651cdd9ca15e (patch)
treef4cf4db41858992af22838748d7b1b29bc466af9 /pjmedia
parent8f426164cc8b5ca4ea96766bf78fd2d1f28cd656 (diff)
Fixed crash in PortAudio's Pa_Util_DebugPrint (pa_debugprint.c - line 102)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1247 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/src/pjmedia/pasound.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia/pasound.c b/pjmedia/src/pjmedia/pasound.c
index 348b189e..27887494 100644
--- a/pjmedia/src/pjmedia/pasound.c
+++ b/pjmedia/src/pjmedia/pasound.c
@@ -189,6 +189,17 @@ static int PaRecorderPlayerCallback( const void *input,
return rc;
}
+/* Logging callback from PA */
+static void pa_log_cb(const char *log)
+{
+ PJ_LOG(5,(THIS_FILE, "PA message: %s", log));
+}
+
+/* We should include pa_debugprint.h for this, but the header
+ * is not available publicly. :(
+ */
+typedef void (*PaUtilLogCallback ) (const char *log);
+void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb);
/*
* Init sound library.
@@ -198,6 +209,8 @@ PJ_DEF(pj_status_t) pjmedia_snd_init(pj_pool_factory *factory)
if (++snd_init_count == 1) {
int err;
+ PaUtil_SetDebugPrintFunction(&pa_log_cb);
+
snd_mgr.factory = factory;
err = Pa_Initialize();