2
* OpenTyrian: A modern cross-platform port of Tyrian
3
* Copyright (C) 2007-2009 The OpenTyrian Development Team
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27
#define SFX_CHANNELS 8
29
#if defined(TARGET_GP2X) || defined(TARGET_DINGUX)
30
#define OUTPUT_QUALITY 2 // 22 kHz
32
#define OUTPUT_QUALITY 4 // 44 kHz
35
#define SAMPLE_SCALING OUTPUT_QUALITY
36
#define SAMPLE_TYPE Bit16s
37
#define BYTES_PER_SAMPLE 2
39
extern float music_volume, sample_volume;
41
extern unsigned int song_playing;
43
extern bool audio_disabled, music_disabled, samples_disabled;
45
bool init_audio( void );
46
void deinit_audio( void );
48
void load_music( void );
49
void play_song( unsigned int song_num );
50
void restart_song( void );
51
void stop_song( void );
52
void fade_song( void );
54
void set_volume( unsigned int music, unsigned int sample );
56
void JE_multiSamplePlay(JE_byte *buffer, JE_word size, JE_byte chan, JE_byte vol);
58
#endif /* LOUDNESS_H */