Changeset 5624:ec1593cc8525 in roaraudio for roard/req.c
- Timestamp:
- 08/18/12 02:04:07 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/req.c
r5608 r5624 1118 1118 struct roar_audio_info * audio_info; 1119 1119 struct roar_stream_ltm * ltm; 1120 struct roar_stream_rpg rpg; 1120 1121 uint16_t * d = (uint16_t *) mes->data; 1121 1122 int64_t * d64 = ( int64_t *) mes->data; … … 1348 1349 break; 1349 1350 1351 case ROAR_STREAM_PARA_RPG: 1352 if ( streams_get_rpg(mes->stream, &rpg) == -1 ) { 1353 return -1; 1354 } 1355 1356 mes->datalen = 2*5; 1357 1358 d[2] = rpg.mode; 1359 d[3] = rpg.mul; 1360 d[4] = rpg.div; 1361 1362 for (i = 0; i < mes->datalen/2; i++) { 1363 d[i] = ROAR_HOST2NET16(d[i]); 1364 } 1365 break; 1366 1350 1367 default: 1351 1368 ROAR_WARN("req_on_get_stream_para(*): unsupported command: %i", d[1]); … … 1360 1377 int req_on_set_stream_para (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 1361 1378 struct roar_stream_server * ss; 1379 struct roar_stream_rpg rpg; 1362 1380 uint16_t * d = (uint16_t *) mes->data; 1363 1381 uint32_t tmp, tmp2, flagstore; … … 1470 1488 } 1471 1489 break; 1490 case ROAR_STREAM_PARA_RPG: 1491 if ( mes->datalen != (5 * 2) ) 1492 return -1; 1493 1494 for (i = 2; i < mes->datalen/2; i++) { 1495 d[i] = ROAR_NET2HOST16(d[i]); 1496 } 1497 1498 rpg.mode = d[2]; 1499 rpg.mul = d[3]; 1500 rpg.div = d[4]; 1501 1502 if ( streams_set_rpg(mes->stream, &rpg) == -1 ) 1503 return -1; 1504 break; 1472 1505 default: 1473 1506 ROAR_WARN("req_on_set_stream_para(*): unsupported command version: %i, %i", d[0], d[1]);
Note: See TracChangeset
for help on using the changeset viewer.