Changeset 343 for pjproject/trunk/pjsip-apps/src/samples/confsample.c
- Timestamp:
- Mar 20, 2006 5:42:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/confsample.c
r337 r343 20 20 #include <pjmedia.h> 21 21 22 /* 23 * FILE: 24 * 25 * confsample.c 26 * 27 * PURPOSE: 28 * 29 * Demonstrate how to use conference bridge. 30 * 31 * USAGE: 32 * 33 * confsample [file1.wav] [file2.wav] ... 34 * 35 * where: 36 * fileN.wav are optional WAV files to be connected to the conference 37 * bridge. The WAV files MUST have single channel (mono) and 16 bit PCM 38 * samples. It can have arbitrary sampling rate. 39 * 40 * DESCRIPTION: 41 * 42 * Here we create a conference bridge, with at least one port (port zero 43 * is always created for the sound device). 44 * 45 * If WAV files are specified, the WAV file player ports will be connected 46 * to slot starting from number one in the bridge. The WAV files can have 47 * arbitrary sampling rate; the bridge will convert it to its clock rate. 48 * However, the files MUST have a single audio channel only (i.e. mono). 49 */ 22 static const char *desc = 23 " FILE: \n" 24 " \n" 25 " confsample.c \n" 26 " \n" 27 " PURPOSE: \n" 28 " \n" 29 " Demonstrate how to use conference bridge. \n" 30 " \n" 31 " USAGE: \n" 32 " \n" 33 " confsample [file1.wav] [file2.wav] ... \n" 34 " \n" 35 " where: \n" 36 " fileN.wav are optional WAV files to be connected to the conference \n" 37 " bridge. The WAV files MUST have single channel (mono) and 16 bit PCM \n" 38 " samples. It can have arbitrary sampling rate. \n" 39 " \n" 40 " DESCRIPTION: \n" 41 " \n" 42 " Here we create a conference bridge, with at least one port (port zero \n" 43 " is always created for the sound device). \n" 44 " \n" 45 " If WAV files are specified, the WAV file player ports will be connected \n" 46 " to slot starting from number one in the bridge. The WAV files can have \n" 47 " arbitrary sampling rate; the bridge will convert it to its clock rate. \n" 48 " However, the files MUST have a single audio channel only (i.e. mono). \n"; 50 49 51 50 #include <pjmedia.h> … … 59 58 #define THIS_FILE "confsample.c" 60 59 60 /* Constants */ 61 #define CLOCK_RATE 44100 62 #define NSAMPLES (CLOCK_RATE * 20 / 1000) 63 #define NCHANNELS 1 64 #define NBITS 16 65 66 61 67 /* 62 68 * Prototypes: … … 174 180 status = pjmedia_conf_create( pool, /* pool to use */ 175 181 port_count,/* number of ports */ 176 16000,/* sampling rate */177 1,/* # of channels. */178 320,/* samples per frame */179 16,/* bits per sample */182 CLOCK_RATE,/* sampling rate */ 183 NCHANNELS,/* # of channels. */ 184 NSAMPLES, /* samples per frame */ 185 NBITS, /* bits per sample */ 180 186 0, /* options */ 181 187 &conf /* result */
Note: See TracChangeset
for help on using the changeset viewer.