File: audio.h

package info (click to toggle)
libccrtp 2.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,432 kB
  • sloc: sh: 10,669; cpp: 9,563; ansic: 2,567; makefile: 133
file content (40 lines) | stat: -rw-r--r-- 1,554 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Common header for audiorx/audiotx.
// A simple and amusing application for testing basic features of ccRTP.
// Copyright (C) 2001,2002  Federico Montesino <fedemp@altern.org>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/** file audio.h
 * Common header for audiorx and audiotx.
 */

// audiorx and audiotx are, respectively, the transmitter and receiver of
// a simple application for testing ccRTP with audio. It aims to
// transmit/receive \mu-law encoded audio on RTP packets.


// UDP/RTP ports
const int RECEIVER_BASE = 22222;
const int TRANSMITTER_BASE = 33334;

// We will sample at 8 Khz using \mu-law encoding
const int SAMPLING_RATE = 8000;

// Transmission interval between consecutive packets.
// Ideally, the interval should be 20 milliseconds
const int PERIOD = 20;

// Packets are 8000*20/1000 = 160 octects long.
const int PACKET_SIZE=SAMPLING_RATE*PERIOD/1000;