mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
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:
parent
237d46cfb6
commit
f9b9015245
9 changed files with 30 additions and 94 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue