forked from cyxx/rawgl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mixer.h
40 lines (32 loc) · 926 Bytes
/
mixer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Another World engine rewrite
* Copyright (C) 2004-2005 Gregory Montoir ([email protected])
*/
#ifndef MIXER_H__
#define MIXER_H__
#include "intern.h"
struct AifcPlayer;
struct SfxPlayer;
struct Mixer_impl;
struct Mixer {
AifcPlayer *_aifc;
SfxPlayer *_sfx;
Mixer_impl *_impl;
Mixer(SfxPlayer *sfx);
void init();
void quit();
void update();
void playSoundRaw(uint8_t channel, const uint8_t *data, uint16_t freq, uint8_t volume);
void playSoundWav(uint8_t channel, const uint8_t *data, uint16_t freq, uint8_t volume);
void playSoundAiff(uint8_t channel, const uint8_t *data, uint8_t volume);
void stopSound(uint8_t channel);
void setChannelVolume(uint8_t channel, uint8_t volume);
void playMusic(const char *path);
void stopMusic();
void playAifcMusic(const char *path, uint32_t offset);
void stopAifcMusic();
void playSfxMusic(int num);
void stopSfxMusic();
void stopAll();
};
#endif