Changes in / [99c2c69e:11d41be5] in mainline


Ignore:
Location:
uspace
Files:
5 edited

Legend:

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

    r99c2c69e r11d41be5  
    402402                }
    403403        }
    404         srv_start("/srv/hound");
    405404       
    406405        return 0;
  • uspace/app/wavplay/dplay.c

    r99c2c69e r11d41be5  
    151151            device_event_callback, pb);
    152152        if (ret != EOK) {
    153                 printf("Failed to register event callback: %s.\n",
    154                     str_error(ret));
     153                printf("Failed to register event callback.\n");
    155154                return;
    156155        }
     
    286285                            pb->f.sample_format);
    287286                        if (ret != EOK) {
    288                                 printf("Failed to start playback: %s\n",
    289                                     str_error(ret));
     287                                printf("Failed to start playback\n");
    290288                                return;
    291289                        }
     
    293291                        ret = audio_pcm_get_buffer_pos(pb->device, &pos);
    294292                        if (ret != EOK) {
    295                                 printf("Failed to update position indicator "
    296                                    "%s\n", str_error(ret));
     293                                printf("Failed to update position indicator\n");
    297294                        }
    298295                }
     
    311308                const int ret = audio_pcm_get_buffer_pos(pb->device, &pos);
    312309                if (ret != EOK) {
    313                         printf("Failed to update position indicator %s\n",
    314                             str_error(ret));
     310                        printf("Failed to update position indicator\n");
    315311                }
    316312                getuptime(&time);
     
    354350        ret = audio_pcm_get_info_str(session, &info);
    355351        if (ret != EOK) {
    356                 printf("Failed to get PCM info: %s.\n", str_error(ret));
     352                printf("Failed to get PCM info.\n");
    357353                goto close_session;
    358354        }
  • uspace/app/wavplay/main.c

    r99c2c69e r11d41be5  
    7979            &format.sampling_rate, &format.sample_format, &error);
    8080        if (ret != EOK) {
    81                 printf("Error parsing `%s' wav header: %s.\n", filename, error);
     81                printf("Error parsing wav header: %s.\n", error);
    8282                fclose(source);
    8383                return EINVAL;
    8484        }
    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));
    8985
    9086        /* Allocate buffer and create new context */
     
    140136            &format.sampling_rate, &format.sample_format, &error);
    141137        if (ret != EOK) {
    142                 printf("Error parsing `%s' wav header: %s.\n", filename, error);
     138                printf("Error parsing wav header: %s.\n", error);
    143139                fclose(source);
    144140                return EINVAL;
    145141        }
    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));
    149142
    150143        /* Connect new playback context */
  • uspace/app/wavplay/wave.c

    r99c2c69e r11d41be5  
    8181        }
    8282
    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) {
    8684                if (error)
    8785                        *error = "invalid subchunk1 size";
    88 //              return EINVAL;
     86                return EINVAL;
    8987        }
    9088
     
    9694
    9795        if (str_lcmp(header->subchunk2_id, SUBCHUNK2_ID, 4) != 0) {
    98                 //TODO basedd on subchunk1 size, we might be reading wrong
    99                 //offset
    10096                if (error)
    10197                        *error = "invalid subchunk2 id";
    102 //              return EINVAL;
     98                return EINVAL;
    10399        }
    104100
    105101
    106         //TODO data and data_size are incorrect in extended wav formats
    107         //pcm params are OK
    108102        if (data)
    109103                *data = header->data;
  • uspace/srv/audio/hound/audio_device.c

    r99c2c69e r11d41be5  
    162162                }
    163163                audio_pcm_register_event_callback(dev->sess,
    164                     device_event_callback, dev);
     164                    device_event_callback, dev);\
    165165
    166166                /* Fill the buffer first. Fill the first two fragments,
Note: See TracChangeset for help on using the changeset viewer.