misc/openalbridge/openalbridge_t.h
changeset 3513 f589230fa21b
parent 3505 ada9f697eb11
equal deleted inserted replaced
3512:6a8b5f313190 3513:f589230fa21b
    15  * along with this program; if not, write to the Free Software
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    17  */
    17  */
    18 
    18 
    19 #include <stdint.h>
    19 #include <stdint.h>
       
    20 #include "al.h"
    20 
    21 
    21 #ifndef _OALB_INTERFACE_TYPES_H
    22 #ifndef _OALB_INTERFACE_TYPES_H
    22 #define _OALB_INTERFACE_TYPES_H
    23 #define _OALB_INTERFACE_TYPES_H
    23 
    24 
    24 enum al_fade_enum {AL_FADE_IN, AL_FADE_OUT};
    25 enum al_fade_enum {AL_FADE_IN, AL_FADE_OUT};
    25 typedef enum al_fade_enum al_fade_t;
    26 typedef enum al_fade_enum al_fade_t;
    26 
    27 
    27 //data type for passing data between threads
    28 
       
    29 // data type to handle which source source is playing what
       
    30 #pragma pack(1)
       
    31 typedef struct _al_sound_t {
       
    32     const char *filename;       // name of the sound file
       
    33     ALuint buffer;              // actual sound content
       
    34     uint32_t source_index;      // index of the associated source
       
    35     uint32_t stats;             // number of times the sound has been played
       
    36 } al_sound_t;
       
    37 #pragma pack()
       
    38 
       
    39 
       
    40 // data type for passing data between threads
    28 #pragma pack(1)
    41 #pragma pack(1)
    29 typedef struct _fade_t {
    42 typedef struct _fade_t {
    30     uint32_t index;
    43     uint32_t index;
    31     uint16_t quantity;
    44     uint16_t quantity;
    32     al_fade_t type;
    45     al_fade_t type;
    33 } fade_t;
    46 } fade_t;
    34 #pragma pack()
    47 #pragma pack()
    35 
    48 
    36 
    49 
    37 //data type for WAV header
    50 // data type for WAV header
    38 #pragma pack(1)
    51 #pragma pack(1)
    39 typedef struct _WAV_header_t {
    52 typedef struct _WAV_header_t {
    40     uint32_t ChunkID;
    53     uint32_t ChunkID;
    41     uint32_t ChunkSize;
    54     uint32_t ChunkSize;
    42     uint32_t Format;
    55     uint32_t Format;