Changeset 4296:16e3f8f5983e in roaraudio
- Timestamp:
- 09/01/10 15:48:19 (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r4292 r4296 5 5 * fixed a problem with PASSFH on some systems 6 6 * Added LTM support to libroar and roard (roard only supports RMS) 7 * Added a lot const keywords 7 8 8 9 v. 0.3 - Sun Aug 22 2010 26:14 CEST -
include/libroar/auth.h
r3915 r4296 52 52 int roar_auth (struct roar_connection * con); 53 53 54 int roar_str2autht(c har * str);55 c har * roar_autht2str(int auth);54 int roar_str2autht(const char * str); 55 const char * roar_autht2str(const int auth); 56 56 57 57 #endif -
include/libroar/meta.h
r3517 r4296 46 46 int roar_meta_free (struct roar_meta * meta); 47 47 48 char * roar_meta_strtype( int type);49 int roar_meta_inttype(c har * type);48 char * roar_meta_strtype(const int type); 49 int roar_meta_inttype(const char * type); 50 50 51 c har * roar_meta_strgenre(int genre);52 int roar_meta_intgenre(c har * genre);51 const char * roar_meta_strgenre(const int genre); 52 int roar_meta_intgenre(const char * genre); 53 53 54 int roar_meta_parse_audioinfo(struct roar_audio_info * info, c har * str);54 int roar_meta_parse_audioinfo(struct roar_audio_info * info, const char * str); 55 55 56 56 #endif -
include/libroar/stream.h
r4097 r4296 39 39 #include "roaraudio.h" 40 40 41 c har * roar_dir2str (int dir);42 int roar_str2dir (c har * name);41 const char * roar_dir2str (const int dir); 42 int roar_str2dir (const char * name); 43 43 44 44 struct roar_stream_info { … … 98 98 int roar_stream_m2s (struct roar_stream * s, struct roar_message * m); 99 99 100 int roar_str2codec (c har * codec);101 c har * roar_codec2str (int codec);100 int roar_str2codec (const char * codec); 101 const char * roar_codec2str (const int codec); 102 102 103 c har * roar_streamstate2str(int streamstate);103 const char * roar_streamstate2str(int streamstate); 104 104 105 int roar_str2role (c har * role);106 c har * roar_role2str (int role);105 int roar_str2role (const char * role); 106 const char * roar_role2str (const int role); 107 107 108 108 ssize_t roar_info2samplesize (struct roar_audio_info * info); -
libroar/auth.c
r3740 r4296 198 198 static struct { 199 199 int type; 200 c har * name;200 const char * name; 201 201 } _g_authts[] = { 202 202 // grep ^'#define ROAR_AUTH_T_' auth.h | while read d t d; do n=$(cut -d_ -f4 <<<$t | tr A-Z a-z); printf ' {%-28s %-10s},\n' $t, \"$n\"; done … … 216 216 }; 217 217 218 int roar_str2autht(c har * str) {218 int roar_str2autht(const char * str) { 219 219 int i; 220 220 … … 226 226 } 227 227 228 c har * roar_autht2str(int auth) {228 const char * roar_autht2str(const int auth) { 229 229 int i; 230 230 -
libroar/meta.c
r3875 r4296 42 42 */ 43 43 44 st ruct {44 static struct { 45 45 int id; 46 c har * name;46 const char * name; 47 47 } _libroar_meta_typelist[] = { 48 48 {ROAR_META_TYPE_NONE, "NONE" }, … … 92 92 93 93 94 st ruct {94 static struct { 95 95 int id; 96 c har * name;96 const char * name; 97 97 } _libroar_meta_genrelist[] = { 98 98 {ROAR_META_GENRE_RDS_EU_NONE, "rds_eu_none"}, … … 396 396 }; 397 397 398 char * roar_meta_strtype(int type) { 398 // TODO: Why do we return a non-const buffer here? 399 char * roar_meta_strtype(const int type) { 399 400 int i; 400 401 static char name[ROAR_META_MAX_NAMELEN]; … … 409 410 } 410 411 411 int roar_meta_inttype(c har * type) {412 int roar_meta_inttype(const char * type) { 412 413 int i; 413 414 … … 545 546 546 547 // genere: 547 c har * roar_meta_strgenre(int genre) {548 const char * roar_meta_strgenre(const int genre) { 548 549 int i; 549 550 … … 556 557 } 557 558 558 int roar_meta_intgenre(c har * genre) {559 int roar_meta_intgenre(const char * genre) { 559 560 int i; 560 561 … … 567 568 } 568 569 569 int roar_meta_parse_audioinfo(struct roar_audio_info * info, c har * str) {570 int roar_meta_parse_audioinfo(struct roar_audio_info * info, const char * str) { 570 571 char * lc; 571 572 char * cur, * next; -
libroar/stream.c
r4002 r4296 738 738 */ 739 739 740 st ruct {740 static struct { 741 741 int dir; 742 c har * name;742 const char * name; 743 743 } _libroar_dir[] = { 744 744 {ROAR_DIR_PLAY, "play" }, … … 765 765 }; 766 766 767 c har * roar_dir2str (int dir) {767 const char * roar_dir2str (const int dir) { 768 768 int i; 769 769 … … 775 775 } 776 776 777 int roar_str2dir (c har * name) {777 int roar_str2dir (const char * name) { 778 778 int i; 779 779 … … 793 793 */ 794 794 795 st ruct {795 static struct { 796 796 int codec; 797 c har * name;797 const char * name; 798 798 } _libroar_codec[] = { 799 799 // PCM: … … 883 883 }; 884 884 885 int roar_str2codec(c har * codec) {885 int roar_str2codec(const char * codec) { 886 886 int i; 887 887 int guess; … … 904 904 905 905 906 c har * roar_codec2str (int codec) {906 const char * roar_codec2str (const int codec) { 907 907 int i; 908 908 … … 914 914 } 915 915 916 c har * roar_streamstate2str(int streamstate) {916 const char * roar_streamstate2str(int streamstate) { 917 917 switch (streamstate) { 918 918 case ROAR_STREAMSTATE_UNUSED: return "unused"; break; … … 926 926 } 927 927 928 st ruct {928 static struct { 929 929 int role; 930 c har * name;930 const char * name; 931 931 } _libroar_role[] = { 932 932 {ROAR_ROLE_UNKNOWN, "unknown" }, … … 948 948 }; 949 949 950 int roar_str2role (c har * role) {950 int roar_str2role (const char * role) { 951 951 int i; 952 952 … … 958 958 } 959 959 960 c har * roar_role2str (int role) {960 const char * roar_role2str (const int role) { 961 961 int i; 962 962
Note: See TracChangeset
for help on using the changeset viewer.