Changeset 1240bb9 in mainline for uspace/app/drec/drec.c


Ignore:
Timestamp:
2012-07-12T18:20:45Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d01e635
Parents:
992ef56
Message:

Use named audio events.

audio/sb16: dsp uses more detailed status (not just playing/not-playing).
app/drec: Fix parameter order in.

File:
1 edited

Legend:

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

    r992ef56 r1240bb9  
    8989                ipc_call_t call;
    9090                ipc_callid_t callid = async_get_call(&call);
    91                 if (IPC_GET_IMETHOD(call) != IPC_FIRST_USER_METHOD) {
    92                         printf("Unknown event.\n");
     91                switch(IPC_GET_IMETHOD(call)) {
     92                case PCM_EVENT_RECORDING_DONE:
     93                        printf("+");
     94                        async_answer_0(callid, EOK);
    9395                        break;
     96                case PCM_EVENT_RECORDING_TERMINATED:
     97                        printf("\nRecording terminated\n");
     98                        return;
     99                default:
     100                        printf("Unknown event %d.\n", IPC_GET_IMETHOD(call));
     101                        async_answer_0(callid, ENOTSUP);
     102                        continue;
     103
    94104                }
    95105                const size_t bytes = fwrite(rec->buffer.position,
     
    207217        };
    208218        fwrite(&header, sizeof(header), 1, rec.file);
    209         record(&rec, sampling_rate, channels, format);
     219        record(&rec, channels, sampling_rate, format);
    210220        fclose(rec.file);
    211221
Note: See TracChangeset for help on using the changeset viewer.