diff options
-rw-r--r-- | pjmedia/src/pjmedia/pasound.c | 13 |
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(); |