22 #ifndef BLADERUNNER_AMBIENT_SOUNDS_H 23 #define BLADERUNNER_AMBIENT_SOUNDS_H 25 #include "bladerunner/bladerunner.h" 27 #include "audio/audiostream.h" 28 #include "audio/mixer.h" 30 #include "common/str.h" 34 class BladeRunnerEngine;
35 class SaveFileReadStream;
36 class SaveFileWriteStream;
39 static const int kNonLoopingSounds = 25;
40 static const int kLoopingSounds = 3;
43 struct NonLoopingSound {
50 uint32 nextPlayTimeStart;
51 uint32 nextPlayTimeDiff;
75 NonLoopingSound *_nonLoopingSounds;
76 LoopingSound *_loopingSounds;
77 int _ambientVolumeFactorOriginalEngine;
83 void addSound(
int sfxId,
84 uint32 delayMinSeconds, uint32 delayMaxSeconds,
85 int volumeMin,
int volumeMax,
86 int panStartMin,
int panStartMax,
87 int panEndMin,
int panEndMax,
88 int priority,
int unk);
89 void removeNonLoopingSound(
int sfxId,
bool stopPlaying);
90 void removeAllNonLoopingSounds(
bool stopPlaying);
92 void addSpeech(
int actorId,
int sentenceId,
93 uint32 delayMinSeconds, uint32 delayMaxSeconds,
94 int volumeMin,
int volumeMax,
95 int panStartMin,
int panStartMax,
96 int panEndMin,
int panEndMax,
97 int priority,
int unk);
98 void playSound(
int sfxId,
int volume,
int panStart,
int panEnd,
int priority,
Audio::Mixer::SoundType type = kAmbientSoundType);
99 void playSpeech(
int actorId,
int sentenceId,
int volume,
int panStart,
int panEnd,
int priority);
101 void addLoopingSound(
int sfxId,
int volume,
int pan, uint32 delaySeconds,
Audio::Mixer::SoundType type = kAmbientSoundType);
102 void adjustLoopingSound(
int sfxId,
int volume,
int pan, uint32 delaySeconds);
105 void removeLoopingSound(
int sfxId, uint32 delaySeconds);
106 void removeAllLoopingSounds(uint32 delaySeconds);
110 void setVolume(
int volume);
111 int getVolume()
const;
118 int findAvailableNonLoopingTrack()
const;
119 int findNonLoopingTrackByHash(int32 hash)
const;
121 int findAvailableLoopingTrack()
const;
122 int findLoopingTrackByHash(int32 hash)
const;
125 uint32 delayMinSeconds, uint32 delayMaxSeconds,
126 int volumeMin,
int volumeMax,
127 int panStartMin,
int panStartMax,
128 int panEndMin,
int panEndMax,
129 int priority,
int unk);
131 void removeNonLoopingSoundByIndex(
int index,
bool stopPlaying);
132 void removeLoopingSoundByIndex(
int index, uint32 delaySeconds);
Definition: savefile.h:88
Definition: savefile.h:113
Definition: ambient_sounds.h:38
SoundType
Definition: mixer.h:62
Definition: bladerunner.h:113