blob: 6e1ce91150c5db2baa7f1c0ae6dd6bd536d95d67 [file] [log] [blame]
Emeric Vigier2f625822012-08-06 11:09:52 -04001// Common header for audiorx/audiotx.
2// A simple and amusing application for testing basic features of ccRTP.
3// Copyright (C) 2001,2002 Federico Montesino <fedemp@altern.org>
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19/** file audio.h
20 * Common header for audiorx and audiotx.
21 */
22
23// audiorx and audiotx are, respectively, the transmitter and receiver of
24// a simple application for testing ccRTP with audio. It aims to
25// transmit/receive \mu-law encoded audio on RTP packets.
26
27
28// UDP/RTP ports
29const int RECEIVER_BASE = 22222;
30const int TRANSMITTER_BASE = 33334;
31
32// We will sample at 8 Khz using \mu-law encoding
33const int SAMPLING_RATE = 8000;
34
35// Transmission interval between consecutive packets.
36// Ideally, the interval should be 20 milliseconds
37const int PERIOD = 20;
38
39// Packets are 8000*20/1000 = 160 octects long.
40const int PACKET_SIZE=SAMPLING_RATE*PERIOD/1000;