25 #include "audio/audiostream.h" 26 #include "audio/mixer.h" 28 #include "common/str.h" 42 enum SoundNextCommand {
45 kRandomIfOtherStarting,
54 void play(uint32
id, uint32 volume, uint16 heading, uint16 attenuation,
bool loop, SoundType type);
55 void setVolume3D(uint32 volume, uint16 heading, uint16 attenuation);
56 void fade(uint32 targetVolume, int32 targetHeading, int32 targetAttenuation, uint32 fadeDelay);
57 void fadeOut(uint32 fadeDelay);
60 void age(uint32 maxAge);
61 uint32 playedFrames();
62 uint32 adjustVolume(uint32 volume);
70 uint32 _ambientFadeOutDelay;
76 int32 _fadeSourceVolume;
77 int32 _fadeTargetVolume;
78 int32 _fadeSourceHeading;
79 int32 _fadeTargetHeading;
80 int32 _fadeSourceAttenuation;
81 int32 _fadeTargetAttenuation;
84 uint32 _fadeArrayPosition;
85 uint32 _fadeDurations[4];
86 uint32 _fadeVolumes[4];
111 SoundChannel *getChannelForSound(uint32
id, SoundType type,
bool *found =
nullptr);
113 void playEffect(uint32
id, uint32 volume, uint16 heading = 0, uint16 attenuation = 0);
114 void playEffectLooping(uint32
id, uint32 volume, uint16 heading = 0, uint16 attenuation = 0);
115 void playEffectFadeInOut(uint32
id, uint32 volume, uint16 heading, uint16 attenuation,
116 uint32 fadeInDuration, uint32 playDuration, uint32 fadeOutDuration);
117 void stopEffect(uint32
id, uint32 fadeDuration);
119 void playCue(uint32
id, uint32 volume, uint16 heading, uint16 attenuation);
120 void stopCue(uint32 fadeDelay);
122 void stopMusic(uint32 fadeDelay);
124 bool isPlaying(uint32
id);
125 int32 playedFrames(uint32
id);
130 void fadeOutOldSounds(uint32 fadeDelay);
132 void computeVolumeBalance(int32 volume, int32 heading, uint attenuation, int32 *mixerVolume, int32 *balance);
134 void setupNextSound(SoundNextCommand command, int16 controlVar, int16 startSoundId, int16 soundCount,
135 int32 soundMinDelay, int32 soundMaxDelay, int32 controlSoundId = 0, int32 controlSoundMaxPosition = 0);
136 void resetSoundVars();
138 static const uint kNumChannels = 14;
143 void compute3DVolumes(int32 heading, uint angle, int32 *left, int32 *right);
Definition: timestamp.h:83
SoundType
Definition: mixer.h:62
Definition: audiostream.h:50
Definition: audiostream.h:109