Hi all:
I'm trying to hack linphone, but facing some problem.
First, the ALSA seems can not work in my machine. When I start linphonec, I got:
ALSA lib conf.c:4631:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL default:0
ALSA lib conf.c:4631:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2209:(snd_pcm_open_noupdate) Unknown PCM default:0
ALSA lib conf.c:4631:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2209:(snd_pcm_open_noupdate) Unknown PCM default:0
Ready
Warning: video is disabled in linphonec, use -V or -C or -D to enable.
linphonec>
If I change function alsa_card_new() in .../mediastreamer2/src/alsa.c to using "default", instead of "default:%d", the output of linphonec will be:
Ready
Warning: video is disabled in linphonec, use -V or -C or -D to enable.
linphonec>
I executed the linphonec with my regular user account, and I have added this user account into pulse/pulse-access/audio group. I guess the above problem is due to permission, but I don't know how to fix it.
Second, on the basis of the above. I try to play wav file with linphonec, but It can't work too. I used this:
linphonec>
linphonec> soundcard list
0: ALSA: default device
1: ALSA: Ensoniq AudioPCI
linphonec> soundcard use files
Using wav files instead of soundcard.
linphonec> play /home/zdw/hello16000.wav
linphonec>
It give me nothing, no info, no error, and no sound. I tried to trace with gdb, founding one reason in linphonecore.c:linphone_core_set_play_file().
void linphone_core_set_play_file(LinphoneCore *lc, const char *file){
if (lc->play_file!=NULL){
ms_free(lc->play_file);
lc->play_file=NULL;
}
if (file!=NULL) {
lc->play_file=ms_strdup(file);
if (lc->audiostream)
audio_stream_play(lc->audiostream,file);
}
}
The lc->audiostream get NULL val, but it shouldn't be. I found audiostream field of LinphoneCore struct would be set in function linphone_core_init_media_streams , but I find no place where this function get called in linphonec directly or indirectly, maybe I missed something.
I used to be an embedded linux developer, and I'm not familiar with sip or other VOIP stuff, so I think is there some stuff/tutorial/guid suit for my development quickly? thanks a lot.