Changeset 770:3f3103b894a1 in roaraudio
- Timestamp:
- 09/07/08 04:31:18 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarcatplay.c
r765 r770 35 35 " --simple - Use the simple interface (default)\n" 36 36 " --passive - Use passiv playback (experimental, works only localy)\n" 37 " --background - Use background playback, impleys passive mode\n" 37 38 " --help - Show this help\n" 38 39 ); … … 49 50 char * file = NULL; 50 51 int mode = MODE_SIMPLE; 52 int bg = 0; 51 53 struct roar_connection con[1]; 54 struct roar_stream stream[1]; 52 55 53 56 for (i = 1; i < argc; i++) { … … 60 63 } else if ( strcmp(k, "--passive") == 0 ) { 61 64 mode = MODE_PASSIVE; 65 } else if ( strcmp(k, "--background") == 0 ) { 66 bg = 1; 62 67 } else if ( strcmp(k, "--help") == 0 ) { 63 68 usage(); … … 72 77 } 73 78 79 if ( bg ) 80 mode = MODE_PASSIVE; 74 81 75 82 if ( file == NULL ) … … 82 89 } 83 90 84 if ( roar_file_play_full(con, file, 0, 1, NULL) == -1 ) {91 if ( roar_file_play_full(con, file, 0, 1, stream) == -1 ) { 85 92 ROAR_ERR("Can not start playback"); 86 93 return 1; 87 94 } 88 95 89 sleep(10); 96 if ( bg ) { 97 if ( roar_stream_attach_simple(con, stream, 0) == -1 ) { 98 ROAR_ERR("Can not attach stream to server"); 99 } 100 } else { 101 sleep(10); 102 } 90 103 91 104 roar_disconnect(con);
Note: See TracChangeset
for help on using the changeset viewer.