[Freeswitch-users] Taking audio samples from bug

Anton e322 at ya.ru
Sun Nov 10 09:55:56 MSK 2013


When I check the audio sample contained in switch_frame::data array, it 
always has the same value -1, regardless of the position in the array and 
sound level. In order to get these samples I use different applications 
containing the following line:
    frame = switch_core_media_bug_get_read_replace_frame(bug);
and immediately after insert this code:
    switch_log_printf(
        SWITCH_CHANNEL_LOG,
        SWITCH_LOG_NOTICE,
        "data[0]=%d\n", ((int16_t *)(frame->data))[0]
    );
then been rebuilt with the appropriate module and initiating its launch. 
After that, expect to see on the console different sample values​​, but it is 
always the same -1.
Someone explain to me why?




Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list