[pjsip] Problem with pa_mac_core_old.c and recfile

Christian Beer chbeer at web.de
Mon Nov 5 07:28:08 EST 2007


Hi List,

(Sorry if this post appears more than once. But I posted it before and
it doesn't appear. So I try again after signing-on)

trying to get pjmedia working on a arm-device with mac os x, I first
try to record to a file using recfile. But the resulting wav-file has
only 44 byte. I am using pa_mac_core_old.c because the mac os x on
that device doesn't provide AudioUnit.

The problem seems to be (that's my idea, don't know if it is correct)
that the stream is not opened correctly. I enabled PA_LOG_API_CALLS to
see what's happening and the following logs appear:

11:59:38.844      pasound.c PA message: Pa_OpenStream called:
 11:59:38.846      pasound.c PA message:        PaStream** stream:
0x0x82948c
 11:59:38.849      pasound.c PA message:        PaStreamParameters
*inputParameters: 0x0x2ffff9ac
 11:59:38.851      pasound.c PA message:        PaDeviceIndex
inputParameters->device: 2
 11:59:38.854      pasound.c PA message:        int inputParameters-
>channelCount: 2
 11:59:38.856      pasound.c PA message:        PaSampleFormat
inputParameters->sampleFormat: 8
 11:59:38.859      pasound.c PA message:        PaTime
inputParameters->suggestedLatency: 0.000476
 11:59:38.861      pasound.c PA message:        void *inputParameters-
>hostApiSpecificStreamInfo: 0x0x0
 11:59:38.864      pasound.c PA message:        PaStreamParameters
*outputParameters: NULL
 11:59:38.867      pasound.c PA message:        double sampleRate:
44100
 11:59:38.869      pasound.c PA message:        unsigned long
framesPerBuffer: 512
 11:59:38.872      pasound.c PA message:        PaStreamFlags
streamFlags: 0x1
 11:59:38.874      pasound.c PA message:        PaStreamCallback
*streamCallback: 0x0x7d90
 11:59:38.877      pasound.c PA message:        void *userData:
0x0x829464

the later GetStreamInfo returns:

11:59:38.919      pasound.c PA message: Pa_GetStreamInfo returned:
 11:59:38.919      pasound.c PA message:        const PaStreamInfo*:
0x0x1150d8:
 11:59:38.919      pasound.c PA message:        {
 11:59:38.919      pasound.c PA message:                int
structVersion: 0
 11:59:38.920      pasound.c PA message:                PaTime
inputLatency: 0.000000
 11:59:38.920      pasound.c PA message:                PaTime
outputLatency: 0.000000
 11:59:38.920      pasound.c PA message:                double
sampleRate: 0.000000
 11:59:38.920      pasound.c PA message:        }

As one can see the sampleRate is zero this time.

What do I do wrong? Is it wrong parameters or is the initialization failing?

Thanks for your help!

Christian Beer




More information about the pjsip mailing list