Changeset 5210:8eb738dee9d4 in roaraudio
- Timestamp:
- 11/01/11 12:23:05 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r5207 r5210 14 14 * Updated filters to support 8 and 32 bit mode as well (pr1) 15 15 * Re-wrote ALSA plugin (pr1) 16 * Updated ports to minimal, win32 and avr (pr2) 16 17 17 18 v. 0.4rc0 - Mon Sep 05 2011 15:25 CEST -
configure
r5133 r5210 670 670 671 671 test_lib () { 672 _have_libs=false 673 _have_headers=false 672 674 echo > $TF_C 673 675 … … 694 696 '-'*) 695 697 LIBS="$LIBS $1" 698 _have_libs=true 696 699 ;; 697 700 *) 698 701 LIBS="$LIBS -l$1" 702 _have_libs=true 699 703 ;; 700 704 esac … … 718 722 else 719 723 echo "#include <$_h>" >> $TF_C 724 _have_headers=true 720 725 fi 721 726 done 722 727 723 728 echo 'int main (void) { return 0; }' >> $TF_C 729 730 if [ "$_have_libs" = 'false' -a "$_have_headers" = 'false' ] 731 then 732 echo "no (nothing to test left)$_info" 733 echo "LIB($name) HAS NOTHING TO TEST" >&5 734 return 1 735 fi 724 736 725 737 echo "LIB($name) IS TESTED USING TEST CODE:" >&5 -
include/roaraudio/caps.h
r4708 r5210 38 38 39 39 // standard vendors: 40 #define ROAR_STDV_ROARAUDIO 041 #define ROAR_STDV_PROTO 142 #define ROAR_STDV_RFC 240 #define ROAR_STDV_ROARAUDIO ((uint32_t)0) 41 #define ROAR_STDV_PROTO ((uint32_t)1) 42 #define ROAR_STDV_RFC ((uint32_t)2) 43 43 44 44 // data macros for standards: 45 #define ROAR_STD_MASK_VENDOR 0xFF00000046 #define ROAR_STD_MASK_STD 0x00FFFF0047 #define ROAR_STD_MASK_VERSION 0x000000FF45 #define ROAR_STD_MASK_VENDOR ((uint32_t)0xFF000000) 46 #define ROAR_STD_MASK_STD ((uint32_t)0x00FFFF00) 47 #define ROAR_STD_MASK_VERSION ((uint32_t)0x000000FF) 48 48 49 #define ROAR_STD_MAKE(vendor,standard,version) (((( vendor) & 0x00FF) << 24) | \50 ((( standard) & 0xFFFF) << 8) | \51 (( version) & 0x00FF) )49 #define ROAR_STD_MAKE(vendor,standard,version) ((((uint32_t)(vendor) & 0x00FF) << 24) | \ 50 (((uint32_t)(standard) & 0xFFFF) << 8) | \ 51 ((uint32_t)(version) & 0x00FF) ) 52 52 53 53 #define ROAR_STD_MAKE_RFC(rfc) ROAR_STD_MAKE(ROAR_STDV_RFC, (rfc), 0) -
include/roaraudio/muconthacks.h
r5015 r5210 47 47 #define O_NONBLOCK 0x04 48 48 #define O_CREAT 0x08 49 #define O_TRUNC 0x10 49 50 50 51 #define EAGAIN 11 -
include/roaraudio/notify.h
r4841 r5210 34 34 #define ROAR_EVENT_NETFLAG_PROXYEVENT 0x00000002 35 35 36 #define ROAR_NOTIFY_SPECIAL 0xffffffff36 #define ROAR_NOTIFY_SPECIAL (uint32_t)0xffffffff 37 37 38 38 // protocol cmds: 39 #define ROAR_NOTIFY_OFFSET_CMD 0x0000000040 #define ROAR_NOTIFY_MASK_CMD 0x000000ff39 #define ROAR_NOTIFY_OFFSET_CMD (uint32_t)0x00000000 40 #define ROAR_NOTIFY_MASK_CMD (uint32_t)0x000000ff 41 41 42 42 // event groups (AKA meta events): 43 #define ROAR_NOTIFY_OFFSET_EGRP 44 #define ROAR_NOTIFY_MASK_EGRP 43 #define ROAR_NOTIFY_OFFSET_EGRP (uint32_t)0x00010000 44 #define ROAR_NOTIFY_MASK_EGRP (uint32_t)0x0000ffff 45 45 46 46 // object event: 47 #define ROAR_NOTIFY_OFFSET_OE 0x0002000048 #define ROAR_NOTIFY_MASK_OE 0x0000ffff47 #define ROAR_NOTIFY_OFFSET_OE (uint32_t)0x00020000 48 #define ROAR_NOTIFY_MASK_OE (uint32_t)0x0000ffff 49 49 50 50 // user defined events: 51 #define ROAR_NOTIFY_OFFSET_USER 0x4000000052 #define ROAR_NOTIFY_MASK_USER 0x3fffffff51 #define ROAR_NOTIFY_OFFSET_USER (uint32_t)0x40000000 52 #define ROAR_NOTIFY_MASK_USER (uint32_t)0x3fffffff 53 53 54 54 #define ROAR_NOTIFY_X2EVENT(x,offset,mask) ((x) == -1 ? ROAR_NOTIFY_SPECIAL : (((x) & (mask))+(offset))) -
include/roaraudio/units.h
r4708 r5210 35 35 #define _ONE 1 36 36 #define _KILO 1000 37 #define _MEGA ( _KILO*_KILO)38 #define _GIGA ( _KILO*_MEGA)39 #define _TERA ( _KILO*_GIGA)37 #define _MEGA ((int_least32_t)_KILO*(int_least32_t)_KILO) 38 #define _GIGA ((int_least32_t)_KILO*_MEGA) 39 #define _TERA ((int_least32_t)_KILO*_GIGA) 40 40 41 41 … … 43 43 #ifndef _SEC 44 44 #if defined(_UNITS_T_BASE_MSEC) 45 #define _SEC 1000 45 #define _SEC_TYPE int_least32_t 46 #define _SEC (_SEC_TYPE)1000 46 47 #elif defined(_UNITS_T_BASE_USEC) 47 #define _SEC 1000000 48 #define _SEC_TYPE int_least32_t 49 #define _SEC (_SEC_TYPE)1000000 48 50 //#elif defined(_UNITS_T_BASE_SEC) 49 51 #else 50 52 #define _SEC 1 53 #define _SEC_TYPE int 51 54 #endif 52 55 #endif 53 56 54 #define _MIN (60*_SEC) 55 #define _HOUR (60*_MIN) 57 #ifndef _SEC_TYPE 58 #define _SEC_TYPE int_least32_t 59 #endif 60 61 #define _MIN ((_SEC_TYPE)60*_SEC) 62 #define _HOUR ((_SEC_TYPE)60*_MIN) 56 63 57 64 #define _MSEC (_SEC*_MILI) … … 62 69 #ifndef _METER 63 70 #if defined(_UNITS_D_BASE_MMETER) 71 #define _METER_TYPE int 64 72 #define _METER 1000 65 73 #elif defined(_UNITS_D_BASE_UMETER) 66 #define _METER 1000000 74 #define _METER_TYPE int_least32_t 75 #define _METER (_METER_TYPE)1000000 67 76 //#elif defined(_UNITS_D_BASE_METER) 68 77 #else 78 #define _METER_TYPE int 69 79 #define _METER 1 70 80 #endif 71 81 #endif 72 82 73 #define _AE (149597870691LL *_METER) 83 #ifndef _METER_TYPE 84 #define _METER_TYPE int_least32_t 85 #endif 86 87 #define _AE ((int_least64_t)149597870691LL *_METER) 74 88 #define _LJ (9460730472580800LL *_METER) 75 89 #define _PC (30856804413117847LL*_METER) /* TODO: FIXME: get a more corret value */ -
libroar/socket.c
r5203 r5210 168 168 169 169 int roar_socket_set_tos(int fh) { 170 #if ndef ROAR_TARGET_WIN32170 #if defined(ROAR_HAVE_BSDSOCKETS) && !defined(ROAR_TARGET_WIN32) 171 171 int opt = IPTOS_LOWDELAY; 172 172 int ret; -
libroardsp/alaw.c
r4758 r5210 839 839 bits = 1; 840 840 841 op = _roardsp_alaw2pcm16[(int)alaw] << 16;841 op = (uint32_t)_roardsp_alaw2pcm16[(int)alaw] << 16; 842 842 // out[i] |= extra << (11 + bits); 843 843 out[i] = op; -
roard/caps.c
r4708 r5210 71 71 version = ROAR_STD_VERSION(cap); 72 72 if ( version == 0 ) { 73 snpret = snprintf(ret+off, len-off, "%i-%i,", ROAR_STD_VENDOR(cap),ROAR_STD_STD(cap));73 snpret = snprintf(ret+off, len-off, "%i-%i,", (int)ROAR_STD_VENDOR(cap), (int)ROAR_STD_STD(cap)); 74 74 } else { 75 snpret = snprintf(ret+off, len-off, "%i-%i-%i,", ROAR_STD_VENDOR(cap), ROAR_STD_STD(cap),version);75 snpret = snprintf(ret+off, len-off, "%i-%i-%i,", (int)ROAR_STD_VENDOR(cap), (int)ROAR_STD_STD(cap), (int)version); 76 76 } 77 77 if ( snpret > 0 ) { -
roard/codecfilter.c
r4708 r5210 269 269 strcpy(delay, "dyn"); 270 270 } else { 271 snprintf(delay, 5, "%ims", d/1000);271 snprintf(delay, 5, "%ims", (int)(d/(uint_least32_t)1000)); 272 272 } 273 273 } -
roard/codecfilter_au.c
r4708 r5210 93 93 header[1] -= ROAR_AU_MIN_HEADER_LEN; 94 94 95 if ( header[1] > 32*1024) // do not allow more than 32KiB header...95 if ( header[1] > (uint32_t)32768U ) // do not allow more than 32KiB header... 96 96 return -1; 97 97 -
roard/hwmixer.c
r4852 r5210 238 238 int ret; 239 239 int error = 0; 240 char * strtok_store; 240 241 //int hwmixer_open(int basestream, char * drv, char * dev, int fh, char * basename, char * subnames) { 241 242 … … 248 249 k = NULL; 249 250 } else { 250 k = strtok(opts, ",");251 k = roar_mm_strtok_r(opts, ",", &strtok_store); 251 252 } 252 253 … … 281 282 } 282 283 283 k = strtok(NULL, ",");284 k = roar_mm_strtok_r(NULL, ",", &strtok_store); 284 285 } 285 286 -
roard/include/light.h
r5194 r5210 43 43 } g_light_mixer; 44 44 45 int light_init (u nsigned int channels);45 int light_init (uint32_t channels); 46 46 int light_free (void); 47 47 -
roard/light.c
r5194 r5210 33 33 // // 34 34 35 int light_init (u nsigned int channels) {35 int light_init (uint32_t channels) { 36 36 struct roar_stream_server * ss; 37 37 int i; … … 39 39 g_light_state.channels = 0; 40 40 41 if ( channels == 0 || channels > ( 512*512) ) /* unrealstic values */41 if ( channels == 0 || channels > ((uint32_t)512UL*(uint32_t)512UL) ) /* unrealstic values */ 42 42 return -1; 43 43 -
roard/midi.c
r5208 r5210 282 282 switch (mes->kk) { 283 283 case MIDI_CCE_MAIN_VOL: 284 if ( (516 *mes->vv) > 65100 ) { // max volume284 if ( (516U * (unsigned int)mes->vv) > 65100 ) { // max volume 285 285 ss->mixer.mixer[mes->channel] = 65535; 286 286 } else { … … 611 611 switch (mes->kk) { 612 612 case MIDI_CCE_MAIN_VOL: 613 if ( 516 *mes->vv > 65100 ) { // max volume613 if ( 516U * (unsigned int)mes->vv > 65100 ) { // max volume 614 614 ss->mixer.mixer[mes->channel] = 65535; 615 615 } else { -
roard/output.c
r5192 r5210 189 189 uint16_t tu16; 190 190 float q = -32e6; 191 char * strtok_store; 191 192 192 193 ROAR_INFO("add_output(drv='%s', dev='%s', opts='%s', prim=%i, count=%i): trying to add output driver", ROAR_DBG_INFO_INFO, drv, dev, opts, prim, count); … … 244 245 k = NULL; 245 246 } else { 246 k = strtok(opts, ",");247 k = roar_mm_strtok_r(opts, ",", &strtok_store); 247 248 } 248 249 … … 375 376 } 376 377 377 k = strtok(NULL, ",");378 k = roar_mm_strtok_r(NULL, ",", &strtok_store); 378 379 } 379 380 -
roard/roard.c
r5194 r5210 119 119 } else if ( ROAR_NOTIFY_IS_CMD(ev) ) { 120 120 if ( command_get_name(ROAR_NOTIFY_EVENT2CMD(ev), &ttname) == -1 ) { 121 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_CMD2EVENT(% i) */",ROAR_NOTIFY_EVENT2CMD(ev));121 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_CMD2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2CMD(ev)); 122 122 } else { 123 123 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_CMD2EVENT(ROAR_CMD_%s) */", ttname); … … 127 127 } 128 128 } else if ( ROAR_NOTIFY_IS_EGRP(ev) ) { 129 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_EGRP2EVENT(% i) */",ROAR_NOTIFY_EVENT2EGRP(ev));129 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_EGRP2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2EGRP(ev)); 130 130 } else if ( ROAR_NOTIFY_IS_OE(ev) ) { 131 131 switch (ev) { … … 155 155 // OE Default: 156 156 default: 157 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_OE2EVENT(% i) */",ROAR_NOTIFY_EVENT2OE(ev));157 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_OE2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2OE(ev)); 158 158 break; 159 159 } 160 160 } else if ( ROAR_NOTIFY_IS_USER(ev) ) { 161 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_USER2EVENT(% i) */",ROAR_NOTIFY_EVENT2USER(ev));161 snprintf(estr, sizeof(estr)-1, "/* ROAR_NOTIFY_USER2EVENT(%lu) */", (long unsigned int)ROAR_NOTIFY_EVENT2USER(ev)); 162 162 } 163 163 … … 959 959 #endif 960 960 961 #ifdef ROAR_HAVE_MAIN_ARGS 961 962 static void list_aiprofiles (void) { 962 963 struct roar_audio_info info; … … 990 991 } 991 992 } 993 #endif 992 994 993 995 int update_stream_flags (char * str) { … … 1365 1367 char * k; 1366 1368 enum output_format print_format = FORMAT_NATIVE; 1369 const struct rolestack * rolestack; 1367 1370 #endif 1368 1371 #if defined(ROAR_SUPPORT_LISTEN) && defined(ROAR_HAVE_GETUID) … … 1371 1374 struct roar_audio_info sa, max_sa; 1372 1375 struct roard_config config; 1373 const struct rolestack * rolestack;1374 1376 #if defined(ROAR_HAVE_FORK) || defined(ROAR_TARGET_WIN32) 1375 1377 int daemon = 0; … … 1412 1414 enum roard_client_acclev af_acclev = ACCLEV_ALL; 1413 1415 #ifndef ROAR_WITHOUT_DCOMP_LIGHT 1414 intlight_channels = LIGHT_CHANNELS_DEFAULT;1416 uint32_t light_channels = LIGHT_CHANNELS_DEFAULT; 1415 1417 #endif 1416 1418 #ifdef ROAR_DEFAULT_SOCKGRP … … 2606 2608 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 2607 2609 2610 #ifdef ROAR_HAVE_SYSTEM 2608 2611 if ( g_config->scripts.post_shutdown != NULL ) 2609 2612 system(g_config->scripts.post_shutdown); 2613 #endif 2610 2614 2611 2615 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); … … 2698 2702 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 2699 2703 2704 #ifdef ROAR_HAVE_SYSTEM 2700 2705 if ( g_config->scripts.post_shutdown != NULL ) 2701 2706 system(g_config->scripts.post_shutdown); 2707 #endif 2702 2708 2703 2709 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); -
roard/sources.c
r5194 r5210 140 140 int f_sync = 0, f_mmap = 0; 141 141 int codec; 142 char * strtok_store; 142 143 143 144 if ( source == NULL ) … … 166 167 s->pos_rel_id = -1; 167 168 168 k = strtok(options, ",");169 k = roar_mm_strtok_r(options, ",", &strtok_store); 169 170 while (k != NULL) { 170 171 if ( (v = strstr(k, "=")) != NULL ) { … … 214 215 } 215 216 216 k = strtok(NULL, ",");217 k = roar_mm_strtok_r(NULL, ",", &strtok_store); 217 218 } 218 219
Note: See TracChangeset
for help on using the changeset viewer.