28 #ifndef ID_SND_BACKENDS
29 #define ID_SND_BACKENDS
67 bool Lock(
void **pDSLockedBuffer,
ulong *dwDSLockedBufferSize ) {
return false; }
68 bool Unlock(
void *pDSLockedBuffer,
dword dwDSLockedBufferSize ) {
return false; }
72 void Write(
bool flushing );
79 void Release(
bool bSilent =
false );
88 #define ALSA_PCM_NEW_HW_PARAMS_API
89 #define ALSA_PCM_NEW_SW_PARAMS_API
90 #include <alsa/asoundlib.h>
92 #define id_snd_pcm_hw_params_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_hw_params_t *) alloca(id_snd_pcm_hw_params_sizeof()); memset(*ptr, 0, id_snd_pcm_hw_params_sizeof()); } while (0)
94 typedef const char * ( *pfn_snd_asoundlib_version )(
void );
97 typedef const char * ( *pfn_snd_strerror )(
int errnum );
112 #define ALSA_DLSYM(SYM) id_##SYM = ( pfn_##SYM )dlvsym( m_handle, #SYM, "ALSA_0.9" ); if ( !id_##SYM ) { common->Printf( "dlsym "#SYM" failed: %s\n", dlerror() ); Release(); return false; }
147 bool Lock(
void **pDSLockedBuffer,
ulong *dwDSLockedBufferSize ) {
return false; }
148 bool Unlock(
void *pDSLockedBuffer,
dword dwDSLockedBufferSize ) {
return false; }
152 void Write(
bool flushing );
snd_pcm_sframes_t(* pfn_snd_pcm_avail_update)(snd_pcm_t *pcm)
pfn_snd_pcm_hw_params_set_buffer_size_min id_snd_pcm_hw_params_set_buffer_size_min
bool Unlock(void *pDSLockedBuffer, dword dwDSLockedBufferSize)
GLenum GLsizei GLenum format
virtual ~idAudioHardwareALSA()
int(* pfn_snd_pcm_hw_params_set_channels)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val)
const char *(* pfn_snd_asoundlib_version)(void)
bool Lock(void **pDSLockedBuffer, ulong *dwDSLockedBufferSize)
pfn_snd_pcm_hw_params id_snd_pcm_hw_params
static const int MIXBUFFER_CHUNKS
bool Lock(void **pDSLockedBuffer, ulong *dwDSLockedBufferSize)
int(* pfn_snd_pcm_hw_params_set_access)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t access)
pfn_snd_pcm_hw_params_set_rate id_snd_pcm_hw_params_set_rate
pfn_snd_pcm_avail_update id_snd_pcm_avail_update
bool GetCurrentPosition(ulong *pdwCurrentWriteCursor)
int GetNumberOfSpeakers()
void ExtractOSSVersion(int version, idStr &str) const
virtual ~idAudioHardwareOSS()
int(* pfn_snd_pcm_hw_params)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
pfn_snd_pcm_hw_params_sizeof id_snd_pcm_hw_params_sizeof
size_t(* pfn_snd_pcm_hw_params_sizeof)(void)
bool GetCurrentPosition(ulong *pdwCurrentWriteCursor)
pfn_snd_pcm_hw_params_any id_snd_pcm_hw_params_any
short * GetMixBuffer(void)
pfn_snd_pcm_hw_params_set_access id_snd_pcm_hw_params_set_access
int GetMixBufferSize(void)
int(* pfn_snd_pcm_open)(snd_pcm_t **pcmp, const char *name, snd_pcm_stream_t stream, int mode)
int(* pfn_snd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
pfn_snd_strerror id_snd_strerror
int(* pfn_snd_pcm_prepare)(snd_pcm_t *pcm)
pfn_snd_pcm_writei id_snd_pcm_writei
const char *(* pfn_snd_strerror)(int errnum)
pfn_snd_asoundlib_version id_snd_asoundlib_version
int(* pfn_snd_pcm_hw_params_set_rate)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val, int dir)
pfn_snd_pcm_hw_params_set_format id_snd_pcm_hw_params_set_format
int(* pfn_snd_pcm_close)(snd_pcm_t *pcm)
int(* pfn_snd_pcm_hw_params_any)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
void Write(bool flushing)
bool Unlock(void *pDSLockedBuffer, dword dwDSLockedBufferSize)
void Write(bool flushing)
void Release(bool bSilent=false)
pfn_snd_pcm_open id_snd_pcm_open
pfn_snd_pcm_hw_params_set_channels id_snd_pcm_hw_params_set_channels
snd_pcm_state_t(* pfn_snd_pcm_state)(snd_pcm_t *pcm)
pfn_snd_pcm_hw_params_get_buffer_size id_snd_pcm_hw_params_get_buffer_size
pfn_snd_pcm_prepare id_snd_pcm_prepare
int GetNumberOfSpeakers(void)
pfn_snd_pcm_state id_snd_pcm_state
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
int(* pfn_snd_pcm_hw_params_set_format)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t format)
static const int MIXBUFFER_CHUNKS
pfn_snd_pcm_close id_snd_pcm_close
int(* pfn_snd_pcm_hw_params_set_buffer_size_min)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val)
GLenum const GLfloat * params
snd_pcm_sframes_t(* pfn_snd_pcm_writei)(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size)