Ignore:
File:
1 edited

Legend:

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

    rd5c1051 r0e4c5f0  
    170170 * @param device The device.
    171171 * @param file The file.
    172  * @return 0 on succes, non-zero on failure.
     172 * @return Error code.
    173173 */
    174174int drecord(const char *device, const char *file)
     
    176176        int ret = EOK;
    177177        audio_pcm_sess_t *session = NULL;
    178         sysarg_t val;
    179178        if (str_cmp(device, "default") == 0) {
    180179                session = audio_pcm_open_default();
     
    187186        }
    188187        printf("Recording on device: %s.\n", device);
    189         ret = audio_pcm_query_cap(session, AUDIO_CAP_CAPTURE, &val);
    190         if (ret != EOK || !val) {
     188        if (audio_pcm_query_cap(session, AUDIO_CAP_CAPTURE) <= 0) {
    191189                printf("Device %s does not support recording\n", device);
    192190                ret = ENOTSUP;
     
    227225                goto cleanup;
    228226        }
    229         ret = audio_pcm_query_cap(rec.device, AUDIO_CAP_INTERRUPT, &val);
    230         if (ret == EOK && val)
     227        if (audio_pcm_query_cap(rec.device, AUDIO_CAP_INTERRUPT) > 0)
    231228                record_fragment(&rec, format);
    232229        else
Note: See TracChangeset for help on using the changeset viewer.