Changeset 361 for pjproject/trunk/pjsip-apps/src/samples/playfile.c
- Timestamp:
- Mar 24, 2006 8:44:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/playfile.c
r350 r361 19 19 20 20 #include <pjmedia.h> 21 #include <pjlib-util.h> 22 #include <pjlib.h> 23 #include <stdio.h> 24 #include <stdlib.h> 25 26 #include "util.h" 27 21 28 22 29 /* … … 34 41 */ 35 42 36 #include <pjmedia.h>37 #include <pjlib.h>38 39 #include <stdio.h>40 43 41 44 /* For logging purpose. */ … … 43 46 44 47 45 /* Util to display the error message for the specified error code */ 46 static int app_perror( const char *sender, const char *title, 47 pj_status_t status) 48 { 49 char errmsg[PJ_ERR_MSG_SIZE]; 50 51 pj_strerror(status, errmsg, sizeof(errmsg)); 52 53 printf("%s: %s [code=%d]\n", title, errmsg, status); 54 return 1; 55 } 48 static const char *desc = 49 " FILE \n" 50 " \n" 51 " playfile.c \n" 52 " \n" 53 " PURPOSE \n" 54 " \n" 55 " Demonstrate how to play a WAV file. \n" 56 " \n" 57 " USAGE \n" 58 " \n" 59 " playfile FILE.WAV \n" 60 " \n" 61 " The WAV file could have mono or stereo channels with arbitrary \n" 62 " sampling rate, but MUST contain uncompressed (i.e. 16bit) PCM. \n"; 56 63 57 64 … … 69 76 pj_status_t status; 70 77 71 72 /* Verify cmd line arguments. */73 if (argc != 2) {74 puts("");75 puts("Usage: ");76 puts(" playfile <wav-file>");77 puts("");78 puts("The WAV file could have mono or stereo channels with arbitrary");79 puts("sampling rate, but MUST contain uncompressed (i.e. 16bit) PCM.");80 return 0;81 }82 78 83 79 /* Must init PJLIB first: */
Note: See TracChangeset
for help on using the changeset viewer.