Lephisto/src/sound.h

31 lines
806 B
C

#pragma once
#include <AL/al.h>
#include "physics.h"
#define VOICE_LOOPING (1<<10)
struct alVoice;
typedef struct alVoice alVoice;
// Sound subsystem.
int sound_init(void);
void sound_exit(void);
void sound_update(void);
// Sound manupulation functions.
ALuint sound_get(char* name);
void sound_volume(const double vol);
// Voice manipulation function.
alVoice* sound_addVoice(int priority, double px, double py,
double vx, double vy, const ALuint buffer, const int flags);
void sound_delVoice(alVoice(alVoice* voice); // Delete voice.
void voice_update(alVoice* voice, double px, double py, double vx, double vy);
void voice_buffer(alVoice* voice, const ALuint buffer, const int flags);
// Listener manipulation.
void sound_listener(double dir, double px, double py, double vx, double vy);