Changeset 1433ecda in mainline for uspace/app/wavplay


Ignore:
Timestamp:
2018-04-04T15:42:37Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

Location:
uspace/app/wavplay
Files:
3 edited

Legend:

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

    r47b2d7e3 r1433ecda  
    8989
    9090        /* Allocate buffer and create new context */
    91         char * buffer = malloc(READ_SIZE);
     91        char *buffer = malloc(READ_SIZE);
    9292        if (!buffer) {
    9393                fclose(source);
     
    211211 */
    212212static const struct option opts[] = {
    213         {"device", required_argument, 0, 'd'},
    214         {"parallel", no_argument, 0, 'p'},
    215         {"record", no_argument, 0, 'r'},
    216         {"help", no_argument, 0, 'h'},
    217         {0, 0, 0, 0}
     213        { "device", required_argument, 0, 'd' },
     214        { "parallel", no_argument, 0, 'p' },
     215        { "record", no_argument, 0, 'r' },
     216        { "help", no_argument, 0, 'h' },
     217        { 0, 0, 0, 0 }
    218218};
    219219
     
    222222 * @param name Name of the program.
    223223 */
    224 static void print_help(const char* name)
     224static void print_help(const char *name)
    225225{
    226226        printf("Usage: %s [options] file [files...]\n", name);
     
    293293                if (ret != EOK) {
    294294                        printf("Failed to connect hound context to default "
    295                            "target.\n");
     295                            "target.\n");
    296296                        hound_context_destroy(hound_ctx);
    297297                        return 1;
     
    324324                                if (!data) {
    325325                                        printf("Playback of %s failed.\n",
    326                                                 file);
     326                                            file);
    327327                                        continue;
    328328                                }
  • uspace/app/wavplay/wave.c

    r47b2d7e3 r1433ecda  
    118118                const unsigned size = uint16_t_le2host(header->sample_size);
    119119                switch (size) {
    120                 case 8: *format = PCM_SAMPLE_UINT8; break;
    121                 case 16: *format = PCM_SAMPLE_SINT16_LE; break;
    122                 case 24: *format = PCM_SAMPLE_SINT24_LE; break;
    123                 case 32: *format = PCM_SAMPLE_SINT32_LE; break;
     120                case 8:
     121                        *format = PCM_SAMPLE_UINT8;
     122                        break;
     123                case 16:
     124                        *format = PCM_SAMPLE_SINT16_LE;
     125                        break;
     126                case 24:
     127                        *format = PCM_SAMPLE_SINT24_LE;
     128                        break;
     129                case 32:
     130                        *format = PCM_SAMPLE_SINT32_LE;
     131                        break;
    124132                default:
    125133                        *error = "Unknown format";
  • uspace/app/wavplay/wave.h

    r47b2d7e3 r1433ecda  
    9090} wave_header_t;
    9191
    92 errno_t wav_parse_header(const void *, const void**, size_t *, unsigned *,
     92errno_t wav_parse_header(const void *, const void **, size_t *, unsigned *,
    9393    unsigned *, pcm_sample_format_t *, const char **);
    9494
    95 void wav_init_header(wave_header_t *, pcm_format_t , size_t);
     95void wav_init_header(wave_header_t *, pcm_format_t, size_t);
    9696#endif
    9797/**
Note: See TracChangeset for help on using the changeset viewer.