Changeset 2023 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Jun 14, 2008 8:40:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r2021 r2023 1747 1747 app_config.ringback_slot!=PJSUA_INVALID_ID) 1748 1748 { 1749 pjmedia_tone_desc tone;1750 1751 pj_bzero(&tone, sizeof(tone));1752 tone.freq1 = RINGBACK_FREQ1;1753 tone.freq2 = RINGBACK_FREQ2;1754 tone.on_msec = RINGBACK_ON;1755 tone.off_msec = RINGBACK_OFF;1756 pjmedia_tonegen_play(app_config.ringback_port, 1, &tone,1757 PJMEDIA_TONEGEN_LOOP);1758 1759 1749 pjsua_conf_connect(app_config.ringback_slot, 0); 1760 1750 } … … 1774 1764 { 1775 1765 pjsua_conf_disconnect(app_config.ringback_slot, 0); 1776 pjmedia_tonegen_ stop(app_config.ringback_port);1766 pjmedia_tonegen_rewind(app_config.ringback_port); 1777 1767 } 1778 1768 } … … 1786 1776 { 1787 1777 pjsua_conf_disconnect(app_config.ring_slot, 0); 1788 pjmedia_tonegen_ stop(app_config.ring_port);1778 pjmedia_tonegen_rewind(app_config.ring_port); 1789 1779 } 1790 1780 } … … 1804 1794 app_config.ring_slot!=PJSUA_INVALID_ID) 1805 1795 { 1806 unsigned i;1807 pjmedia_tone_desc tone[3];1808 1809 pj_bzero(&tone, sizeof(tone));1810 for (i=0; i<PJ_ARRAY_SIZE(tone); ++i) {1811 tone[i].freq1 = RING_FREQ1;1812 tone[i].freq2 = RING_FREQ2;1813 tone[i].on_msec = RING_ON;1814 tone[i].off_msec = RING_OFF;1815 }1816 tone[PJ_ARRAY_SIZE(tone)-1].off_msec = RING_INTERVAL;1817 1818 pjmedia_tonegen_play(app_config.ring_port, PJ_ARRAY_SIZE(tone),1819 tone, PJMEDIA_TONEGEN_LOOP);1820 1821 1796 pjsua_conf_connect(app_config.ring_slot, 0); 1822 1797 } … … 3836 3811 /* Create ringback tones */ 3837 3812 if (app_config.no_tones == PJ_FALSE) { 3813 unsigned i; 3814 pjmedia_tone_desc tone[3]; 3838 3815 pj_str_t name; 3839 3816 … … 3846 3823 goto on_error; 3847 3824 3825 pj_bzero(&tone, sizeof(tone)); 3826 tone[0].freq1 = RINGBACK_FREQ1; 3827 tone[0].freq2 = RINGBACK_FREQ2; 3828 tone[0].on_msec = RINGBACK_ON; 3829 tone[0].off_msec = RINGBACK_OFF; 3830 3831 pjmedia_tonegen_play(app_config.ringback_port, 1, &tone[0], 3832 PJMEDIA_TONEGEN_LOOP); 3833 3834 3848 3835 status = pjsua_conf_add_port(app_config.pool, app_config.ringback_port, 3849 3836 &app_config.ringback_slot); … … 3858 3845 if (status != PJ_SUCCESS) 3859 3846 goto on_error; 3847 3848 for (i=0; i<PJ_ARRAY_SIZE(tone); ++i) { 3849 tone[i].freq1 = RING_FREQ1; 3850 tone[i].freq2 = RING_FREQ2; 3851 tone[i].on_msec = RING_ON; 3852 tone[i].off_msec = RING_OFF; 3853 } 3854 tone[PJ_ARRAY_SIZE(tone)-1].off_msec = RING_INTERVAL; 3855 3856 pjmedia_tonegen_play(app_config.ring_port, PJ_ARRAY_SIZE(tone), 3857 tone, PJMEDIA_TONEGEN_LOOP); 3860 3858 3861 3859 status = pjsua_conf_add_port(app_config.pool, app_config.ring_port,
Note: See TracChangeset
for help on using the changeset viewer.