Changeset 984a9ba in mainline for uspace/app/wavplay/drec.c
- Timestamp:
- 2018-07-05T09:34:09Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/wavplay/drec.c
r76f566d r984a9ba 85 85 } 86 86 87 /** 88 * Recording callback. 87 /** Recording callback. 89 88 * 90 89 * Writes recorded data. 91 90 * 92 * @param icall_handle IPC call handle. 93 * @param icall Poitner to IPC call structure. 94 * @param arg Argument. Poitner to recording helper structure. 95 */ 96 static void device_event_callback(cap_call_handle_t icall_handle, 97 ipc_call_t *icall, void *arg) 98 { 99 async_answer_0(icall_handle, EOK); 91 * @param icall Poitner to IPC call structure. 92 * @param arg Argument. Poitner to recording helper structure. 93 * 94 */ 95 static void device_event_callback(ipc_call_t *icall, void *arg) 96 { 97 async_answer_0(icall, EOK); 100 98 record_t *rec = arg; 101 99 const size_t buffer_part = rec->buffer.size / BUFFER_PARTS; 102 100 bool record = true; 101 103 102 while (record) { 104 103 ipc_call_t call; 105 cap_call_handle_t chandle = async_get_call(&call); 104 async_get_call(&call); 105 106 106 switch (IPC_GET_IMETHOD(call)) { 107 107 case PCM_EVENT_CAPTURE_TERMINATED: … … 114 114 default: 115 115 printf("Unknown event %" PRIun ".\n", IPC_GET_IMETHOD(call)); 116 async_answer_0( chandle, ENOTSUP);116 async_answer_0(&call, ENOTSUP); 117 117 continue; 118 118 } 119 119 120 120 if (!record) { 121 async_answer_0( chandle, EOK);121 async_answer_0(&call, EOK); 122 122 break; 123 123 } … … 131 131 if (rec->buffer.position >= (rec->buffer.base + rec->buffer.size)) 132 132 rec->buffer.position = rec->buffer.base; 133 async_answer_0( chandle, EOK);133 async_answer_0(&call, EOK); 134 134 } 135 135 }
Note:
See TracChangeset
for help on using the changeset viewer.