misc/openalbridge/openalbridge_t.h
author mario.liebisch
Wed, 16 Jun 2010 11:50:45 +0200
changeset 3505 ada9f697eb11
parent 3362 8d3b4d19ce27
child 3513 f589230fa21b
permissions -rw-r--r--
Engine: * Bomb clusters now inherit 20 % of their parent's horizontal velocity (makes it a little bit more realistic without completely changing gameplay IMO - needs testing) Mercurial: * Added EOL rules (requires plugin to be activated) and ignore list
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3505
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     1
/*
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     2
 * OpenAL Bridge - a simple portable library for OpenAL interface
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     3
 * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     4
 *
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     6
 * it under the terms of the GNU Lesser General Public License as published by
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     8
 *
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    12
 * GNU Lesser General Public License for more details.
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    13
 *
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    14
 * You should have received a copy of the GNU Lesser General Public License
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    15
 * along with this program; if not, write to the Free Software
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    17
 */
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    18
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    19
#include <stdint.h>
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    20
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    21
#ifndef _OALB_INTERFACE_TYPES_H
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    22
#define _OALB_INTERFACE_TYPES_H
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    23
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    24
enum al_fade_enum {AL_FADE_IN, AL_FADE_OUT};
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    25
typedef enum al_fade_enum al_fade_t;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    26
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    27
//data type for passing data between threads
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    28
#pragma pack(1)
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    29
typedef struct _fade_t {
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    30
    uint32_t index;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    31
    uint16_t quantity;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    32
    al_fade_t type;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    33
} fade_t;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    34
#pragma pack()
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    35
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    36
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    37
//data type for WAV header
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    38
#pragma pack(1)
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    39
typedef struct _WAV_header_t {
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    40
    uint32_t ChunkID;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    41
    uint32_t ChunkSize;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    42
    uint32_t Format;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    43
    uint32_t Subchunk1ID;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    44
    uint32_t Subchunk1Size;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    45
    uint16_t AudioFormat;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    46
    uint16_t NumChannels;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    47
    uint32_t SampleRate;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    48
    uint32_t ByteRate;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    49
    uint16_t BlockAlign;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    50
    uint16_t BitsPerSample;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    51
    uint32_t Subchunk2ID;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    52
    uint32_t Subchunk2Size;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    53
} WAV_header_t;
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    54
#pragma pack()
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    55
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    56
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    57
#ifdef __CPLUSPLUS
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    58
}
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    59
#endif
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    60
ada9f697eb11 Engine:
mario.liebisch
parents: 3362
diff changeset
    61
#endif /*_OALB_INTERFACE_TYPES_H*/