25 #include "engines/nancy/commontypes.h" 27 #include "audio/mixer.h" 30 class SeekableReadStream;
34 class SeekableAudioStream;
35 class 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 void update3DSoundPosition(uint16 channelID, int32 x, int32 y, int32 z);
100 void update3DSoundMinDistance(uint16 channelID, uint32 minDistance);
101 void update3DSoundMaxDistance(uint16 channelID, uint32 maxDistance);
106 void setListenerPosition(
const Math::Vector3d &position);
107 void clearListenerPositionOverride();
109 uint32 getRate(uint16 channelID);
113 uint32 getBaseRate(uint16 channelID);
117 void setRate(uint16 channelID, uint32 rate);
125 void soundEffectMaintenance();
126 void recalculateSoundEffects();
128 Math::Vector3d &getOrientation() {
return _orientation; }
132 void stopAndUnloadSceneSpecificSounds();
133 void pauseSceneSpecificSounds(
bool pause);
142 uint16 playCommands = 1;
145 uint16 panAnchorFrame = 0;
146 bool isPanning =
false;
150 bool isPersistent =
false;
154 Math::Vector3d position;
155 Math::Vector3d positionDelta;
156 uint32 nextStepTime = 0;
157 uint16 stepsLeft = 0;
158 uint32 nextRepeatTime = 0;
161 void soundEffectMaintenance(uint16 channelID,
bool force =
false);
172 Math::Vector3d getListenerPosition()
const;
179 bool _shouldRecalculate;
181 Math::Vector3d _orientation;
182 Math::Vector3d _position;
183 uint _positionLerp = 0;
185 Math::Vector3d _listenerPositionOverride;
186 bool _hasListenerPositionOverride =
false;
191 #endif // NANCY_SOUND_H
Definition: timestamp.h:83
Definition: commontypes.h:240
Definition: audiostream.h:212
SoundType
Definition: mixer.h:73
Definition: algorithm.h:29
Definition: audiostream.h:50
Definition: commontypes.h:277
Definition: actionmanager.h:32