<div dir="ltr">Not enough to go on from that ....<div><br></div><div>You probably want something more like.</div><div><br></div><div><br></div><div>{</div><div>int16_t *samples = (int16_t *) frame-&gt;data;</div><div>int x = 0;</div>
<div><br></div><div>for (x = 0; x &lt; frame-&gt;datalen / 2; x++) {</div><div>   printf(&quot;[%d] &quot;, samples[x]);</div><div>}</div><div><br></div><div>printf(&quot;\n\n&quot;);</div><div><br></div><div>}</div><div>
<br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 9, 2013 at 4:28 PM, Anton <span dir="ltr">&lt;<a href="mailto:e322@ya.ru" target="_blank">e322@ya.ru</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hallo. Why, when I&#39;m trying to get a sample of the sound, I always get the<br>
same value -1?<br>
For example, in the mod_avmd.c is the string:<br>
    frame = switch_core_media_bug_get_read_replace_frame(bug);<br>
After this I add the following code<br>
    switch_log_printf(<br>
        SWITCH_CHANNEL_LOG,<br>
        SWITCH_LOG_NOTICE,<br>
        &quot;data[0]=%d\n&quot;, ((int16_t *)(frame-&gt;data))[0]<br>
    );<br>
Then trigger the module mod_avmd and get a result in the console:<br>
    data[0]=-1;<br>
<br>
And so on for all the modules that contain the string:<br>
    frame = switch_core_media_bug_get_read_replace_frame(bug);<br>
independently of the level of sound in the channel.<br>
<br>
Why is that?<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900
</div>