misc/libopenalbridge/wrappers.c
changeset 3529 0e968ba12a84
parent 3514 59dbd31e9953
child 3697 d5b30d6373fc
equal deleted inserted replaced
3516:a8c673657b79 3529:0e968ba12a84
    42 
    42 
    43     return aptr;
    43     return aptr;
    44 }
    44 }
    45 
    45 
    46 
    46 
    47 FILE *Fopen (const char *fname, char *mode)	{
    47 FILE *Fopen (const char *fname, char *mode) {
    48     FILE *fp;
    48     FILE *fp;
    49 
    49 
    50     fp = fopen(fname,mode);
    50     fp = fopen(fname,mode);
    51     if (fp == NULL)
    51     if (fp == NULL)
    52         fprintf(stderr,"(Bridge Error) - can't open file %s in mode '%s'\n", fname, mode);
    52         fprintf(stderr,"(Bridge Error) - can't open file %s in mode '%s'\n", fname, mode);
    53 
    53 
    54     return fp;
    54     return fp;
    55 }
    55 }
    56 
    56 
    57 
    57 
       
    58 al_sound_t new_sound_el (void) {
       
    59     al_sound_t sound;
       
    60     
       
    61     sound.filename = NULL;
       
    62     sound.buffer = -1;
       
    63     sound.source_index = -1;
       
    64     sound.is_used = AL_FALSE;
       
    65 
       
    66     return sound;
       
    67 }
       
    68 
       
    69 al_sound_t init_sound_el (const char *str) {
       
    70     al_sound_t sound;
       
    71     
       
    72     sound.filename = str;
       
    73     sound.source_index = -1;
       
    74     sound.is_used = AL_TRUE;
       
    75     alGenBuffers(1, &sound.buffer);
       
    76 
       
    77     return sound;
       
    78 }