Fix resmgr support

Call normal open() before trying with res_open_device().
snd_open_device() is defined to do this procedure.
This commit is contained in:
Takashi Iwai 2005-02-11 16:35:24 +00:00
parent 237d46cfb6
commit f9b9015245
9 changed files with 30 additions and 94 deletions

View file

@ -34,6 +34,9 @@
#include <errno.h>
#include "config.h"
#ifdef SUPPORT_RESMGR
#include <resmgr.h>
#endif
#define _snd_config_iterator list_head
#define _snd_interval sndrv_interval
@ -216,4 +219,17 @@ extern snd_lib_error_handler_t snd_err_msg;
# define link_warning(symbol, msg)
#endif
/* open with resmgr */
#ifdef SUPPORT_RESMGR
static inline int snd_open_device(const char *filename, int fmode)
{
int fd = open(filename, fmode);
if (fd >= 0)
return fd;
return rsm_open_device(filename, fmode);
}
#else
#define snd_open_device(filename, fmode) open(filename, fmode);
#endif
#endif