28 #ifndef GOB_SOUND_SOUND_H 29 #define GOB_SOUND_SOUND_H 31 #include "common/str.h" 32 #include "gob/sound/sounddesc.h" 37 class BackgroundAtmosphere;
48 enum BackgroundPlayMode {
53 static const int kSoundsCount = 60;
58 static void convToSigned(byte *buffer,
int length);
62 const SoundDesc *sampleGetBySlot(
int slot)
const;
63 int sampleGetNextFreeSlot()
const;
65 bool sampleLoad(
SoundDesc *sndDesc, SoundType type,
const char *fileName);
66 void sampleFree(
SoundDesc *sndDesc,
bool noteAdLib =
false,
int index = -1);
70 void blasterPlay(
SoundDesc *sndDesc, int16 repCount,
71 int16 frequency, int16 fadeLength = 0);
72 void blasterStop(int16 fadeLength,
SoundDesc *sndDesc = 0);
74 void blasterPlayComposition(
const int16 *composition, int16 freqVal,
75 SoundDesc *sndDescs = 0, int8 sndCount = kSoundsCount);
76 void blasterStopComposition();
77 void blasterRepeatComposition(int32 repCount);
79 char blasterPlayingSound()
const;
81 void blasterSetRepeating(int32 repCount);
82 void blasterWaitEndPlay(
bool interruptible =
false,
bool stopComp =
true);
86 void speakerOn(int16 frequency, int32 length = -1);
88 void speakerOnUpdate(uint32 millis);
92 bool adlibLoadADL(
const char *fileName);
93 bool adlibLoadADL(byte *data, uint32 size,
int index = -1);
94 bool adlibLoadMDY(
const char *fileName);
95 bool adlibLoadTBR(
const char *fileName);
98 void adlibPlayTrack(
const char *trackname);
99 void adlibPlayBgMusic();
104 bool adlibIsPlaying()
const;
106 int adlibGetIndex()
const;
107 int32 adlibGetRepeating()
const;
109 void adlibSetRepeating(int32 repCount);
110 void adlibSyncVolume();
114 bool infogramesLoadInstruments(
const char *fileName);
115 bool infogramesLoadSong(
const char *fileName);
117 void infogramesPlay();
118 void infogramesStop();
122 bool protrackerPlay(
const char *fileName);
123 void protrackerStop();
130 void cdPlayBgMusic();
131 void cdPlayMultMusic();
136 bool cdIsPlaying()
const;
138 int32 cdGetTrackPos(
const char *keyTrack = 0)
const;
139 const char *cdGetCurrentTrack()
const;
141 void cdTest(
int trySubst,
const char *label);
145 void bgPlay(
const char *file, SoundType type);
146 void bgPlay(
const char *base,
const char *ext, SoundType type,
int count);
149 void bgSetPlayMode(BackgroundPlayMode mode);
180 void createMDYPlayer();
181 void createADLPlayer();
186 #endif // GOB_SOUND_SOUND_H
Definition: protracker.h:39
Definition: adlplayer.h:42
Definition: bgatmosphere.h:46
Definition: musplayer.h:46
Definition: pcspeaker.h:39
Definition: infogrames.h:36
Definition: sounddesc.h:43
Definition: soundblaster.h:43