25#include "engines/nancy/commontypes.h"
27#include "audio/mixer.h"
30class SeekableReadStream;
34class SeekableAudioStream;
35class QueuingAudioStream;
49 enum PlayCommandFlags {
50 kPlaySequential = 0x0001,
51 kPlaySequentialPosition = 0x0003,
52 kPlaySequentialFrameAnchor = 0x0007,
54 kPlayRandomTime = 0x0010,
55 kPlayRandomPosition = 0x0020,
57 kPlayMoveLinear = 0x0100,
58 kPlayMoveCircular = 0x0300,
59 kPlayRandomMove = 0x0500
65 void loadCommonSounds(
IFF *boot);
66 void initSoundChannels();
71 void playSound(uint16 channelID);
75 void pauseSound(uint16 channelID,
bool pause);
78 void pauseAllSounds(
bool pause);
80 bool isSoundPlaying(uint16 channelID)
const;
84 void stopSound(uint16 channelID);
89 byte getVolume(uint16 channelID);
93 void setVolume(uint16 channelID, uint16 volume);
99 uint16 getRequestedVolume(uint16 channelID)
const;
103 void update3DSoundPosition(uint16 channelID, int32 x, int32 y, int32 z);
104 void update3DSoundMinDistance(uint16 channelID, uint32 minDistance);
105 void update3DSoundMaxDistance(uint16 channelID, uint32 maxDistance);
110 void setListenerPosition(
const Math::Vector3d &position);
111 void clearListenerPositionOverride();
113 uint32 getRate(uint16 channelID);
117 uint32 getBaseRate(uint16 channelID);
121 void setRate(uint16 channelID, uint32 rate);
129 bool isCommonSound(
const Common::String &soundName)
const {
return _commonSounds.contains(soundName); }
131 void soundEffectMaintenance();
132 void recalculateSoundEffects();
134 Math::Vector3d &getOrientation() {
return _orientation; }
138 void stopAndUnloadSceneSpecificSounds();
139 void pauseSceneSpecificSounds(
bool pause);
148 uint16 playCommands = 1;
151 uint16 requestedVolume = 0;
152 uint16 panAnchorFrame = 0;
153 bool isPanning =
false;
157 bool isPersistent =
false;
161 Math::Vector3d position;
162 Math::Vector3d positionDelta;
163 uint32 nextStepTime = 0;
164 uint16 stepsLeft = 0;
165 uint32 nextRepeatTime = 0;
168 void soundEffectMaintenance(uint16 channelID,
bool force =
false);
179 Math::Vector3d getListenerPosition()
const;
186 bool _shouldRecalculate;
188 Math::Vector3d _orientation;
189 Math::Vector3d _position;
190 uint _positionLerp = 0;
192 Math::Vector3d _listenerPositionOverride;
193 bool _hasListenerPositionOverride =
false;
Definition: audiostream.h:50
SoundType
Definition: mixer.h:73
Definition: audiostream.h:212
Definition: timestamp.h:83
Definition: algorithm.h:29
Definition: actionmanager.h:32
Definition: commontypes.h:306
Definition: commontypes.h:269