mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 18:51:16 +00:00
push code
This commit is contained in:
parent
2c018c117c
commit
86f1ed90cc
@ -18,7 +18,7 @@ LegoSoundManager::~LegoSoundManager()
|
|||||||
void LegoSoundManager::Init()
|
void LegoSoundManager::Init()
|
||||||
{
|
{
|
||||||
m_unk0x40 = 0;
|
m_unk0x40 = 0;
|
||||||
m_unk0x3c = 0;
|
m_listener = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100299b0
|
// STUB: LEGO1 0x100299b0
|
||||||
@ -26,10 +26,43 @@ void LegoSoundManager::Destroy(MxBool p_fromDestructor)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100299f0
|
// FUNCTION: LEGO1 0x100299f0
|
||||||
MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
MxResult LegoSoundManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||||
{
|
{
|
||||||
return FAILURE;
|
MxBool locked = FALSE;
|
||||||
|
MxResult result = FAILURE;
|
||||||
|
if (MxSoundManager::Create(10, FALSE) == SUCCESS) {
|
||||||
|
m_criticalSection.Enter();
|
||||||
|
locked = TRUE;
|
||||||
|
if (MxOmni::IsSound3D()) {
|
||||||
|
if (m_dsBuffer->QueryInterface(IID_IDirectSound3DListener, (LPVOID*) &m_listener) == S_OK) {
|
||||||
|
MxOmni* omni = MxOmni::GetInstance();
|
||||||
|
IDirectSound* sound;
|
||||||
|
if (omni && omni->GetSoundManager() && (sound = omni->GetSoundManager()->GetDirectSound())) {
|
||||||
|
DSCAPS caps;
|
||||||
|
memset(&caps, 0, sizeof(DSCAPS));
|
||||||
|
caps.dwSize = sizeof(DSCAPS);
|
||||||
|
|
||||||
|
if (sound->GetCaps(&caps) == S_OK && caps.dwMaxHw3DAllBuffers == 0) {
|
||||||
|
m_listener->SetDistanceFactor(0.026315790f, 0);
|
||||||
|
m_listener->SetRolloffFactor(10, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// todo
|
||||||
|
result = SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result != SUCCESS) {
|
||||||
|
Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (locked) {
|
||||||
|
m_criticalSection.Leave();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1002a390
|
// FUNCTION: LEGO1 0x1002a390
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class LegoSoundManager : public MxSoundManager {
|
|||||||
void Init();
|
void Init();
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
|
|
||||||
undefined4 m_unk0x3c;
|
IDirectSound3DListener* m_listener;
|
||||||
undefined4 m_unk0x40;
|
undefined4 m_unk0x40;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class MxSoundManager : public MxAudioManager {
|
|||||||
|
|
||||||
MxS32 FUN_100aecf0(MxU32 p_undefined);
|
MxS32 FUN_100aecf0(MxU32 p_undefined);
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
void Init();
|
void Init();
|
||||||
void Destroy(MxBool p_fromDestructor);
|
void Destroy(MxBool p_fromDestructor);
|
||||||
MxPresenter* FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_objectId);
|
MxPresenter* FUN_100aebd0(const MxAtomId& p_atomId, MxU32 p_objectId);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user