0

我正在尝试从示例中运行 streamutil.c 和 playfile,但在运行它们时出现错误。在运行 streamutil 时,我收到此错误:

19:07:43.822 os_core_unix.c !pjlib 2.1 for POSIX initialized
PJLIB INIT COMPLETE
19:07:43.825       pa_dev.c  PortAudio sound library initialized, status=0
19:07:43.825       pa_dev.c  PortAudio host api count=1
19:07:43.825       pa_dev.c  Sound device count=0
19:07:43.825          pjlib  select() I/O Queue created (0x7c87b8)
a.out: ../src/pjmedia/codec.c:53: pjmedia_codec_param_clone: Assertion `pool && src' failed.

在运行播放文件时,我收到以下错误:

19:08:35.703 os_core_unix.c !pjlib 2.1 for POSIX initialized
19:08:35.705       pa_dev.c  PortAudio sound library initialized, status=0
19:08:35.705       pa_dev.c  PortAudio host api count=1
19:08:35.705       pa_dev.c  Sound device count=0
19:08:35.706          pjlib  select() I/O Queue created (0x13db7b8)
19:08:35.706   wav_player.c  File player '/home/udit/pjsip/alarma.wav' created: samp.rate=22050, ch=1, bufsize=4KB, filesize=265KB
19:08:35.706     playfile.c  Unable to open sound device: Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV) [code=420006]

我进行了很多搜索并尝试了许多解决方案,但都没有奏效。我认为我的音频设备有问题,但音频设备很好(用 aplay-l 等命令检查)。请有人告诉我我应该怎么做才能让它运行。

4

1 回答 1

1

Ubuntu上的解决方案是这样的:

1- 安装libasound2-devsudo apt-get install libasound2-dev

2-重新编译Pjsip包

解决了我的问题!!

于 2013-05-10T11:26:06.687 回答