Changeset 67fbd5e in mainline
- Timestamp:
- 2013-09-13T00:47:39Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1c5f6f8
- Parents:
- 11d41be5 (diff), 99c2c69e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/wavplay/dplay.c
r11d41be5 r67fbd5e 151 151 device_event_callback, pb); 152 152 if (ret != EOK) { 153 printf("Failed to register event callback.\n"); 153 printf("Failed to register event callback: %s.\n", 154 str_error(ret)); 154 155 return; 155 156 } … … 285 286 pb->f.sample_format); 286 287 if (ret != EOK) { 287 printf("Failed to start playback\n"); 288 printf("Failed to start playback: %s\n", 289 str_error(ret)); 288 290 return; 289 291 } … … 291 293 ret = audio_pcm_get_buffer_pos(pb->device, &pos); 292 294 if (ret != EOK) { 293 printf("Failed to update position indicator\n"); 295 printf("Failed to update position indicator " 296 "%s\n", str_error(ret)); 294 297 } 295 298 } … … 308 311 const int ret = audio_pcm_get_buffer_pos(pb->device, &pos); 309 312 if (ret != EOK) { 310 printf("Failed to update position indicator\n"); 313 printf("Failed to update position indicator %s\n", 314 str_error(ret)); 311 315 } 312 316 getuptime(&time); … … 350 354 ret = audio_pcm_get_info_str(session, &info); 351 355 if (ret != EOK) { 352 printf("Failed to get PCM info .\n");356 printf("Failed to get PCM info: %s.\n", str_error(ret)); 353 357 goto close_session; 354 358 } -
uspace/app/wavplay/main.c
r11d41be5 r67fbd5e 79 79 &format.sampling_rate, &format.sample_format, &error); 80 80 if (ret != EOK) { 81 printf("Error parsing wav header: %s.\n", error);81 printf("Error parsing `%s' wav header: %s.\n", filename, error); 82 82 fclose(source); 83 83 return EINVAL; 84 84 } 85 86 printf("File `%s' format: %u channel(s), %uHz, %s.\n", filename, 87 format.channels, format.sampling_rate, 88 pcm_sample_format_str(format.sample_format)); 85 89 86 90 /* Allocate buffer and create new context */ … … 136 140 &format.sampling_rate, &format.sample_format, &error); 137 141 if (ret != EOK) { 138 printf("Error parsing wav header: %s.\n", error);142 printf("Error parsing `%s' wav header: %s.\n", filename, error); 139 143 fclose(source); 140 144 return EINVAL; 141 145 } 146 printf("File `%s' format: %u channel(s), %uHz, %s.\n", filename, 147 format.channels, format.sampling_rate, 148 pcm_sample_format_str(format.sample_format)); 142 149 143 150 /* Connect new playback context */ -
uspace/app/wavplay/wave.c
r11d41be5 r67fbd5e 81 81 } 82 82 83 if (uint16_t_le2host(header->subchunk1_size) != PCM_SUBCHUNK1_SIZE) { 83 if (uint32_t_le2host(header->subchunk1_size) != PCM_SUBCHUNK1_SIZE) { 84 //TODO subchunk 1 sizes other than 16 are allowed ( 18, 40) 85 //http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/WAVE/WAVE.html 84 86 if (error) 85 87 *error = "invalid subchunk1 size"; 86 return EINVAL;88 // return EINVAL; 87 89 } 88 90 … … 94 96 95 97 if (str_lcmp(header->subchunk2_id, SUBCHUNK2_ID, 4) != 0) { 98 //TODO basedd on subchunk1 size, we might be reading wrong 99 //offset 96 100 if (error) 97 101 *error = "invalid subchunk2 id"; 98 return EINVAL;102 // return EINVAL; 99 103 } 100 104 101 105 106 //TODO data and data_size are incorrect in extended wav formats 107 //pcm params are OK 102 108 if (data) 103 109 *data = header->data; -
uspace/srv/audio/hound/audio_device.c
r11d41be5 r67fbd5e 162 162 } 163 163 audio_pcm_register_event_callback(dev->sess, 164 device_event_callback, dev); \164 device_event_callback, dev); 165 165 166 166 /* Fill the buffer first. Fill the first two fragments,
Note:
See TracChangeset
for help on using the changeset viewer.