From 6d0d9005c80cf2a8f66e5fd202e7d1eb3adefe7b Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 31 Mar 2013 22:53:14 -0700 Subject: [PATCH] cmAudioPort.c: Added cmApFileAllocate() to cmApPortTest(). Verified ALSA is working with cmApPortTest() --- cmAudioPort.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmAudioPort.c b/cmAudioPort.c index 672ba0d..7df6367 100644 --- a/cmAudioPort.c +++ b/cmAudioPort.c @@ -693,6 +693,13 @@ int cmApPortTest( bool runFl, cmRpt_t* rpt, int argc, const char* argv[] ) cmRptPrintf(rpt,"%s in:%i out:%i chidx:%i chs:%i bufs=%i frm=%i rate=%f\n",runFl?"exec":"rpt",r.inDevIdx,r.outDevIdx,r.chIdx,r.chCnt,r.bufCnt,r.framesPerCycle,r.srate); + if( cmApFileAllocate(rpt) != kOkApRC ) + { + cmRptPrintf(rpt,"Audio port file allocation failed."); + result = -1; + goto errLabel; + } + // allocate the non-real-time port if( cmApNrtAllocate(rpt) != kOkApRC ) { @@ -796,6 +803,7 @@ int cmApPortTest( bool runFl, cmRpt_t* rpt, int argc, const char* argv[] ) cmApBufFinalize(); cmApNrtFree(); + cmApFileFree(); // report the count of audio buffer callbacks cmRptPrintf(rpt,"cb count:%i\n", r.cbCnt );