Changeset 984a9ba in mainline for uspace/app/wavplay/dplay.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/dplay.c
r76f566d r984a9ba 88 88 } 89 89 90 /** 91 * Fragment playback callback function. 90 /** Fragment playback callback function. 92 91 * 93 * @param icall_handle Call capability handle. 94 * @param icall Pointer to the call structure 95 * @param arg Argument, pointer to the playback helper function 96 */ 97 static void device_event_callback(cap_call_handle_t icall_handle, 98 ipc_call_t *icall, void *arg) 99 { 100 async_answer_0(icall_handle, EOK); 92 * @param icall Pointer to the call structure 93 * @param arg Argument, pointer to the playback helper function 94 * 95 */ 96 static void device_event_callback(ipc_call_t *icall, void *arg) 97 { 98 async_answer_0(icall, EOK); 101 99 playback_t *pb = arg; 102 100 const size_t fragment_size = pb->buffer.size / DEFAULT_FRAGMENTS; 101 103 102 while (true) { 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_PLAYBACK_STARTED: 108 108 case PCM_EVENT_FRAMES_PLAYED: 109 109 printf("%" PRIun " frames: ", IPC_GET_ARG1(call)); 110 async_answer_0( chandle, EOK);110 async_answer_0(&call, EOK); 111 111 break; 112 112 case PCM_EVENT_PLAYBACK_TERMINATED: … … 115 115 pb->playing = false; 116 116 fibril_condvar_signal(&pb->cv); 117 async_answer_0( chandle, EOK);117 async_answer_0(&call, EOK); 118 118 fibril_mutex_unlock(&pb->mutex); 119 119 return; 120 120 default: 121 121 printf("Unknown event %" PRIun ".\n", IPC_GET_IMETHOD(call)); 122 async_answer_0( chandle, ENOTSUP);122 async_answer_0(&call, ENOTSUP); 123 123 continue; 124 124
Note:
See TracChangeset
for help on using the changeset viewer.