World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
AudioPlayer.cpp
См. документацию.
2 
3 #include <algorithm>
4 #include <map>
5 #include <sstream>
6 #include <string>
7 #include <vector>
8 
9 #include "Engine/Party.h"
10 #include "Engine/ZlibWrapper.h"
11 
12 #include "Engine/Objects/Actor.h"
13 
14 #include "Engine/Graphics/Indoor.h"
16 
18 
22 
23 std::array<float, 10> pSoundVolumeLevels = {
24  {0.0000000f, 0.1099999f, 0.2199999f, 0.3300000f, 0.4399999f, 0.5500000f,
25  0.6600000f, 0.7699999f, 0.8799999f, 0.9700000f}};
26 
27 enum SOUND_TYPE {
33 };
34 
35 enum SOUND_FLAG {
38 };
39 
40 class SoundInfo {
41  public:
42  bool Is3D() { return ((uFlags & SOUND_FLAG_3D) == SOUND_FLAG_3D); }
43 
44  public:
51 };
52 
53 std::map<uint32_t, SoundInfo> mapSounds;
54 
55 #pragma pack(push, 1)
56 struct SoundDesc_mm6 {
62 };
63 #pragma pack(pop)
64 
65 #pragma pack(push, 1)
66 struct SoundDesc : public SoundDesc_mm6 {
69 };
70 #pragma pack(pop)
71 
73 
74 void SoundList::FromFile(void *data_mm6, void *data_mm7, void *data_mm8) {
75  static_assert(sizeof(SoundDesc_mm6) == 112, "Wrong type size");
76  static_assert(sizeof(SoundDesc) == 120, "Wrong type size");
77 
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;
81 
82  unsigned int sNumSounds = num_mm6_sounds + num_mm7_sounds + num_mm8_sounds;
83  assert(sNumSounds);
84  assert(!num_mm8_sounds);
85 
86  SoundDesc *sounds = (SoundDesc *)((char *)data_mm7 + 4);
87  for (size_t i = 0; i < num_mm7_sounds; i++) {
88  SoundInfo si;
89  si.sName = (char *)sounds[i].pSoundName;
90  si.uSoundID = sounds[i].uSoundID;
91  si.eType = (SOUND_TYPE)sounds[i].eType;
92  si.uFlags = sounds[i].uFlags;
93  mapSounds[si.uSoundID] = si;
94  }
95 
96  SoundDesc_mm6 *sounds_mm6 = (SoundDesc_mm6 *)((char *)data_mm6 + 4);
97  for (size_t i = 0; i < num_mm6_sounds; i++) {
98  SoundInfo si;
99  si.sName = (char *)sounds_mm6[i].pSoundName;
100  si.uSoundID = sounds_mm6[i].uSoundID;
101  si.eType = (SOUND_TYPE)sounds_mm6[i].eType;
102  si.uFlags = sounds_mm6[i].uFlags;
103  mapSounds[si.uSoundID] = si;
104  }
105 }
106 
108 
110  if (currentMusicTrack == eTrack) {
111  return;
112  }
113 
114  if (!engine->config->NoSound() && bPlayerReady && engine->config->music_level > 0) {
115  if (pCurrentMusicTrack) {
116  pCurrentMusicTrack->Stop();
117  }
118  currentMusicTrack = -1;
119 
120  String file_path = StringPrintf("Music\\%d.mp3", eTrack);
121  file_path = MakeDataPath(file_path.c_str());
122 
123  if (!FileExists(file_path.c_str())) {
124  logger->Warning(L"Music\\%d.mp3 not found", eTrack);
125  return;
126  }
127 
129  if (pCurrentMusicTrack) {
130  currentMusicTrack = eTrack;
131  pCurrentMusicTrack->SetVolume(
132  pSoundVolumeLevels[engine->config->music_level]);
133  pCurrentMusicTrack->Play();
134  }
135  }
136 }
137 
139 
141  if (!pCurrentMusicTrack) {
142  return;
143  }
144 
145  pCurrentMusicTrack->Stop();
146  pCurrentMusicTrack = nullptr;
147 }
148 
150  if (!pCurrentMusicTrack) {
151  return;
152  }
153 
154  pCurrentMusicTrack->Pause();
155 }
156 
158  if (!pCurrentMusicTrack) {
159  return;
160  }
161 
162  pCurrentMusicTrack->Resume();
163 }
164 
166  if (!pCurrentMusicTrack) {
167  return;
168  }
169 
170  vol = std::max(0, vol);
171  vol = std::min(9, vol);
172  pCurrentMusicTrack->SetVolume(pSoundVolumeLevels[vol] * 2.f);
173 }
174 
176  if (!pCurrentMusicTrack) {
177  return 0.f;
178  }
179 
180  return pCurrentMusicTrack->GetVolume();
181 }
182 
184  level = std::max(0, level);
185  level = std::min(9, level);
187 }
188 
189 void AudioPlayer::StopAll(int sample_id) {
190  if (!bPlayerReady) {
191  return;
192  }
193 }
194 
195 void AudioPlayer::PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int source_x, int source_y, int sound_data_id) {
196  if (!bPlayerReady || engine->config->sound_level < 1 ||
197  (eSoundID == SOUND_Invalid)) {
198  return;
199  }
200 
201  if (mapSounds.find(eSoundID) == mapSounds.end()) {
202  logger->Warning(L"SoundID = %u not found", eSoundID);
203  return;
204  }
205 
206  SoundInfo &si = mapSounds[eSoundID];
207 
208  if (!si.sample) {
210 
211  if (si.sName == "") { // enable this for bonus sound effects
212  // logger->Warning(L"Trying to load sound \"%i\"", eSoundID);
213  // buffer = LoadSound(int(eSoundID));
214  } else {
215  buffer = LoadSound(si.sName);
216  }
217 
218  if (!buffer) {
219  logger->Warning(L"Failed to load sound \"%S\"", si.sName.c_str());
220  return;
221  }
222 
224  if (!si.sample) {
225  return;
226  }
227  }
228 
229  if (!si.sample) {
230  return;
231  }
232 
233  si.sample->SetVolume(uMasterVolume);
234 
235 
236  if (pid == 0) { // generic sound like from UI
237  si.sample->Play();
238  return;
239  } else if (pid == -1) { // exclusive sounds - can override
240  si.sample->Stop();
241  si.sample->Play();
242  return;
243  } else if (pid < 0) { // exclusive sounds - no override (close chest)
244  si.sample->Play();
245  } else {
246  ObjectType object_type = PID_TYPE(pid);
247  unsigned int object_id = PID_ID(pid);
248  switch (object_type) {
249  case OBJECT_BLVDoor: {
251  assert((int)object_id < pIndoor->uNumDoors);
252 
254  pParty->vPosition.y / 50.f,
255  pParty->vPosition.z / 50.f);
256  si.sample->SetPosition(pIndoor->pDoors[object_id].pXOffsets[0] / 50.f,
257  pIndoor->pDoors[object_id].pYOffsets[0] / 50.f,
258  pIndoor->pDoors[object_id].pZOffsets[0] / 50.f, 500.f);
259 
260  si.sample->Play(false, true);
261 
262  return;
263  }
264  case OBJECT_Player: {
265  si.sample->SetVolume((2.f * pSoundVolumeLevels[engine->config->voice_level]));
266  if (object_id == 5) si.sample->Stop();
267  si.sample->Play();
268  return;
269  }
270  case OBJECT_Actor: {
271  assert(object_id < uNumActors);
272 
274  pParty->vPosition.y / 50.f,
275  pParty->vPosition.z / 50.f);
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);
279 
280  si.sample->Play(false, true);
281  return;
282  }
283  case OBJECT_Decoration: {
284  assert(object_id < pLevelDecorations.size());
285 
286  provider->SetListenerPosition((float)pParty->vPosition.x / 50.f,
287  (float)pParty->vPosition.y / 50.f,
288  (float)pParty->vPosition.z / 50.f);
289  si.sample->SetPosition((float)pLevelDecorations[object_id].vPosition.x / 50.f,
290  (float)pLevelDecorations[object_id].vPosition.y / 50.f,
291  (float)pLevelDecorations[object_id].vPosition.z / 50.f, 2000.f);
292 
293  si.sample->Play(true, true);
294  return;
295  }
296  case OBJECT_Item: {
297  assert(object_id < uNumSpriteObjects);
298 
300  pParty->vPosition.y / 50.f,
301  pParty->vPosition.z / 50.f);
302  si.sample->SetPosition(pSpriteObjects[object_id].vPosition.x / 50.f,
303  pSpriteObjects[object_id].vPosition.y / 50.f,
304  pSpriteObjects[object_id].vPosition.z / 50.f, 500.f);
305 
306  si.sample->Play(false, true);
307  return;
308  }
309  case OBJECT_BModel: {
310  si.sample->Play();
311  return;
312  }
313 
314  default:
315  assert(false);
316  }
317  }
318 }
319 
321 
323  float pitch = pi * (float)pParty->sRotationX / 1024.f;
324  float yaw = pi * (float)pParty->sRotationY / 1024.f;
325  provider->SetOrientation(yaw, pitch);
327  pParty->vPosition.y / 50.f,
328  pParty->vPosition.z / 50.f);
329 }
330 
331 void AudioPlayer::StopChannels(int uStartChannel, int uEndChannel) {}
332 
333 #pragma pack(push, 1)
335  char pSoundName[40];
339 };
340 #pragma pack(pop)
341 
343  static_assert(sizeof(SoundHeader_mm7) == 52, "Wrong type size");
344 
345  fAudioSnd.open(MakeDataPath("Sounds\\Audio.snd"), std::ios_base::binary);
346  if (!fAudioSnd.good()) {
347  logger->Warning(L"Can't open file: %s", L"Sounds\\Audio.snd");
348  return;
349  }
350 
351  uint32_t uNumSoundHeaders;
352  fAudioSnd.read((char*)&uNumSoundHeaders, 4);
353  for (uint32_t i = 0; i < uNumSoundHeaders; i++) {
354  SoundHeader_mm7 header_mm7;
355  fAudioSnd.read((char*)&header_mm7, sizeof(SoundHeader_mm7));
356  SoundHeader header;
357  header.uFileOffset = header_mm7.uFileOffset;
358  header.uCompressedSize = header_mm7.uCompressedSize;
359  header.uDecompressedSize = header_mm7.uDecompressedSize;
360  mSoundHeaders[MakeLower(header_mm7.pSoundName)] = header;
361  }
362 }
363 
365  currentMusicTrack = 0;
366  uMasterVolume = 127;
367 
368  pAudioPlayer->SetMasterVolume(engine->config->sound_level);
369  if (bPlayerReady) {
370  SetMusicVolume(engine->config->music_level);
371  }
372  LoadAudioSnd();
373 
374  bPlayerReady = true;
375 }
376 
378  unsigned int map_id = pMapStats->GetMapInfo(pCurrentMapName);
379  if (map_id) {
381  }
382 }
383 
384 
386  if (header == nullptr) {
387  return false;
388  }
389 
390  std::map<String, SoundHeader>::iterator it = mSoundHeaders.find(MakeLower(pName));
391  if (it == mSoundHeaders.end()) {
392  return false;
393  }
394 
395  *header = it->second;
396 
397  return true;
398 }
399 
400 
401 PMemBuffer AudioPlayer::LoadSound(int uSoundID) { // bit of a kludge (load sound by ID index) - plays some interesting files
402  SoundHeader header = { 0 };
403 
404  if (uSoundID < 0 || uSoundID > mSoundHeaders.size())
405  return nullptr;
406 
407  // iterate through to get sound by int ID
408  std::map<String, SoundHeader>::iterator it = mSoundHeaders.begin();
409  std::advance(it, uSoundID);
410 
411  if (it == mSoundHeaders.end()) {
412  return nullptr;
413  }
414 
415  header = it->second;
416 
417  // read into buffer
419 
420  fAudioSnd.seekg(header.uFileOffset, std::ios_base::beg);
421  if (header.uCompressedSize >= header.uDecompressedSize) {
422  header.uCompressedSize = header.uDecompressedSize;
423  if (header.uDecompressedSize) {
424  fAudioSnd.read((char*)buffer->GetData(), header.uDecompressedSize);
425  } else {
426  logger->Warning(L"Can't load sound file!");
427  }
428  } else {
429  PMemBuffer compressed = AllocMemBuffer(header.uCompressedSize);
430  fAudioSnd.read((char*)compressed->GetData(), header.uCompressedSize);
431  buffer = zlib::Uncompress(compressed);
432  }
433 
434  return buffer;
435 }
436 
437 
439  SoundHeader header = { 0 };
440  if (!FindSound(pSoundName, &header)) {
441  return nullptr;
442  }
443 
445 
446  fAudioSnd.seekg(header.uFileOffset, std::ios_base::beg);
447  if (header.uCompressedSize >= header.uDecompressedSize) {
448  header.uCompressedSize = header.uDecompressedSize;
449  if (header.uDecompressedSize) {
450  fAudioSnd.read((char*)buffer->GetData(), header.uDecompressedSize);
451  } else {
452  logger->Warning(L"Can't load sound file!");
453  }
454  } else {
455  PMemBuffer compressed = AllocMemBuffer(header.uCompressedSize);
456  fAudioSnd.read((char*)compressed->GetData(), header.uCompressedSize);
457  buffer = zlib::Uncompress(compressed);
458  }
459 
460  return buffer;
461 }
462 
463 std::array<uint16_t, 101> word_4EE088_sound_ids = {
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,
474  1}};
475 
476 void AudioPlayer::PlaySpellSound(unsigned int spell, unsigned int pid) {
477  PlaySound((SoundID)word_4EE088_sound_ids[spell], pid, 0, -1, 0, 0);
478 }
479 
AudioPlayer::FindSound
bool FindSound(const std::string &pName, struct AudioPlayer::SoundHeader *header)
Definition: AudioPlayer.cpp:385
SOUND_TYPE
SOUND_TYPE
Definition: AudioPlayer.cpp:27
uNumActors
size_t uNumActors
Definition: Actor.cpp:39
Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
SoundInfo::uSoundID
uint32_t uSoundID
Definition: AudioPlayer.cpp:47
AudioPlayer::SetMasterVolume
void SetMasterVolume(int level)
Definition: AudioPlayer.cpp:183
pLevelDecorations
std::array< LevelDecoration, 3000 > pLevelDecorations
Definition: Decoration.cpp:8
SoundDesc_mm6::uSoundID
uint32_t uSoundID
Definition: AudioPlayer.cpp:58
SOUND_TYPE_SWAP
@ SOUND_TYPE_SWAP
Definition: AudioPlayer.cpp:30
BLVDoor::pZOffsets
uint16_t * pZOffsets
Definition: Indoor.h:400
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
SoundHeader_mm7
Definition: AudioPlayer.cpp:334
AudioPlayer::SetMusicVolume
void SetMusicVolume(int music_level)
Definition: AudioPlayer.cpp:165
AudioPlayer::currentMusicTrack
int currentMusicTrack
Definition: AudioPlayer.h:148
SoundDesc_mm6::uFlags
uint32_t uFlags
Definition: AudioPlayer.cpp:60
pSpriteObjects
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
Definition: SpriteObject.cpp:34
SoundHeader_mm7::uCompressedSize
uint32_t uCompressedSize
Definition: AudioPlayer.cpp:337
OBJECT_Item
@ OBJECT_Item
Definition: Actor.h:66
OpenALSoundProvider::SetOrientation
void SetOrientation(float yaw, float pitch)
Definition: OpenALSoundProvider.cpp:97
Party::sRotationX
int sRotationX
Definition: Party.h:252
AudioPlayer::uMasterVolume
float uMasterVolume
Definition: AudioPlayer.h:149
AudioPlayer::SoundHeader::uDecompressedSize
size_t uDecompressedSize
Definition: AudioPlayer.h:116
MapStats::GetMapInfo
MAP_TYPE GetMapInfo(const String &Str2)
Definition: MapInfo.cpp:225
level
GLint level
Definition: SDL_opengl.h:1572
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
pSoundList
SoundList * pSoundList
Definition: AudioPlayer.cpp:21
AudioPlayer::MusicResume
void MusicResume()
Definition: AudioPlayer.cpp:157
SoundInfo::sName
std::string sName
Definition: AudioPlayer.cpp:45
SoundHeader_mm7::pSoundName
char pSoundName[40]
Definition: AudioPlayer.cpp:335
AudioPlayer::SoundHeader::uFileOffset
size_t uFileOffset
Definition: AudioPlayer.h:114
AudioPlayer::MusicPlayTrack
void MusicPlayTrack(enum MusicID eTrack)
Definition: AudioPlayer.cpp:109
SoundInfo::sample
PAudioSample sample
Definition: AudioPlayer.cpp:50
SoundInfo::uFlags
uint32_t uFlags
Definition: AudioPlayer.cpp:48
AudioPlayer::MusicStart
void MusicStart()
Definition: AudioPlayer.cpp:138
SOUND_FLAG
SOUND_FLAG
Definition: AudioPlayer.cpp:35
AudioPlayer::MusicGetVolume
float MusicGetVolume()
Definition: AudioPlayer.cpp:175
OBJECT_Decoration
@ OBJECT_Decoration
Definition: Actor.h:69
AudioPlayer::Initialize
void Initialize()
Definition: AudioPlayer.cpp:364
sLastTrackLengthMS
int sLastTrackLengthMS
Definition: AudioPlayer.cpp:19
FileExists
bool FileExists(const char *fname)
Definition: Engine.cpp:153
pIndoor
IndoorLocation * pIndoor
Definition: Indoor.cpp:49
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
AudioPlayer::StopAll
void StopAll(int sample_id)
Definition: AudioPlayer.cpp:189
OBJECT_Actor
@ OBJECT_Actor
Definition: Actor.h:67
AudioPlayer::SoundHeader::uCompressedSize
size_t uCompressedSize
Definition: AudioPlayer.h:115
AudioPlayer::LoadSound
PMemBuffer LoadSound(const std::string &pSoundName)
Definition: AudioPlayer.cpp:438
SoundInfo
Definition: AudioPlayer.cpp:40
Actor.h
AudioPlayer::MusicStop
void MusicStop()
Definition: AudioPlayer.cpp:140
buffer
EGLContext EGLenum EGLClientBuffer buffer
Definition: SDL_egl.h:952
SoundList::Initialize
void Initialize()
Definition: AudioPlayer.cpp:72
SoundDesc_mm6::pSoundName
uint8_t pSoundName[32]
Definition: AudioPlayer.cpp:57
AllocMemBuffer
PMemBuffer AllocMemBuffer(size_t size)
Definition: MemBuffer.cpp:20
CreateAudioTrack
PAudioTrack CreateAudioTrack(const std::string &file_path)
Definition: OpenALSoundProvider.cpp:657
pParty
Party * pParty
Definition: Party.cpp:30
provider
OpenALSoundProvider * provider
Definition: MediaPlayer.cpp:41
BLVDoor::pXOffsets
uint16_t * pXOffsets
Definition: Indoor.h:398
AudioPlayer::UpdateSounds
void UpdateSounds()
Definition: AudioPlayer.cpp:322
SOUND_TYPE_LOCK
@ SOUND_TYPE_LOCK
Definition: AudioPlayer.cpp:32
ZlibWrapper.h
OBJECT_BModel
@ OBJECT_BModel
Definition: Actor.h:70
AudioPlayer::PlaySpellSound
void PlaySpellSound(unsigned int spell, unsigned int pid)
Definition: AudioPlayer.cpp:476
SOUND_FLAG_LOCKED
@ SOUND_FLAG_LOCKED
Definition: AudioPlayer.cpp:36
SOUND_TYPE_UNKNOWN
@ SOUND_TYPE_UNKNOWN
Definition: AudioPlayer.cpp:31
PlayLevelMusic
void PlayLevelMusic()
Definition: AudioPlayer.cpp:377
SoundDesc::p3DSoundID
uint32_t p3DSoundID
Definition: AudioPlayer.cpp:67
binary
const GLuint GLenum const void * binary
Definition: SDL_opengl_glext.h:1871
Indoor.h
CreateAudioSample
PAudioSample CreateAudioSample(PMemBuffer buffer)
Definition: OpenALSoundProvider.cpp:873
PAudioSample
std::shared_ptr< IAudioSample > PAudioSample
Definition: Media.h:57
AudioPlayer::bPlayerReady
bool bPlayerReady
Definition: AudioPlayer.h:147
ObjectType
ObjectType
Definition: Actor.h:63
SoundList
Definition: AudioPlayer.h:157
Log::Warning
void Warning(const wchar_t *pFormat,...)
Definition: Log.cpp:28
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
Party.h
SOUND_TYPE_SYSTEM
@ SOUND_TYPE_SYSTEM
Definition: AudioPlayer.cpp:29
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
SoundDesc_mm6::pSoundDataID
uint32_t pSoundDataID[17]
Definition: AudioPlayer.cpp:61
SoundInfo::Is3D
bool Is3D()
Definition: AudioPlayer.cpp:42
pi
const float pi
Definition: VectorTypes.h:22
SOUND_Invalid
@ SOUND_Invalid
Definition: AudioPlayer.h:11
pCurrentMapName
String pCurrentMapName
Definition: mm7_data.cpp:712
SoundHeader_mm7::uFileOffset
uint32_t uFileOffset
Definition: AudioPlayer.cpp:336
SoundDesc_mm6
Definition: AudioPlayer.cpp:56
SoundDesc_mm6::eType
uint32_t eType
Definition: AudioPlayer.cpp:59
SoundDesc
Definition: AudioPlayer.cpp:66
LEVEL_Indoor
@ LEVEL_Indoor
Definition: Indoor.h:286
zlib::Uncompress
int Uncompress(void *dest, unsigned int *destLen, const void *source, unsigned int sourceLen)
Definition: ZlibWrapper.cpp:7
MusicID
MusicID
Definition: AudioPlayer.h:109
AudioPlayer.h
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
OpenALSoundProvider.h
mapSounds
std::map< uint32_t, SoundInfo > mapSounds
Definition: AudioPlayer.cpp:53
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
uNumSpriteObjects
size_t uNumSpriteObjects
Definition: SpriteObject.cpp:33
SoundInfo::eType
SOUND_TYPE eType
Definition: AudioPlayer.cpp:46
MapInfo::uRedbookTrackID
uint8_t uRedbookTrackID
Definition: MapInfo.h:69
word_4EE088_sound_ids
std::array< uint16_t, 101 > word_4EE088_sound_ids
Definition: AudioPlayer.cpp:463
SoundHeader_mm7::uDecompressedSize
uint32_t uDecompressedSize
Definition: AudioPlayer.cpp:338
SoundInfo::buffer
PMemBuffer buffer
Definition: AudioPlayer.cpp:49
BLVDoor::pYOffsets
uint16_t * pYOffsets
Definition: Indoor.h:399
MakeDataPath
std::string MakeDataPath(const char *file_rel_path)
Definition: Engine.cpp:126
OpenALSoundProvider
Definition: OpenALSoundProvider.h:12
OBJECT_BLVDoor
@ OBJECT_BLVDoor
Definition: Actor.h:65
AudioPlayer::pCurrentMusicTrack
PAudioTrack pCurrentMusicTrack
Definition: AudioPlayer.h:150
AudioPlayer
Definition: AudioPlayer.h:111
Decoration.h
AudioPlayer::SoundHeader
Definition: AudioPlayer.h:113
SoundID
SoundID
Definition: AudioPlayer.h:10
MakeLower
String MakeLower(const String &text)
Definition: Strings.cpp:43
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
AudioPlayer::MessWithChannels
void MessWithChannels()
Definition: AudioPlayer.cpp:320
AudioPlayer::LoadAudioSnd
void LoadAudioSnd()
Definition: AudioPlayer.cpp:342
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
string
GLsizei const GLchar *const * string
Definition: SDL_opengl_glext.h:691
logger
Log * logger
Definition: IocContainer.cpp:47
AudioPlayer::fAudioSnd
std::ifstream fAudioSnd
Definition: AudioPlayer.h:151
AudioPlayer::MusicPause
void MusicPause()
Definition: AudioPlayer.cpp:149
OpenALSoundProvider::SetListenerPosition
void SetListenerPosition(float x, float y, float z)
Definition: OpenALSoundProvider.cpp:93
PMemBuffer
std::shared_ptr< IMemBuffer > PMemBuffer
Definition: MemBuffer.h:13
SOUND_TYPE_LEVEL
@ SOUND_TYPE_LEVEL
Definition: AudioPlayer.cpp:28
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
uint32_t
unsigned __int32 uint32_t
Definition: SDL_config.h:39
Party::sRotationY
int sRotationY
Definition: Party.h:251
SoundDesc::bDecompressed
uint32_t bDecompressed
Definition: AudioPlayer.cpp:68
IndoorLocation::pDoors
struct BLVDoor * pDoors
Definition: Indoor.h:638
String
std::string String
Definition: Strings.h:10
pSoundVolumeLevels
std::array< float, 10 > pSoundVolumeLevels
Definition: AudioPlayer.cpp:23
SoundList::FromFile
void FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
Definition: AudioPlayer.cpp:74
AudioPlayer::mSoundHeaders
std::map< String, SoundHeader > mSoundHeaders
Definition: AudioPlayer.h:152
SOUND_FLAG_3D
@ SOUND_FLAG_3D
Definition: AudioPlayer.cpp:37