24 {0.0000000f, 0.1099999f, 0.2199999f, 0.3300000f, 0.4399999f, 0.5500000f,
25 0.6600000f, 0.7699999f, 0.8799999f, 0.9700000f}};
75 static_assert(
sizeof(
SoundDesc_mm6) == 112,
"Wrong type size");
76 static_assert(
sizeof(
SoundDesc) == 120,
"Wrong type size");
78 size_t num_mm6_sounds = data_mm6 ? *(
uint32_t *)data_mm6 : 0;
79 size_t num_mm7_sounds = data_mm7 ? *(
uint32_t *)data_mm7 : 0;
80 size_t num_mm8_sounds = data_mm8 ? *(
uint32_t *)data_mm8 : 0;
82 unsigned int sNumSounds = num_mm6_sounds + num_mm7_sounds + num_mm8_sounds;
84 assert(!num_mm8_sounds);
87 for (
size_t i = 0; i < num_mm7_sounds; i++) {
89 si.
sName = (
char *)sounds[i].pSoundName;
97 for (
size_t i = 0; i < num_mm6_sounds; i++) {
99 si.
sName = (
char *)sounds_mm6[i].pSoundName;
170 vol = std::max(0, vol);
171 vol = std::min(9, vol);
211 if (si.
sName ==
"") {
239 }
else if (pid == -1) {
243 }
else if (pid < 0) {
247 unsigned int object_id = PID_ID(pid);
248 switch (object_type) {
251 assert((
int)object_id < pIndoor->uNumDoors);
260 si.
sample->Play(
false,
true);
266 if (object_id == 5) si.
sample->Stop();
276 si.
sample->SetPosition(
pActors[object_id].vPosition.x / 50.f,
277 pActors[object_id].vPosition.y / 50.f,
278 pActors[object_id].vPosition.z / 50.f, 500.f);
280 si.
sample->Play(
false,
true);
293 si.
sample->Play(
true,
true);
306 si.
sample->Play(
false,
true);
333 #pragma pack(push, 1)
347 logger->
Warning(L
"Can't open file: %s", L
"Sounds\\Audio.snd");
352 fAudioSnd.read((
char*)&uNumSoundHeaders, 4);
353 for (
uint32_t i = 0; i < uNumSoundHeaders; i++) {
386 if (header ==
nullptr) {
395 *header = it->second;
408 std::map<String, SoundHeader>::iterator it =
mSoundHeaders.begin();
409 std::advance(it, uSoundID);
464 {00000, 10000, 10010, 10020, 10030, 10040, 10050, 10060, 10070, 10080,
465 10090, 10100, 11000, 11010, 11020, 11030, 11040, 11050, 11060, 11070,
466 11080, 11090, 11100, 12000, 12010, 12020, 12030, 12040, 12050, 12060,
467 12070, 12080, 12090, 12100, 13000, 13010, 13020, 13030, 13040, 13050,
468 13060, 13070, 13080, 13090, 13100, 14000, 14010, 14020, 14030, 14040,
469 14050, 14060, 14070, 14080, 14090, 14100, 15000, 15010, 15020, 15030,
470 15040, 15050, 15060, 15070, 15080, 15090, 15100, 16000, 16010, 16020,
471 16030, 16040, 16050, 16060, 16070, 16080, 16090, 16100, 17000, 17010,
472 17020, 17030, 17040, 17050, 17060, 17070, 17080, 17090, 17100, 18000,
473 18010, 18020, 18030, 18040, 18050, 18060, 18070, 18080, 18090, 18100,