misc/libopenalbridge/commands.h
author koda
Fri, 06 Jan 2012 01:51:04 +0100
changeset 6551 a2f39cb9af62
parent 3697 d5b30d6373fc
permissions -rw-r--r--
fix a couple of loose ends: sdl_mixer is informed of that OGG is provided by Tremor with its own macro, there is no more a segfault on Tremor cleanup, added new event type and timestamp entry for SDL, removed spurious characters from the japanese translation, uSound errors now are output with SDLTry, uSound doesn't need sound preloading any more
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     1
/*
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     2
 *  commands.h
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     3
 *  Hedgewars
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     4
 *
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     5
 *  Created by Vittorio on 13/06/10.
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     6
 *  Copyright 2010 __MyCompanyName__. All rights reserved.
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     7
 *
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     8
 */
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
     9
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    10
#ifndef _OALB_COMMANDS_H
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    11
#define _OALB_COMMANDS_H
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    12
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    13
#include "openalbridge_t.h"
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    14
#include "openalbridge.h"
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    15
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    16
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    17
#define openal_fadein(x,y)          openal_fade(x,y,AL_FADE_IN)
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    18
#define openal_fadeout(x,y)         openal_fade(x,y,AL_FADE_OUT)
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    19
#define openal_playsound_loop(x,y)  openal_playsound(x)  \
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    20
                                        if (y != 0)  \
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    21
                                        openal_toggleloop(x);
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    22
#ifdef __CPLUSPLUS
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    23
extern "C" {
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    24
#endif
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    25
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    26
    // play, pause, stop a single sound source
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    27
    void openal_pausesound        (unsigned int index);
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    28
    void openal_stopsound         (unsigned int index);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    29
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    30
    // play a sound and set whether it should loop or not (0/1)
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    31
    void openal_playsound         (unsigned int index);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    32
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    33
    void openal_freesound         (unsigned int index);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    34
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    35
    // set or unset the looping property for a sound source
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    36
    void openal_toggleloop        (unsigned int index);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    37
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    38
    // set position and volume of a sound source
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    39
    void openal_setposition       (unsigned int index, float x, float y, float z);
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    40
    void openal_setvolume         (unsigned int index, float gain);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    41
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    42
    // set volume for all sounds (gain interval is [0-1])
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    43
    void openal_setglobalvolume   (float gain);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    44
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    45
    // mute or unmute all sounds
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    46
    void openal_togglemute        (void);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    47
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    48
    // fade effect,
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    49
    void openal_fade              (unsigned int index, unsigned short int quantity, al_fade_t direction);
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    50
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    51
#ifdef __CPLUSPLUS
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    52
}
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    53
#endif
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents:
diff changeset
    54
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3514
diff changeset
    55
#endif /*_OALB_COMMANDS_H*/