[pjsip] Problem with pa_mac_core_old.c and recfile

Christian Beer chbeer at web.de
Tue Nov 6 20:12:39 EST 2007


Thanks for your help, Benny! I am not into that route anymore. Now I
am trying to cope with a new framework introduced in Leopard and
already available on the iPhone.

I get an error trying to use playsine as a starting application. But I
will start a new thread for that one.

Thanks a lot. It is nice to see how much support you give!
Christian

On 11/7/07, Benny Prijono <bennylp at pjsip.org> wrote:
> Hi Christian,
>
> I'm not sure if I can offer useful help for pa_mac_core_old.c; this
> was for mac os x 10.2 and older, and I don't have the hardware
> anymore thus this one has not been tested for long time. But it used
> to work!
>
> Are you able to open the sound device successfully?
> Did the sound callbacks get called? It they get called, then we
> should at least have some few more bytes in the WAV file.
>
> Another possibility, the 44 bytes file could also be caused by the
> file not closed properly, thus the file buffers are not flushed to
> the file. This could happen for example if you kill the program with
> Ctrl-C instead of letting it quit gracefully.
>
>   -benny
>
> Christian Beer wrote:
> > 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
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>




More information about the pjsip mailing list