Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 9df99a17 in mainline


Ignore:
Timestamp:
2013-03-16T18:39:25Z (7 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
master
Children:
71fe7e9d
Parents:
6606378
Message:

dplay: User provided open_default function instead of hardcoding device path

File:
1 edited

Legend:

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

    r6606378 r9df99a17  
    5151#include "dplay.h"
    5252
    53 #define DEFAULT_DEVICE "/hw/pci0/00:01.0/sb16/pcm"
    5453#define BUFFER_PARTS 2
    5554
     
    277276{
    278277        int ret = EOK;
    279         if (str_cmp(device, "default") == 0)
    280                 device = DEFAULT_DEVICE;
    281         audio_pcm_sess_t *session = audio_pcm_open(device);
     278        audio_pcm_sess_t *session = NULL;
     279        if (str_cmp(device, "default") == 0) {
     280                session = audio_pcm_open_default();
     281        } else {
     282                session = audio_pcm_open(device);
     283        }
    282284        if (!session) {
    283285                printf("Failed to connect to device %s.\n", device);
Note: See TracChangeset for help on using the changeset viewer.