Python alsa errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wrote a short script to test my sound devices. Trying to set_snd_device
to (0,0) creates error messages.  Here?s the script:
http://pastebin.com/bN7Sc8q8

And here?s the output:
http://pastebin.com/vukWV4UP

I am able to set it use lib.set_snd_dev(9,9) without complaint, but
obviously there?s no sound, and it seems to hang the library?
trying to set it to 10,10 (dmix) creates even more error messages.

Here?s the output of aplay ?l:
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Do I need to mess with alsa config? Pjsua is able to figure out the right
thing to do on it?s own. What am I missing in the python?

--Travis


From: Travis LaDuke [mailto:travis.laduke@xxxxxxxxxxxxx]
Sent: Wednesday, October 17, 2012 3:53 PM
To: 'pjsip at lists.pjsip.org'
Subject: Python alsa errors

I?m having trouble connecting the a call to a my sound device with the
python lib. I?m not sure if something didn?t get installed or if my script
is wrong or if I need to configure alsa more.

When I call make_call(), I get:

Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture,
inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters, sampleRate, framesPerBuffer, &inputLatency,
&outputLatency, &hostBufferSizeMode )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture,
inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters, sampleRate, framesPerBuffer, &inputLatency,
&outputLatency, &hostBufferSizeMode )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994

Then when I destroy.lib() I get:
python2: ../src/pjmedia-audiodev/audiodev.c:682:
pjmedia_aud_dev_default_param: Assertion `aud_subsys.pf' failed.
[1]??? 2222 abort (core dumped)? python2 pjsip.py

I can see the call come in to Asterisk and Asterisk plays a sound file,
but obviously I don?t hear it on my speaker.
pjsua is able to send/receive audio and I don?t give it any specific audio
configuration.

I?m a little confused about the files it is complaining about up there.
They don?t exist on my system except in the build directories.

What should I look at next?
--
Travis



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux