|
SDLGameEngine
|
00001 #ifndef _SGESOUND_H 00002 #define _SGESOUND_H 00003 00004 #ifdef __cplusplus 00005 extern "C" { 00006 #endif 00007 00012 /* 00013 * Copyright (c) 2007 Heiko Irrgang 00014 * 00015 * The license and distribution terms for this file may be 00016 * found in the file COPYING in this distribution or at 00017 * http://93-interactive.com/cms/products/software/sdl-game-engine/license/ 00018 */ 00019 00029 #include <sge.h> 00030 00036 typedef struct { 00038 int playing; 00040 int channel; 00042 char *internalID; 00043 Mix_Chunk *data; 00044 } SGESOUND; 00045 00052 void sgeSetDefaultSampleRate(int rate); 00053 00058 int sgeGetDefaultSampleRate(void); 00059 00066 void sgeSetVolume(int volume); 00067 00072 int sgeGetVolume(void); 00073 00079 SGESOUND *sgeSoundNew(SGEFILE *f, const char *name); 00080 00085 void sgeSoundDestroy(SGESOUND *m); 00086 00093 void sgeSoundPlay(SGESOUND *m, int loop, int fadeinms); 00094 00100 void sgeSoundStop(SGESOUND *m, int fadeoutms); 00101 00107 int sgeSoundIsPlaying(SGESOUND *m); 00108 00109 // }@ 00110 00111 #ifdef __cplusplus 00112 } 00113 #endif 00114 00115 #endif