[Top][All Lists]

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

[Linphone-developers] Hold file audio only plays once for ZRTP

From: Trevor Alpeter
Subject: [Linphone-developers] Hold file audio only plays once for ZRTP
Date: Wed, 6 Jan 2016 15:18:54 -0500


I have been working with liblinphone and noticed that that the audio
file used for hold music is only played once whenever a call encrypted
with ZRTP is put on hold. This results in the party who was put on hold
hearing only silence after the first time the file is played.

After a bit of debugging, I found that the issue appears to be that the
MS_FILE_PLAYER_LOOP command is not invoked on the MSFilePlayer filter
used to actually play the file.

I found that the MS_FILE_PLAYER_LOOP command is used within the
linphone_call_start_audio_stream() method on the MSFilePlayer referenced
by call->audiostream->soundread (coreapi/linphonecall.c, line 3102 in my
source). However, that MSFilePlayer does not appear to be used.

Rather, a separate MSFilePlayer is created in
linphone_call_start_media_streams() via a call to
audio_stream_open_remote_play() (coreapi/linphonecall.c, line 3451).
That MSFilePlayer is subsequently started, but it is not given a loop
value so it plays the file once and then goes into the paused state.

I've attempted to fix this in my source by adding a call to the
MS_FILE_PLAYER_LOOP just before starting it (coreapi/linphonecall.c,
line 3453). I used the same pause value that is used in
linphone_call_start_audio_stream(). This fixes the issue in my local build.

However, this leaves me with a couple of questions:

First, is this the correct fix? I'm still trying to get my head wrapped
around the source, and I want to make sure I'm doing this correctly.

Second, could you provide any insight into why multiple MSFilePlayer
filters are being created? In my debugging I'm actually seeing three
filters. However, only one of them is actually being started and used.
I'm a bit confused about what is going on.

Any insight is appreciated.

Thanks in advance.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]