It compiles ...

This commit is contained in:
Themaister 2010-08-25 22:42:09 +02:00
parent fbd8dc6314
commit cb6ea2a26f
2 changed files with 6 additions and 4 deletions

View File

@ -19,7 +19,8 @@
#include "driver.h" #include "driver.h"
#include <AL/al.h> #include <AL/al.h>
#include <AL/alc.h> #include <AL/alc.h>
#include <sys/time.h> #include <time.h>
#include <string.h>
#define BUFSIZE 128 #define BUFSIZE 128
@ -47,7 +48,7 @@ typedef struct al
static void* __al_init(const char* device, int rate, int latency) static void* __al_init(const char* device, int rate, int latency)
{ {
(void)device; (void)device;
al_t *al = calloc(1, sizeof(rsd_t)); al_t *al = calloc(1, sizeof(al_t));
if ( al == NULL ) if ( al == NULL )
return NULL; return NULL;
@ -69,7 +70,7 @@ static void* __al_init(const char* device, int rate, int latency)
if (al->buffers == NULL || al->res_buf == NULL) if (al->buffers == NULL || al->res_buf == NULL)
goto error; goto error;
alGetSources(1, &al->source); alGenSources(1, &al->source);
alGenBuffers(al->num_buffers, al->buffers); alGenBuffers(al->num_buffers, al->buffers);
return al; return al;
@ -123,7 +124,7 @@ static bool al_get_buffer(al_t *al, ALuint *buffer)
if (al_unqueue_buffers(al)) if (al_unqueue_buffers(al))
break; break;
if (al->nonblocking) if (al->nonblock)
return false; return false;
#ifdef _WIN32 #ifdef _WIN32

View File

@ -39,6 +39,7 @@ extern const audio_driver_t audio_rsound;
extern const audio_driver_t audio_oss; extern const audio_driver_t audio_oss;
extern const audio_driver_t audio_alsa; extern const audio_driver_t audio_alsa;
extern const audio_driver_t audio_roar; extern const audio_driver_t audio_roar;
extern const audio_driver_t audio_openal;
extern const video_driver_t video_gl; extern const video_driver_t video_gl;
//////////////////////////////////////////////// ////////////////////////////////////////////////