Changeset 5740:b3aff85876f1 in roaraudio for plugins/roard/protocol-rplay.c
- Timestamp:
- 11/09/12 02:51:16 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/roard/protocol-rplay.c
r5739 r5740 24 24 */ 25 25 26 #include "roard.h"26 #include <roard/include/roard.h> 27 27 28 28 #ifndef ROAR_WITHOUT_DCOMP_EMUL_RPLAY … … 83 83 static inline int is_true(const char * str) { 84 84 const char * ts[] = {"true", "t", "1", "yes", "y", "on"}; 85 int i;86 87 for (i = 0; i < sizeof(ts)/sizeof(*ts); i++)85 size_t i; 86 87 for (i = 0; i < (sizeof(ts)/sizeof(*ts)); i++) 88 88 if ( !strcasecmp(str, ts[i]) ) 89 89 return 1; … … 137 137 138 138 static int emul_rplay_set_proto (int client, struct roar_vio_calls * vio, struct roar_buffer ** obuffer, void ** userdata, const struct roar_keyval * protopara, ssize_t protoparalen, struct roar_dl_librarypara * pluginpara) { 139 140 (void)obuffer, (void)userdata, (void)protopara, (void)protoparalen, (void)pluginpara; 141 139 142 if ( emul_rplay_on_status(client, NULL, vio, NULL, 0) == -1 ) 140 143 return -1; … … 146 149 char buf[1024]; 147 150 ssize_t len; 151 152 (void)obuffer, (void)userdata, (void)protopara, (void)protoparalen, (void)pluginpara; 148 153 149 154 if ( client == -1 ) … … 210 215 const char * cd = NULL; 211 216 217 (void)client; 218 212 219 if ( cmd != NULL ) { 213 220 command = cmd->name; … … 236 243 int fragsize = ROAR_OUTPUT_CALC_OUTBUFSIZE(g_sa); 237 244 int h, m, s; 245 246 (void)client, (void)cmd, (void)kv, (void)kvlen; 238 247 239 248 s = g_pos / g_sa->rate / g_sa->channels; … … 281 290 282 291 static int emul_rplay_on_quit(int client, struct emul_rplay_command * cmd, struct roar_vio_calls * vio, struct roar_keyval * kv, size_t kvlen) { 292 293 (void)client, (void)cmd, (void)vio, (void)kv, (void)kvlen; 294 283 295 return -1; 284 296 } … … 286 298 static int emul_rplay_on_help(int client, struct emul_rplay_command * cmd, struct roar_vio_calls * vio, struct roar_keyval * kv, size_t kvlen) { 287 299 struct emul_rplay_command * c; 300 301 (void)client, (void)cmd, (void)kv, (void)kvlen; 288 302 289 303 roar_vio_printf(vio, "+message=\"command summary\" command=help\n"); … … 504 518 //static int emul_rplay_on_stop(int client, struct emul_rplay_command * cmd, struct roar_vio_calls * vio, struct roar_keyval * kv, size_t kvlen); 505 519 506 st ruct roar_dl_proto __proto_common_rplay = {520 static struct roar_dl_proto __proto_common_rplay = { 507 521 .proto = ROAR_PROTO_RPLAY, 508 522 .description = "RPlay emulation", … … 512 526 }; 513 527 528 static int __reg_proto(struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib) { 529 (void)para, (void)lib; 530 ROAR_DL_PLUGIN_REG_FN(ROAR_DL_PROTO_SUBTYPE, __proto_common_rplay, ROAR_DL_PROTO_VERSION); 531 return 0; 532 } 533 534 ROAR_DL_PLUGIN_START(protocol_rplay) { 535 ROARD_DL_CHECK_VERSIONS(); 536 537 ROAR_DL_PLUGIN_META_PRODUCT_NIV("protocol-rplay", ROAR_VID_ROARAUDIO, ROAR_VNAME_ROARAUDIO); 538 ROAR_DL_PLUGIN_META_VERSION(ROAR_VERSION_STRING); 539 ROAR_DL_PLUGIN_META_LICENSE_TAG(GPLv3_0); 540 ROAR_DL_PLUGIN_META_CONTACT_FLNE("Philipp", "Schafft", "ph3-der-loewe", "lion@lion.leolix.org"); 541 ROAR_DL_PLUGIN_META_DESC("Implementation of the RPlay protocol"); 542 543 ROAR_DL_PLUGIN_REG(ROAR_DL_FN_PROTO, __reg_proto); 544 } ROAR_DL_PLUGIN_END 545 514 546 #endif 515 547
Note: See TracChangeset
for help on using the changeset viewer.