1 /*
2 * sactbgm.c: SACT Music ��Ϣ
3 *
4 * Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
5 * 1998- <masaki-c@is.aist-nara.ac.jp>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22 /* $Id: sactbgm.c,v 1.4 2003/08/30 21:29:16 chikama Exp $ */
23
24 #include "config.h"
25
26 #include <stdio.h>
27 #include <glib.h>
28
29 #include "portab.h"
30 #include "system.h"
31 #include "ald_manager.h"
32 #include "music_client.h"
33
34 // ������ֹ�β��ڤ�¸�ߤ��뤫�����å�
smus_check(int no)35 int smus_check(int no) {
36 dridata *dfile = ald_getdata(DRIFILE_BGM, no -1);
37 int st = 0;
38
39 if (dfile == NULL) {
40 st = 0;
41 } else {
42 st = 1;
43 ald_freedata(dfile);
44 }
45
46 return st;
47 }
48
49 // ������ֹ�β��ڤ�Ĺ�������
smus_getlength(int no)50 int smus_getlength(int no) {
51 return mus_bgm_getlength(no);
52 }
53
54 // ������ֹ�β��ڤκ������֤����
smus_getpos(int no)55 int smus_getpos(int no) {
56 return mus_bgm_getpos(no);
57 }
58
59 // ������ֹ�β��ڤκ�������
smus_play(int no,int time,int vol)60 int smus_play(int no, int time, int vol) {
61 mus_bgm_play(no, time, vol);
62 return OK;
63 }
64
65 // ������ֹ�β��ڤκ������
smus_stop(int no,int fadetime)66 int smus_stop(int no, int fadetime) {
67 mus_bgm_stop(no, fadetime);
68 return OK;
69 }
70
71 // ������ֹ�β��ڤΥܥ�塼��ե�����
smus_fade(int no,int time,int vol)72 int smus_fade(int no, int time, int vol) {
73 mus_bgm_fade(no, time, vol);
74 return OK;
75 }
76
77 // ������ֹ�β��ڤ���λ����Τ��Ԥ�
smus_wait(int no,int timeout)78 int smus_wait(int no, int timeout) {
79 mus_bgm_wait(no, timeout);
80 return OK;
81 }
82
83 // ������ֹ�β��ڤ�����ΰ��֤ޤǺ��������Τ��Ԥ�
smus_waitpos(int no,int index)84 int smus_waitpos(int no, int index) {
85 mus_bgm_waitpos(no, index);
86 return OK;
87 }
88
89 // ���Ƥβ��ڤκ��������
smus_stopall(int time)90 int smus_stopall(int time) {
91 mus_bgm_stopall(time);
92 return OK;
93 }
94
95