Mercurial > otakunoraifu
annotate music2/music.h @ 27:3a6aaeab7b4e
* Fixed a typo in Jagarl's name
* Updated GPL2 headers (new FSF adress)
author | thib |
---|---|
date | Mon, 02 Mar 2009 20:53:10 +0000 |
parents | f45da03ca631 |
children | 5ae5533b3a9a |
rev | line source |
---|---|
0 | 1 #ifndef __MUSIC__ /* __MUSIC__ */ |
2 #define __MUSIC__ | |
3 | |
4 #ifdef HAVE_CONFIG_H | |
5 # include "config.h" | |
6 #endif | |
7 | |
8 #include<sys/types.h> | |
9 #include<sys/time.h> | |
10 | |
11 #define MIX_PCM_BGM 4 | |
12 #define MIX_PCM_EFFEC 5 | |
13 #define MIX_PCM_KOE 6 | |
14 #define MIX_PCM_SIZE 8 | |
15 | |
16 #define DEFAULT_AUDIOBUF 4096 | |
17 | |
2
422f3cb3614b
Enabled voice playing with "%04d/%04d%05d.ogg" format. Don't use a cache for this
thib
parents:
0
diff
changeset
|
18 enum KoeType { koe_unknown, koe_nwk, koe_ovk, koe_ogg}; |
0 | 19 typedef struct { |
20 FILE* stream; | |
21 int length; | |
22 int offset; | |
23 int rate; | |
24 KoeType type; | |
25 }AvgKoeInfo; | |
26 | |
27 extern int pcm_enable; | |
28 | |
29 /* koedec.cc */ | |
30 extern AvgKoeInfo OpenKoeFile(const char* path); | |
31 extern char* decode_koe(AvgKoeInfo info, int* len); | |
32 extern char* decode_koe_nwa(AvgKoeInfo info, int* len); | |
33 extern const char* MakeWavHeader(int rate, int ch, int bps, int size); | |
34 extern AvgKoeInfo FindKoe(int file_number, int index); | |
35 | |
36 #include<unistd.h> | |
37 struct MuSys { | |
38 class AyuSysConfig& config; | |
39 char cdrom_track[128]; char effec_track[128]; | |
40 int movie_id; | |
41 int music_enable; | |
26 | 42 int volmod[4]; // BGM, KOE, PCM, Se |
0 | 43 MuSys(AyuSysConfig& _config); |
44 | |
45 void PlayCDROM(char* name, int play_count); | |
46 void StopCDROM(int time); | |
47 void PlaySE(const char* name, int loop_flag=0, int channel=0); | |
48 void PlaySE(int number); | |
49 void StopSE(int time = 0); | |
50 bool IsStopSE(void); | |
51 void PlayKoe(const char* fname); | |
52 void StopKoe(int time); | |
53 void PlayMovie(const char* fname, int x1, int y1, int x2, int y2, int loop_count); | |
54 void StopMovie(void); | |
55 bool IsStopMovie(void); | |
56 void InitMusic(void); | |
57 void FinalizeMusic(void); | |
58 }; | |
59 | |
60 #endif /* __MUSIC__ */ |