Changes in uspace/app/wavplay/drec.c [d5c1051:0e4c5f0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/wavplay/drec.c
rd5c1051 r0e4c5f0 170 170 * @param device The device. 171 171 * @param file The file. 172 * @return 0 on succes, non-zero on failure.172 * @return Error code. 173 173 */ 174 174 int drecord(const char *device, const char *file) … … 176 176 int ret = EOK; 177 177 audio_pcm_sess_t *session = NULL; 178 sysarg_t val;179 178 if (str_cmp(device, "default") == 0) { 180 179 session = audio_pcm_open_default(); … … 187 186 } 188 187 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) { 191 189 printf("Device %s does not support recording\n", device); 192 190 ret = ENOTSUP; … … 227 225 goto cleanup; 228 226 } 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) 231 228 record_fragment(&rec, format); 232 229 else
Note:
See TracChangeset
for help on using the changeset viewer.