Changeset 4933:41edaa4019b1 in roaraudio
- Timestamp:
- 05/08/11 23:09:44 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r4922 r4933 106 106 " protectflag ID FLAGS - Protects flags on a stream. Those flags can not be\n" 107 107 " changed anymore after the they got protected. See flag.\n" 108 "\n" 109 " role ID ROLE - Set role ROLE on stream ID.\n" 108 110 "\n" 109 111 " kick TYPE ID - Kicks object of TYPE with id ID\n" … … 964 966 } 965 967 968 int set_role (struct roar_connection * con, int id, int role) { 969 struct roar_stream s; 970 971 if ( id == -1 ) 972 return -1; 973 974 if ( roar_stream_new_by_id(&s, id) == -1 ) 975 return -1; 976 977 if ( roar_stream_set_role(con, &s, role) == -1 ) 978 return -1; 979 980 return 0; 981 } 982 966 983 int show_aiprofile (const char * profile) { 967 984 struct roar_audio_info info; … … 1208 1225 } 1209 1226 i++; 1227 1228 } else if ( !strcmp(k, "role") ) { 1229 i++; 1230 if ( set_role(&con, atoi(argv[i]), roar_str2role(argv[i+1])) == -1 ) { 1231 fprintf(stderr, "Error: can not set stream role\n"); 1232 } else { 1233 printf("flags protected\n"); 1234 } 1235 i++; 1236 1210 1237 } else if ( !strcmp(k, "metaset") ) { 1211 1238 i++;
Note: See TracChangeset
for help on using the changeset viewer.