alsa_stubs.c revision a0fa73db71284ce5b1ae51a51dca25381f95e163
#define LOG_GROUP LOG_GROUP_DEV_AUDIO
#include <alsa/asoundlib.h>
#include "alsa_stubs.h"
#define VBOX_ALSA_LIB "libasound.so.2"
/**
* Try to dynamically load the ALSA libraries. This function is not
* thread-safe, and should be called before attempting to use any
* of the ALSA functions.
*
* @returns iprt status code
*/
int audioLoadAlsaLib(void)
{
int rc = VINF_SUCCESS;
LogFlowFunc(("\n"));
/* If this is not NO then the function has obviously been called twice,
which is likely to be a bug. */
if (NO != isLibLoaded)
{
}
isLibLoaded = FAIL;
if (RT_FAILURE(rc))
{
}
if (RT_SUCCESS(rc))
{
isLibLoaded = YES;
}
return rc;
}
{ \
void *pfnResolvedFunc; \
int rc; \
\
{ \
} \
if (RT_SUCCESS(rc)) \
{ \
} \
else \
{ \
} \
return rcFunc; \
} \
(pcm), -1)
PROXY_STUB(snd_pcm_hw_params, int,
PROXY_STUB(snd_pcm_open, int,
(handler), -1)
PROXY_STUB(snd_pcm_sw_params, int,