Changeset a46e56b in mainline for uspace/app/wavplay/dplay.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/wavplay/dplay.c

    r3e242d2 ra46e56b  
    9090/**
    9191 * Fragment playback callback function.
    92  * @param iid IPC call id.
    93  * @param icall Pointer to the call structure
    94  * @param arg Argument, pointer to the playback helper function
    95  */
    96 static void device_event_callback(cap_call_handle_t iid, ipc_call_t *icall, void* arg)
    97 {
    98         async_answer_0(iid, EOK);
     92 *
     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 */
     97static 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);
    99101        playback_t *pb = arg;
    100102        const size_t fragment_size = pb->buffer.size / DEFAULT_FRAGMENTS;
    101103        while (1) {
    102104                ipc_call_t call;
    103                 cap_call_handle_t callid = async_get_call(&call);
     105                cap_call_handle_t chandle = async_get_call(&call);
    104106                switch(IPC_GET_IMETHOD(call)) {
    105107                case PCM_EVENT_PLAYBACK_STARTED:
    106108                case PCM_EVENT_FRAMES_PLAYED:
    107109                        printf("%" PRIun " frames: ", IPC_GET_ARG1(call));
    108                         async_answer_0(callid, EOK);
     110                        async_answer_0(chandle, EOK);
    109111                        break;
    110112                case PCM_EVENT_PLAYBACK_TERMINATED:
     
    113115                        pb->playing = false;
    114116                        fibril_condvar_signal(&pb->cv);
    115                         async_answer_0(callid, EOK);
     117                        async_answer_0(chandle, EOK);
    116118                        fibril_mutex_unlock(&pb->mutex);
    117119                        return;
    118120                default:
    119121                        printf("Unknown event %" PRIun ".\n", IPC_GET_IMETHOD(call));
    120                         async_answer_0(callid, ENOTSUP);
     122                        async_answer_0(chandle, ENOTSUP);
    121123                        continue;
    122124
Note: See TracChangeset for help on using the changeset viewer.