Ignore:
File:
1 edited

Legend:

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

    r5a6cc679 rb752a31  
    4242#include <as.h>
    4343#include <inttypes.h>
     44#include <str.h>
    4445
    4546#include "wave.h"
     
    8586
    8687/**
    87  * Recording callback. Writes recorded data.
    88  * @param iid IPC call id.
    89  * @param icall Poitner to IPC call structure.
    90  * @param arg Argument. Poitner to recording helper structure.
    91  */
    92 static void device_event_callback(ipc_callid_t iid, ipc_call_t *icall, void* arg)
    93 {
    94         async_answer_0(iid, EOK);
     88 * Recording callback.
     89 *
     90 * Writes recorded data.
     91 *
     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 */
     96static 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);
    95100        record_t *rec = arg;
    96101        const size_t buffer_part = rec->buffer.size / BUFFER_PARTS;
     
    98103        while (record) {
    99104                ipc_call_t call;
    100                 ipc_callid_t callid = async_get_call(&call);
     105                cap_call_handle_t chandle = async_get_call(&call);
    101106                switch(IPC_GET_IMETHOD(call)) {
    102107                case PCM_EVENT_CAPTURE_TERMINATED:
     
    109114                default:
    110115                        printf("Unknown event %" PRIun ".\n", IPC_GET_IMETHOD(call));
    111                         async_answer_0(callid, ENOTSUP);
     116                        async_answer_0(chandle, ENOTSUP);
    112117                        continue;
    113118                }
    114119
    115120                if (!record) {
    116                         async_answer_0(callid, EOK);
     121                        async_answer_0(chandle, EOK);
    117122                        break;
    118123                }
     
    126131                if (rec->buffer.position >= (rec->buffer.base + rec->buffer.size))
    127132                        rec->buffer.position = rec->buffer.base;
    128                 async_answer_0(callid, EOK);
     133                async_answer_0(chandle, EOK);
    129134        }
    130135}
     
    194199        }
    195200
    196         const char* info = NULL;
     201        char* info = NULL;
    197202        ret = audio_pcm_get_info_str(session, &info);
    198203        if (ret != EOK) {
Note: See TracChangeset for help on using the changeset viewer.