Changeset 4885:01d694a7fdf7 in roaraudio
- Timestamp:
- 04/28/11 17:28:25 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r4884 r4885 4 4 * Added functions to access symbolic names for audio info parameters (Closes: #51) 5 5 * added VIOs and DSTR elements: full: 6 * Some cleanup of roarclients to fix ckport warnings. 6 7 7 8 v. 0.4beta5 - Tue Apr 26 2011 08:42 CEST -
roarclients/roar-config.c
r4725 r4885 68 68 } 69 69 70 #define _strcat(buf, n) strncat(buf, n, sizeof(buf)-1-strlen(buf)) 71 70 72 int main (int argc, char * argv[]) { 71 73 enum { NORMAL, PC } mode = NORMAL; … … 121 123 if ( cflags || libs ) { 122 124 if ( cflags ) 123 strcat(buf, flags_ptr->cflags);125 _strcat(buf, flags_ptr->cflags); 124 126 125 127 if ( libs ) 126 strcat(buf, flags_ptr->libs);128 _strcat(buf, flags_ptr->libs); 127 129 128 130 puts(buf); -
roarclients/roarclientpass.c
r4708 r4885 22 22 * Boston, MA 02110-1301, USA. 23 23 * 24 */ 25 26 /* ckport options: 27 * ckport: ignore: ^roar_socket_open$ -- Used to get a clientfh. 24 28 */ 25 29 … … 123 127 roar_debug_set_stderr_mode(ROAR_DEBUG_MODE_SYSLOG); 124 128 #else 125 roar_debug_set_stderr_ fh(-1);129 roar_debug_set_stderr_vio(roar_stderr); 126 130 #endif 127 131 } else { 128 roar_debug_set_stderr_ fh(ROAR_STDERR);132 roar_debug_set_stderr_vio(roar_stderr); 129 133 } 130 134 -
roarclients/roarctl.c
r4882 r4885 22 22 * Boston, MA 02110-1301, USA. 23 23 * 24 */ 25 26 /* ckport options: 27 * ckport: ignore: ^roar_req$ -- Used within ping command. 24 28 */ 25 29 -
roarclients/roarinterconnect.c
r4708 r4885 22 22 * Boston, MA 02110-1301, USA. 23 23 * 24 */ 25 26 /* ckport options: 27 * ckport: ignore: ^roar_cdriver_oss$ -- For OSS streams 28 * ckport: ignore: ^roar_simple_stream$ -- For RoarAudio streams 29 * ckport: ignore: ^roar_socket_connect$ -- For PulseAudio Simple streams 24 30 */ 25 31 -
roarclients/roarmon.c
r4883 r4885 205 205 206 206 if ( prethru ) { 207 if ( roar_stream_set_flags (&con, &s, ROAR_FLAG_PRETHRU, 0) == -1 ) {207 if ( roar_stream_set_flags2(&con, &s, ROAR_FLAG_PRETHRU, ROAR_SET_FLAG) == -1 ) { 208 208 fprintf(stderr, "Error: can not set prethru flag on stream\n"); 209 209 roar_disconnect(&con); -
roarclients/roarmonhttp.c
r4883 r4885 347 347 348 348 if ( sflags != ROAR_FLAG_NONE ) { 349 if ( roar_stream_set_flags (&con, &s, sflags, 0) == -1 ) {349 if ( roar_stream_set_flags2(&con, &s, sflags, ROAR_SET_FLAG) == -1 ) { 350 350 roar_disconnect(&con); 351 351 return 14; -
roarclients/roarshout.c
r4757 r4885 105 105 char * s_url = NULL; 106 106 int s_public = 0; 107 int fh; 107 roar_vs_t * vss; 108 int err; 109 ssize_t ret; 108 110 int i; 109 111 char buf[BUFSIZE]; … … 252 254 shout_set_url(shout, s_url); 253 255 254 if ( ( fh = roar_simple_monitor(rate, channels, bits, codec, server, "roarshout")) == -1) {255 fprintf(stderr, "Error: can not start monitoring \n");256 if ( (vss = roar_vs_new_simple(server, "roarshout", rate, channels, codec, bits, ROAR_DIR_MONITOR, &err)) == NULL ) { 257 fprintf(stderr, "Error: can not start monitoring: %s\n", roar_vs_strerr(err)); 256 258 return 1; 257 259 } … … 262 264 } 263 265 264 while(( i = read(fh, buf, BUFSIZE)))266 while((ret = roar_vs_read(vss, buf, BUFSIZE, NULL))) 265 267 if (shout_send(shout, (unsigned char*)buf, i) != SHOUTERR_SUCCESS) 266 268 break; 267 269 268 roar_ simple_close(fh);270 roar_vs_close(vss, ROAR_VS_TRUE, NULL); 269 271 270 272 shout_sync(shout); -
roarclients/roarsin.c
r4708 r4885 82 82 float length = 5; /* 5 sec */ 83 83 float step; /* how much time per sample we have to encode ... */ 84 int fh; 84 roar_vs_t * vss; 85 int err; 85 86 int i; 86 87 int16_t out[1024]; … … 109 110 step = M_PI*2*freq/rate; 110 111 111 if ( ( fh = roar_simple_play(rate, channels, bits, codec, NULL, "sine gen")) == -1) {112 fprintf(stderr, "Error: can not open playback !\n");112 if ( (vss = roar_vs_new_playback(NULL, "sine gen", rate, channels, codec, bits, &err)) == NULL ) { 113 fprintf(stderr, "Error: can not open playback: %s\n", roar_vs_strerr(err)); 113 114 exit(1); 114 115 } … … 119 120 t += step; 120 121 } 121 write(fh, out, 2048);122 roar_vs_write(vss, out, 2048, NULL); 122 123 } 123 124 124 roar_ simple_close(fh);125 roar_vs_close(vss, ROAR_VS_FALSE, NULL); 125 126 126 127 return 0;
Note: See TracChangeset
for help on using the changeset viewer.