Changeset 6133470 in mainline
- Timestamp:
- 2013-04-04T10:39:16Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b266f9e
- Parents:
- be7eccf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/protocol.c
rbe7eccf r6133470 58 58 }; 59 59 60 typedef union { 61 struct { 62 uint16_t rate; 63 uint8_t channels; 64 uint8_t format; 65 } f __attribute__((packed)); 66 sysarg_t arg; 67 } format_convert_t; 68 69 60 70 /**** 61 71 * CLIENT … … 224 234 int flags, pcm_format_t format, size_t bsize) 225 235 { 226 union { 227 sysarg_t arg; 228 pcm_format_t format; 229 } convert = { .format = format }; 236 const format_convert_t c = { .f = { 237 .channels = format.channels, 238 .rate = format.sampling_rate / 100, 239 .format = format.sample_format, 240 }}; 230 241 return async_req_4_0(exch, IPC_M_HOUND_STREAM_ENTER, id, flags, 231 c onvert.arg, bsize);242 c.arg, bsize); 232 243 } 233 244 … … 420 431 421 432 hound_context_id_t id = IPC_GET_ARG1(call); 422 int flags = IPC_GET_ARG2(call); 423 union { 424 sysarg_t arg; 425 pcm_format_t format; 426 } convert = { .arg = IPC_GET_ARG3(call) }; 433 const int flags = IPC_GET_ARG2(call); 434 const format_convert_t c = {.arg = IPC_GET_ARG3(call)}; 435 const pcm_format_t f = { 436 .sampling_rate = c.f.rate * 100, 437 .channels = c.f.channels, 438 .sample_format = c.f.format, 439 }; 427 440 size_t bsize = IPC_GET_ARG4(call); 428 441 void *stream; 429 442 int ret = server_iface->add_stream(server_iface->server, 430 id, flags, convert.format, bsize, &stream);443 id, flags, f, bsize, &stream); 431 444 if (ret != EOK) { 432 445 async_answer_0(callid, ret);
Note:
See TracChangeset
for help on using the changeset viewer.