Changes in / [99c2c69e:11d41be5] in mainline
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r99c2c69e r11d41be5 402 402 } 403 403 } 404 srv_start("/srv/hound");405 404 406 405 return 0; -
uspace/app/wavplay/dplay.c
r99c2c69e r11d41be5 151 151 device_event_callback, pb); 152 152 if (ret != EOK) { 153 printf("Failed to register event callback: %s.\n", 154 str_error(ret)); 153 printf("Failed to register event callback.\n"); 155 154 return; 156 155 } … … 286 285 pb->f.sample_format); 287 286 if (ret != EOK) { 288 printf("Failed to start playback: %s\n", 289 str_error(ret)); 287 printf("Failed to start playback\n"); 290 288 return; 291 289 } … … 293 291 ret = audio_pcm_get_buffer_pos(pb->device, &pos); 294 292 if (ret != EOK) { 295 printf("Failed to update position indicator " 296 "%s\n", str_error(ret)); 293 printf("Failed to update position indicator\n"); 297 294 } 298 295 } … … 311 308 const int ret = audio_pcm_get_buffer_pos(pb->device, &pos); 312 309 if (ret != EOK) { 313 printf("Failed to update position indicator %s\n", 314 str_error(ret)); 310 printf("Failed to update position indicator\n"); 315 311 } 316 312 getuptime(&time); … … 354 350 ret = audio_pcm_get_info_str(session, &info); 355 351 if (ret != EOK) { 356 printf("Failed to get PCM info : %s.\n", str_error(ret));352 printf("Failed to get PCM info.\n"); 357 353 goto close_session; 358 354 } -
uspace/app/wavplay/main.c
r99c2c69e r11d41be5 79 79 &format.sampling_rate, &format.sample_format, &error); 80 80 if (ret != EOK) { 81 printf("Error parsing `%s' wav header: %s.\n", filename, error);81 printf("Error parsing wav header: %s.\n", 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));89 85 90 86 /* Allocate buffer and create new context */ … … 140 136 &format.sampling_rate, &format.sample_format, &error); 141 137 if (ret != EOK) { 142 printf("Error parsing `%s' wav header: %s.\n", filename, error);138 printf("Error parsing wav header: %s.\n", error); 143 139 fclose(source); 144 140 return EINVAL; 145 141 } 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));149 142 150 143 /* Connect new playback context */ -
uspace/app/wavplay/wave.c
r99c2c69e r11d41be5 81 81 } 82 82 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 83 if (uint16_t_le2host(header->subchunk1_size) != PCM_SUBCHUNK1_SIZE) { 86 84 if (error) 87 85 *error = "invalid subchunk1 size"; 88 //return EINVAL;86 return EINVAL; 89 87 } 90 88 … … 96 94 97 95 if (str_lcmp(header->subchunk2_id, SUBCHUNK2_ID, 4) != 0) { 98 //TODO basedd on subchunk1 size, we might be reading wrong99 //offset100 96 if (error) 101 97 *error = "invalid subchunk2 id"; 102 //return EINVAL;98 return EINVAL; 103 99 } 104 100 105 101 106 //TODO data and data_size are incorrect in extended wav formats107 //pcm params are OK108 102 if (data) 109 103 *data = header->data; -
uspace/srv/audio/hound/audio_device.c
r99c2c69e r11d41be5 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.