<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.9.1">
  <compounddef id="lsd_8c" kind="file" language="C++">
    <compoundname>lsd.c</compoundname>
    <includes refid="linphonecore__utils_8h" local="yes">linphonecore_utils.h</includes>
    <includes refid="private_8h" local="yes">private.h</includes>
    <includes local="yes">mediastreamer2/msticker.h</includes>
    <includes local="yes">mediastreamer2/mssndcard.h</includes>
    <includes local="yes">mediastreamer2/msaudiomixer.h</includes>
    <includes local="yes">mediastreamer2/mschanadapter.h</includes>
    <includes local="yes">mediastreamer2/msfileplayer.h</includes>
    <includes local="yes">mediastreamer2/msitc.h</includes>
    <incdepgraph>
      <node id="186">
        <label>lsd.c</label>
        <link refid="lsd.c"/>
        <childnode refid="187" relation="include">
        </childnode>
        <childnode refid="188" relation="include">
        </childnode>
        <childnode refid="189" relation="include">
        </childnode>
        <childnode refid="190" relation="include">
        </childnode>
        <childnode refid="191" relation="include">
        </childnode>
        <childnode refid="192" relation="include">
        </childnode>
      </node>
      <node id="187">
        <label>mediastreamer2/msticker.h</label>
      </node>
      <node id="188">
        <label>mediastreamer2/mssndcard.h</label>
      </node>
      <node id="191">
        <label>mediastreamer2/msfileplayer.h</label>
      </node>
      <node id="189">
        <label>mediastreamer2/msaudiomixer.h</label>
      </node>
      <node id="190">
        <label>mediastreamer2/mschanadapter.h</label>
      </node>
      <node id="192">
        <label>mediastreamer2/msitc.h</label>
      </node>
    </incdepgraph>
    <innerclass refid="struct__LsdPlayer" prot="public">_LsdPlayer</innerclass>
    <innerclass refid="struct__LinphoneSoundDaemon" prot="public">_LinphoneSoundDaemon</innerclass>
      <sectiondef kind="define">
      <memberdef kind="define" id="lsd_8c_1a33d4bf0118147ac61bf7338681ef2afa" prot="public" static="no">
        <name>MAX_BRANCHES</name>
        <initializer>10</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="37" column="9" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="37" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="lsd_8c_1a92b08d36d6b631c2bd0fb21ce59058ae" prot="public" static="yes" mutable="no">
        <type>MSSndCardDesc</type>
        <definition>MSSndCardDesc proxycard</definition>
        <argsstring></argsstring>
        <name>proxycard</name>
        <initializer>={
	&quot;Linphone Sound Daemon&quot;,
	 NULL,
	 NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	 NULL,
	create_writer,
	
}</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="69" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="69" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="lsd_8c_1a40664ee9ccdc255f6202e0d673c58bcc" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>struct _MSSndCard *</type>
        <definition>MSSndCard * linphone_sound_daemon_get_proxy_card</definition>
        <argsstring>(LinphoneSoundDaemon *obj)</argsstring>
        <name>linphone_sound_daemon_get_proxy_card</name>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>obj</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="35" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="297" bodyend="299"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1aaa29277787b275a393ad0777e39f70fe" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>MSFilter *</type>
        <definition>static MSFilter* create_writer</definition>
        <argsstring>(MSSndCard *c)</argsstring>
        <name>create_writer</name>
        <param>
          <type>MSSndCard *</type>
          <declname>c</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="62" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="62" bodyend="67"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1af867e31524a14e87cd3a63e36db63167" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>LsdPlayer *</type>
        <definition>LsdPlayer* linphone_sound_daemon_get_player</definition>
        <argsstring>(LinphoneSoundDaemon *obj)</argsstring>
        <name>linphone_sound_daemon_get_player</name>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>obj</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="83" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="83" bodyend="98"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a6bb91b643f62c6e450357aec8d64d796" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_sound_daemon_release_player</definition>
        <argsstring>(LinphoneSoundDaemon *obj, LsdPlayer *player)</argsstring>
        <name>linphone_sound_daemon_release_player</name>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>obj</declname>
        </param>
        <param>
          <type>LsdPlayer *</type>
          <declname>player</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="100" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="100" bodyend="106"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1abae523df9f4fefb0da54c3e00b47c396" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>LinphoneSoundDaemon *</type>
        <definition>LinphoneSoundDaemon* lsd_player_get_daemon</definition>
        <argsstring>(const LsdPlayer *p)</argsstring>
        <name>lsd_player_get_daemon</name>
        <param>
          <type>const LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="108" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="108" bodyend="110"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1acf1cbe47e61508046b7bd822bbc5ae72" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int lsd_player_stop</definition>
        <argsstring>(LsdPlayer *p)</argsstring>
        <name>lsd_player_stop</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="112" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="112" bodyend="115"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1aaf0ef982d5512ee1db15f28802b2fc87" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void lsd_player_init</definition>
        <argsstring>(LsdPlayer *p, MSConnectionPoint mixer, MSFilterId playerid, LinphoneSoundDaemon *lsd)</argsstring>
        <name>lsd_player_init</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <param>
          <type>MSConnectionPoint</type>
          <declname>mixer</declname>
        </param>
        <param>
          <type>MSFilterId</type>
          <declname>playerid</declname>
        </param>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>lsd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="117" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="117" bodyend="131"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a2834198d5c1ae3adb9fafdfa4e12f593" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void lsd_player_uninit</definition>
        <argsstring>(LsdPlayer *p, MSConnectionPoint mixer)</argsstring>
        <name>lsd_player_uninit</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <param>
          <type>MSConnectionPoint</type>
          <declname>mixer</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="133" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="133" bodyend="145"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a012837b84db3f74cf951cc7ddf92792d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void lsd_player_set_callback</definition>
        <argsstring>(LsdPlayer *p, LsdEndOfPlayCallback cb)</argsstring>
        <name>lsd_player_set_callback</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <param>
          <type>LsdEndOfPlayCallback</type>
          <declname>cb</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="147" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="147" bodyend="149"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1acfa714494c497920d026b34ce6850987" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void lsd_player_set_user_pointer</definition>
        <argsstring>(LsdPlayer *p, void *up)</argsstring>
        <name>lsd_player_set_user_pointer</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>up</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="151" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="151" bodyend="153"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1ab4ab670a1aea7639f41f92d641ebc113" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void* lsd_player_get_user_pointer</definition>
        <argsstring>(const LsdPlayer *p)</argsstring>
        <name>lsd_player_get_user_pointer</name>
        <param>
          <type>const LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="155" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="155" bodyend="157"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a10bd8a17f9cf226ebbd12dae1a809bd2" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void lsd_player_on_eop</definition>
        <argsstring>(void *userdata, MSFilter *f, unsigned int id, void *arg)</argsstring>
        <name>lsd_player_on_eop</name>
        <param>
          <type>void *</type>
          <declname>userdata</declname>
        </param>
        <param>
          <type>MSFilter *</type>
          <declname>f</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>id</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>arg</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="159" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="159" bodyend="163"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a7c2f4ad63af6794bedab14eb43b5a3bf" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>static void lsd_player_configure</definition>
        <argsstring>(LsdPlayer *b)</argsstring>
        <name>lsd_player_configure</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="165" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="165" bodyend="183"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a3dc32668f7b876b9593642d43c45d5db" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int lsd_player_play</definition>
        <argsstring>(LsdPlayer *b, const char *filename)</argsstring>
        <name>lsd_player_play</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>b</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>filename</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="185" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="185" bodyend="201"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1ae540bb38cbf53f8ac36a5a6965f16332" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void lsd_player_enable_loop</definition>
        <argsstring>(LsdPlayer *p, bool_t loopmode)</argsstring>
        <name>lsd_player_enable_loop</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <param>
          <type>bool_t</type>
          <declname>loopmode</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="203" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="203" bodyend="209"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1add3207da15bbd8ff1b72fd8fc44075f3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>bool_t</type>
        <definition>bool_t lsd_player_loop_enabled</definition>
        <argsstring>(const LsdPlayer *p)</argsstring>
        <name>lsd_player_loop_enabled</name>
        <param>
          <type>const LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="211" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="211" bodyend="213"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1ab3735a8dee13031d65de0f2d53d686c3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void lsd_player_set_gain</definition>
        <argsstring>(LsdPlayer *p, float gain)</argsstring>
        <name>lsd_player_set_gain</name>
        <param>
          <type>LsdPlayer *</type>
          <declname>p</declname>
        </param>
        <param>
          <type>float</type>
          <declname>gain</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="215" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="215" bodyend="220"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a7f86c6119d6e54ecb22926a85f9bb18a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>LinphoneSoundDaemon *</type>
        <definition>LinphoneSoundDaemon* linphone_sound_daemon_new</definition>
        <argsstring>(const char *cardname, int rate, int nchannels)</argsstring>
        <name>linphone_sound_daemon_new</name>
        <param>
          <type>const char *</type>
          <declname>cardname</declname>
        </param>
        <param>
          <type>int</type>
          <declname>rate</declname>
        </param>
        <param>
          <type>int</type>
          <declname>nchannels</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="222" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="222" bodyend="265"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a8c09e07d07d9d752640a80b97d5da796" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_sound_daemon_stop_all_players</definition>
        <argsstring>(LinphoneSoundDaemon *obj)</argsstring>
        <name>linphone_sound_daemon_stop_all_players</name>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>obj</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="267" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="267" bodyend="272"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a1765d32ec6e0e06e2f46675440cb7104" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_sound_daemon_release_all_players</definition>
        <argsstring>(LinphoneSoundDaemon *obj)</argsstring>
        <name>linphone_sound_daemon_release_all_players</name>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>obj</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="274" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="274" bodyend="279"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a87dc32eca8b50175dc07760834008eb7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_sound_daemon_destroy</definition>
        <argsstring>(LinphoneSoundDaemon *obj)</argsstring>
        <name>linphone_sound_daemon_destroy</name>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>obj</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="281" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="281" bodyend="295"/>
      </memberdef>
      <memberdef kind="function" id="lsd_8c_1a54030bd88d0c1291539c1f7088db7cd8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void linphone_core_use_sound_daemon</definition>
        <argsstring>(LinphoneCore *lc, LinphoneSoundDaemon *lsd)</argsstring>
        <name>linphone_core_use_sound_daemon</name>
        <param>
          <type><ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref> *</type>
          <declname>lc</declname>
        </param>
        <param>
          <type>LinphoneSoundDaemon *</type>
          <declname>lsd</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" line="301" column="1" bodyfile="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c" bodystart="301" bodyend="307"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment">linphone</highlight></codeline>
<codeline lineno="3"><highlight class="comment">Copyright<sp/>(C)<sp/>2010<sp/>Simon<sp/>MORLAT<sp/>(simon.morlat@linphone.org)</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment">This<sp/>program<sp/>is<sp/>free<sp/>software;<sp/>you<sp/>can<sp/>redistribute<sp/>it<sp/>and/or</highlight></codeline>
<codeline lineno="6"><highlight class="comment">modify<sp/>it<sp/>under<sp/>the<sp/>terms<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight></codeline>
<codeline lineno="7"><highlight class="comment">as<sp/>published<sp/>by<sp/>the<sp/>Free<sp/>Software<sp/>Foundation;<sp/>either<sp/>version<sp/>2</highlight></codeline>
<codeline lineno="8"><highlight class="comment">of<sp/>the<sp/>License,<sp/>or<sp/>(at<sp/>your<sp/>option)<sp/>any<sp/>later<sp/>version.</highlight></codeline>
<codeline lineno="9"><highlight class="comment"></highlight></codeline>
<codeline lineno="10"><highlight class="comment">This<sp/>program<sp/>is<sp/>distributed<sp/>in<sp/>the<sp/>hope<sp/>that<sp/>it<sp/>will<sp/>be<sp/>useful,</highlight></codeline>
<codeline lineno="11"><highlight class="comment">but<sp/>WITHOUT<sp/>ANY<sp/>WARRANTY;<sp/>without<sp/>even<sp/>the<sp/>implied<sp/>warranty<sp/>of</highlight></codeline>
<codeline lineno="12"><highlight class="comment">MERCHANTABILITY<sp/>or<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE.<sp/><sp/>See<sp/>the</highlight></codeline>
<codeline lineno="13"><highlight class="comment">GNU<sp/>General<sp/>Public<sp/>License<sp/>for<sp/>more<sp/>details.</highlight></codeline>
<codeline lineno="14"><highlight class="comment"></highlight></codeline>
<codeline lineno="15"><highlight class="comment">You<sp/>should<sp/>have<sp/>received<sp/>a<sp/>copy<sp/>of<sp/>the<sp/>GNU<sp/>General<sp/>Public<sp/>License</highlight></codeline>
<codeline lineno="16"><highlight class="comment">along<sp/>with<sp/>this<sp/>program;<sp/>if<sp/>not,<sp/>write<sp/>to<sp/>the<sp/>Free<sp/>Software</highlight></codeline>
<codeline lineno="17"><highlight class="comment">Foundation,<sp/>Inc.,<sp/>59<sp/>Temple<sp/>Place<sp/>-<sp/>Suite<sp/>330,<sp/>Boston,<sp/>MA<sp/><sp/>02111-1307,<sp/>USA.</highlight></codeline>
<codeline lineno="18"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Linphone<sp/>Sound<sp/>Daemon:<sp/>is<sp/>a<sp/>lightweight<sp/>utility<sp/>to<sp/>play<sp/>sounds<sp/>to<sp/>speaker<sp/>during<sp/>a<sp/>conversation.</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>This<sp/>is<sp/>useful<sp/>for<sp/>embedded<sp/>platforms,<sp/>where<sp/>sound<sp/>apis<sp/>are<sp/>not<sp/>performant<sp/>enough<sp/>to<sp/>allow</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>simultaneous<sp/>sound<sp/>access.</highlight></codeline>
<codeline lineno="23"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;linphonecore_utils.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="26"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;private.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msticker.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/mssndcard.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msaudiomixer.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/mschanadapter.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msfileplayer.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;mediastreamer2/msitc.h&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">_MSSndCard<sp/>*linphone_sound_daemon_get_proxy_card(LinphoneSoundDaemon<sp/>*obj);</highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>MAX_BRANCHES<sp/>10</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">_LsdPlayer{</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">_LinphoneSoundDaemon<sp/>*lsd;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*player;</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*rateconv;</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*chanadapter;</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LsdEndOfPlayCallback<sp/>eop_cb;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>mixer_pin;</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*user_data;</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>loop;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bool_t<sp/>pad[3];</highlight></codeline>
<codeline lineno="50"><highlight class="normal">};</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">_LinphoneSoundDaemon<sp/>{</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>out_rate;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>out_nchans;</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*mixer;</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*soundout;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSTicker<sp/>*ticker;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSSndCard<sp/>*proxycard;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LsdPlayer<sp/>branches[MAX_BRANCHES];</highlight></codeline>
<codeline lineno="60"><highlight class="normal">};</highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>MSFilter<sp/>*create_writer(MSSndCard<sp/>*c){</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LinphoneSoundDaemon<sp/>*lsd=(LinphoneSoundDaemon*)c-&gt;data;</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*itcsink=ms_filter_new(MS_ITC_SINK_ID);</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(itcsink,MS_ITC_SINK_CONNECT,lsd-&gt;branches[0].player);</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>itcsink;</highlight></codeline>
<codeline lineno="67"><highlight class="normal">}</highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>MSSndCardDesc<sp/>proxycard={</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;Linphone<sp/>Sound<sp/>Daemon&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*detect*/</highlight><highlight class="normal"><sp/>NULL,</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*init*/</highlight><highlight class="normal"><sp/>NULL,</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>NULL,</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*create_reader*/</highlight><highlight class="normal"><sp/>NULL,</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>create_writer,</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*uninit,*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal">};</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal">LsdPlayer<sp/>*linphone_sound_daemon_get_player(LinphoneSoundDaemon<sp/>*obj){</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=1;i&lt;MAX_BRANCHES;++i){</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LsdPlayer<sp/>*b=&amp;obj-&gt;branches[i];</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSFilter<sp/>*p=b-&gt;player;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>state;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(p,MS_PLAYER_GET_STATE,&amp;state);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(state==MSPlayerClosed){</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd_player_set_gain(b,1);</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd_player_enable_loop<sp/>(b,FALSE);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>b;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;No<sp/>more<sp/>free<sp/>players<sp/>!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="98"><highlight class="normal">}</highlight></codeline>
<codeline lineno="99"><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_sound_daemon_release_player(LinphoneSoundDaemon<sp/>*obj,<sp/>LsdPlayer<sp/>*<sp/>player){</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>state;</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(player-&gt;player,MS_PLAYER_GET_STATE,&amp;state);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(state!=MSPlayerClosed){</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(player-&gt;player,MS_PLAYER_CLOSE,&amp;state);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="106"><highlight class="normal">}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal">LinphoneSoundDaemon<sp/>*lsd_player_get_daemon(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LsdPlayer<sp/>*p){</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>p-&gt;lsd;</highlight></codeline>
<codeline lineno="110"><highlight class="normal">}</highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>lsd_player_stop(LsdPlayer<sp/>*p){</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method_noarg(p-&gt;player,MS_PLAYER_PAUSE);</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="115"><highlight class="normal">}</highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_init(LsdPlayer<sp/>*p,<sp/>MSConnectionPoint<sp/>mixer,<sp/>MSFilterId<sp/>playerid,<sp/>LinphoneSoundDaemon<sp/>*lsd){</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSConnectionHelper<sp/>h;</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;player=ms_filter_new(playerid);</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;rateconv=ms_filter_new(MS_RESAMPLE_ID);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;chanadapter=ms_filter_new(MS_CHANNEL_ADAPTER_ID);</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_start(&amp;h);</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_link(&amp;h,p-&gt;player,-1,0);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_link(&amp;h,p-&gt;rateconv,0,0);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_link(&amp;h,p-&gt;chanadapter,0,0);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_link(&amp;h,mixer.filter,mixer.pin,-1);</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;mixer_pin=mixer.pin;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;loop=FALSE;</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;lsd=lsd;</highlight></codeline>
<codeline lineno="131"><highlight class="normal">}</highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_uninit(LsdPlayer<sp/>*p,<sp/>MSConnectionPoint<sp/>mixer){</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSConnectionHelper<sp/>h;</highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_start(&amp;h);</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_unlink<sp/>(&amp;h,p-&gt;player,-1,0);</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_unlink(&amp;h,p-&gt;rateconv,0,0);</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_unlink(&amp;h,p-&gt;chanadapter,0,0);</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_connection_helper_unlink(&amp;h,mixer.filter,mixer.pin,-1);</highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_destroy(p-&gt;player);</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_destroy(p-&gt;rateconv);</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_destroy(p-&gt;chanadapter);</highlight></codeline>
<codeline lineno="145"><highlight class="normal">}</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_set_callback(LsdPlayer<sp/>*p,<sp/>LsdEndOfPlayCallback<sp/>cb){</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;eop_cb=cb;</highlight></codeline>
<codeline lineno="149"><highlight class="normal">}</highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_set_user_pointer(LsdPlayer<sp/>*p,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*up){</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;user_data=up;</highlight></codeline>
<codeline lineno="153"><highlight class="normal">}</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*lsd_player_get_user_pointer(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LsdPlayer<sp/>*p){</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>p-&gt;user_data;</highlight></codeline>
<codeline lineno="157"><highlight class="normal">}</highlight></codeline>
<codeline lineno="158"><highlight class="normal"></highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_on_eop(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<sp/>userdata,<sp/>MSFilter<sp/>*f,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">id</highlight><highlight class="normal">,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg){</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LsdPlayer<sp/>*p=(LsdPlayer<sp/>*)userdata;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(p-&gt;eop_cb!=NULL)</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;eop_cb(p);</highlight></codeline>
<codeline lineno="163"><highlight class="normal">}</highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_configure(LsdPlayer<sp/>*b){</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rate,chans;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LinphoneSoundDaemon<sp/>*lsd=b-&gt;lsd;</highlight></codeline>
<codeline lineno="168"><highlight class="normal"></highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ms_filter_get_id(b-&gt;player)==MS_ITC_SOURCE_ID)</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;Configuring<sp/>branch<sp/>coming<sp/>from<sp/>audio<sp/>call...&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;player,MS_FILTER_GET_SAMPLE_RATE,&amp;rate);</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;player,MS_FILTER_GET_NCHANNELS,&amp;chans);</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;rateconv,MS_FILTER_SET_SAMPLE_RATE,&amp;rate);</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;rateconv,MS_FILTER_SET_NCHANNELS,&amp;chans);</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;rateconv,MS_FILTER_SET_OUTPUT_SAMPLE_RATE,&amp;lsd-&gt;out_rate);</highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;chanadapter,MS_FILTER_SET_NCHANNELS,&amp;chans);</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;chanadapter,MS_CHANNEL_ADAPTER_SET_OUTPUT_NCHANNELS,&amp;lsd-&gt;out_nchans);</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;player<sp/>configured<sp/>for<sp/>rate=%i,<sp/>channels=%i&quot;</highlight><highlight class="normal">,rate,chans);</highlight></codeline>
<codeline lineno="183"><highlight class="normal">}</highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>lsd_player_play(LsdPlayer<sp/>*b,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*filename<sp/>){</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>state;</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(b-&gt;player,MS_PLAYER_GET_STATE,&amp;state);</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(state!=MSPlayerClosed){</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method_noarg(b-&gt;player,MS_PLAYER_CLOSE);</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ms_filter_call_method(b-&gt;player,MS_PLAYER_OPEN,(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)filename)!=0){</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_warning(</highlight><highlight class="stringliteral">&quot;Could<sp/>not<sp/>play<sp/>%s&quot;</highlight><highlight class="normal">,filename);</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_add_notify_callback<sp/>(b-&gt;player,lsd_player_on_eop,b,FALSE);</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd_player_configure(b);</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method_noarg<sp/>(b-&gt;player,MS_PLAYER_START);</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="201"><highlight class="normal">}</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_enable_loop(LsdPlayer<sp/>*p,<sp/>bool_t<sp/>loopmode){</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ms_filter_get_id(p-&gt;player)==MS_FILE_PLAYER_ID){</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>arg=loopmode<sp/>?<sp/>0<sp/>:<sp/>-1;</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(p-&gt;player,MS_FILE_PLAYER_LOOP,&amp;arg);</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p-&gt;loop=loopmode;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="209"><highlight class="normal">}</highlight></codeline>
<codeline lineno="210"><highlight class="normal"></highlight></codeline>
<codeline lineno="211"><highlight class="normal">bool_t<sp/>lsd_player_loop_enabled(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LsdPlayer<sp/>*p){</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>p-&gt;loop;</highlight></codeline>
<codeline lineno="213"><highlight class="normal">}</highlight></codeline>
<codeline lineno="214"><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>lsd_player_set_gain(LsdPlayer<sp/>*p,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>gain){</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSAudioMixerCtl<sp/>gainctl;</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>gainctl.pin=p-&gt;mixer_pin;</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>gainctl.param.gain=gain;</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(p-&gt;lsd-&gt;mixer,MS_AUDIO_MIXER_SET_INPUT_GAIN,&amp;gainctl);</highlight></codeline>
<codeline lineno="220"><highlight class="normal">}</highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal">LinphoneSoundDaemon<sp/>*<sp/>linphone_sound_daemon_new(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*cardname,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rate,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nchannels){</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSConnectionPoint<sp/>mp;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>LinphoneSoundDaemon<sp/>*lsd;</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSSndCard<sp/>*card=ms_snd_card_manager_get_card(</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_snd_card_manager_get(),</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cardname);</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(card==NULL){</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>card=ms_snd_card_manager_get_default_playback_card<sp/>(</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_snd_card_manager_get());</highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(card==NULL){</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_error(</highlight><highlight class="stringliteral">&quot;linphone_sound_daemon_new():<sp/>No<sp/>playback<sp/>soundcard<sp/>available&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>NULL;</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd=ms_new0(LinphoneSoundDaemon,1);</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd-&gt;soundout=ms_snd_card_create_writer(card);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd-&gt;mixer=ms_filter_new(MS_AUDIO_MIXER_ID);</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd-&gt;out_rate=rate;</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd-&gt;out_nchans=nchannels;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(lsd-&gt;soundout,MS_FILTER_SET_SAMPLE_RATE,&amp;lsd-&gt;out_rate);</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(lsd-&gt;soundout,MS_FILTER_SET_NCHANNELS,&amp;lsd-&gt;out_nchans);</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(lsd-&gt;mixer,MS_FILTER_SET_SAMPLE_RATE,&amp;lsd-&gt;out_rate);</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_call_method(lsd-&gt;mixer,MS_FILTER_SET_NCHANNELS,&amp;lsd-&gt;out_nchans);</highlight></codeline>
<codeline lineno="247"><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mp.filter=lsd-&gt;mixer;</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mp.pin=0;</highlight></codeline>
<codeline lineno="250"><highlight class="normal"></highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd_player_init(&amp;lsd-&gt;branches[0],mp,MS_ITC_SOURCE_ID,lsd);</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_add_notify_callback(lsd-&gt;branches[0].player,(MSFilterNotifyFunc)lsd_player_configure,&amp;lsd-&gt;branches[0],FALSE);</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=1;i&lt;MAX_BRANCHES;++i){</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mp.pin=i;</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd_player_init(&amp;lsd-&gt;branches[i],mp,MS_FILE_PLAYER_ID,lsd);</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_link(lsd-&gt;mixer,0,lsd-&gt;soundout,0);</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd-&gt;ticker=ms_ticker_new();</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_ticker_attach(lsd-&gt;ticker,lsd-&gt;soundout);</highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd-&gt;proxycard=ms_snd_card_new(&amp;proxycard);</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd-&gt;proxycard-&gt;data=lsd;</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_message(</highlight><highlight class="stringliteral">&quot;LinphoneSoundDaemon<sp/>started<sp/>with<sp/>rate=%i,<sp/>nchannels=%i&quot;</highlight><highlight class="normal">,rate,nchannels);</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lsd;</highlight></codeline>
<codeline lineno="265"><highlight class="normal">}</highlight></codeline>
<codeline lineno="266"><highlight class="normal"></highlight></codeline>
<codeline lineno="267"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_sound_daemon_stop_all_players(LinphoneSoundDaemon<sp/>*obj){</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=1;i&lt;MAX_BRANCHES;++i){</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd_player_stop(&amp;obj-&gt;branches[i]);</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="272"><highlight class="normal">}</highlight></codeline>
<codeline lineno="273"><highlight class="normal"></highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_sound_daemon_release_all_players(LinphoneSoundDaemon<sp/>*obj){</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=1;i&lt;MAX_BRANCHES;++i){</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>linphone_sound_daemon_release_player(obj,&amp;obj-&gt;branches[i]);</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="279"><highlight class="normal">}</highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_sound_daemon_destroy(LinphoneSoundDaemon<sp/>*obj){</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>MSConnectionPoint<sp/>mp;</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_ticker_detach(obj-&gt;ticker,obj-&gt;soundout);</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mp.filter=obj-&gt;mixer;</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;i&lt;MAX_BRANCHES;++i){</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mp.pin=i;</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i!=0)<sp/>linphone_sound_daemon_release_player(obj,&amp;obj-&gt;branches[i]);</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lsd_player_uninit<sp/>(&amp;obj-&gt;branches[i],mp);</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_unlink(obj-&gt;mixer,0,obj-&gt;soundout,0);</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_ticker_destroy(obj-&gt;ticker);</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_destroy(obj-&gt;soundout);</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ms_filter_destroy(obj-&gt;mixer);</highlight></codeline>
<codeline lineno="295"><highlight class="normal">}</highlight></codeline>
<codeline lineno="296"><highlight class="normal"></highlight></codeline>
<codeline lineno="297"><highlight class="normal">MSSndCard<sp/>*linphone_sound_daemon_get_proxy_card(LinphoneSoundDaemon<sp/>*lsd){</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>lsd-&gt;proxycard;</highlight></codeline>
<codeline lineno="299"><highlight class="normal">}</highlight></codeline>
<codeline lineno="300"><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>linphone_core_use_sound_daemon(<ref refid="group__initializing_1gaa5cf635b82dd338e7ee2dd3599d05f0a" kindref="member">LinphoneCore</ref><sp/>*lc,<sp/>LinphoneSoundDaemon<sp/>*lsd){</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(lsd!=NULL){</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;sound_conf.lsd_card=linphone_sound_daemon_get_proxy_card<sp/>(lsd);</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>lc-&gt;sound_conf.lsd_card=NULL;</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="307"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/usr/src/slapt-src/network/linphone/linphone-3.9.1/coreapi/lsd.c"/>
  </compounddef>
</doxygen>
