Ignore:
File:
1 edited

Legend:

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

    r485281e r508b0df1  
    119119 * @return Error code
    120120 */
    121 static errno_t hplay(const char *filename, const char *target)
     121static errno_t hplay(const char *filename)
    122122{
    123123        printf("Hound playback: %s\n", filename);
     
    158158        }
    159159
    160         ret = hound_context_connect_target(hound, target);
     160        ret = hound_context_connect_target(hound, HOUND_DEFAULT_TARGET);
    161161        if (ret != EOK) {
    162                 printf("Failed to connect to target '%s': %s\n", target,
     162                printf("Failed to connect to default target: %s\n",
    163163                    str_error(ret));
    164 
    165                 char **names = NULL;
    166                 size_t count = 0;
    167                 ret = hound_context_get_available_targets(hound, &names, &count);
    168                 if (ret == EOK) {
    169                         printf("Available targets:\n");
    170                         for (size_t i = 0; i < count; i++)
    171                                 printf(" - %s\n", names[i]);
    172                 }
    173 
    174164                hound_context_destroy(hound);
    175165                fclose(source);
     
    225215        { "parallel", no_argument, 0, 'p' },
    226216        { "record", no_argument, 0, 'r' },
    227         { "target", required_argument, 0, 't' },
    228217        { "help", no_argument, 0, 'h' },
    229218        { 0, 0, 0, 0 }
     
    241230        printf("\t -r, --record\t Start recording instead of playback. "
    242231            "(Not implemented)\n");
    243         printf("\t -d, --device\t Direct output to specified device instead of "
    244             "the sound service. Use location path or a special device `default'\n");
    245         printf("\t -t, --target\t Output to the specified audio target.\n");
     232        printf("\t -d, --device\t Use specified device instead of the sound "
     233            "service. Use location path or a special device `default'\n");
    246234        printf("\t -p, --parallel\t Play given files in parallel instead of "
    247235            "sequentially (does not work with -d).\n");
     
    251239{
    252240        const char *device = "default";
    253         const char *target = HOUND_DEFAULT_TARGET;
    254241        int idx = 0;
    255242        bool direct = false, record = false, parallel = false;
     
    259246        /* Parse command line options */
    260247        while (ret != -1) {
    261                 ret = getopt_long(argc, argv, "d:prt:h", opts, &idx);
     248                ret = getopt_long(argc, argv, "d:prh", opts, &idx);
    262249                switch (ret) {
    263250                case 'd':
     
    270257                case 'p':
    271258                        parallel = true;
    272                         break;
    273                 case 't':
    274                         target = optarg;
    275259                        break;
    276260                case 'h':
     
    350334                                fibril_add_ready(fid);
    351335                        } else {
    352                                 hplay(file, target);
     336                                hplay(file);
    353337                        }
    354338                }
Note: See TracChangeset for help on using the changeset viewer.