MilesLib: run the 40250 sound sources verbatim over an AIL software mixer
Copy SoundBase/SoundData/SoundInstance*/SoundManager*/Type from 40250 and implement the AIL_* calls they make in MilesAil.cpp (2D pan, 3D distance and listener pan, threaded stream decode, loop counts). The SDL host drains the mixer. CSoundManager is created/updated/destroyed where 40250 does it and the old AudioCommands bridge is removed. Port-map MilesLib 142/142 PORTED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d509f0a8b4
commit
11991d4d1f
@@ -132,8 +132,17 @@ void CPythonApplication::__UpdateCamera()
|
||||
if (0.0f != s_app.m_kCmrPos.m_fUpDir)
|
||||
pMainCamera->MoveVertical(s_app.m_kCmrPos.m_fUpDir);
|
||||
|
||||
// PORT: SkipRenderBuffering while dragging and the listener update of m_SoundManager follow here in
|
||||
// 40250; there is no render buffering and sound is not ported (2V4).
|
||||
// PORT: SkipRenderBuffering while dragging follows here in 40250; there is no render buffering.
|
||||
|
||||
//////////////////////
|
||||
// Sound Setting
|
||||
// PORT: m_SoundManager is the CSoundManager singleton (PythonBoot's g_sound_manager).
|
||||
const D3DXVECTOR3 & c_rv3CameraDirection = pMainCamera->GetView();
|
||||
const D3DXVECTOR3 & c_rv3CameraUp = pMainCamera->GetUp();
|
||||
CSoundManager::Instance().SetPosition(s_app.m_v3CenterPosition.x, s_app.m_v3CenterPosition.y, s_app.m_v3CenterPosition.z); // Listener - character position
|
||||
CSoundManager::Instance().SetDirection(c_rv3CameraDirection.x, c_rv3CameraDirection.y, c_rv3CameraDirection.z, c_rv3CameraUp.x, c_rv3CameraUp.y, c_rv3CameraUp.z);
|
||||
CSoundManager::Instance().Update();
|
||||
//////////////////////
|
||||
}
|
||||
|
||||
void CPythonApplication::SetViewDirCameraSpeed(float fSpeed)
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// Platform implementation of the pack bootstrap from 40250 UserInterface/UserInterface.cpp. PackInitialize is the 40250
|
||||
// function with three platform differences:
|
||||
// function with two platform differences:
|
||||
// - pack names in Index are matched to the on-disk .eix/.epk case-insensitively ("Etc" is ETC.eix on NTFS, and
|
||||
// CEterPack::CreateIndexFile fopens the name as given), so the registered dbname carries the on-disk spelling;
|
||||
// - no LogBoxf (a Win32 message box), only the TraceError next to it;
|
||||
// - CTextFileLoader::SetCacheMode and CSoundData::SetPackMode are not called: EterLib/TextFileLoader and MilesLib
|
||||
// are not ported yet, and neither affects which files the pack manager registers or returns.
|
||||
// - no LogBoxf (a Win32 message box), only the TraceError next to it.
|
||||
// Built as in the Distribute configuration (_DISTRIBUTE): pack first.
|
||||
#include "EterBase/StdAfx.h"
|
||||
#include "EterBase/FileLoader.h"
|
||||
@@ -12,6 +10,8 @@
|
||||
#include "EterBase/Debug.h"
|
||||
#include "EterBase/lzo.h"
|
||||
#include "EterPack/EterPackManager.h"
|
||||
#include "EterLib/TextFileLoader.h"
|
||||
#include "MilesLib/SoundData.h"
|
||||
#include "UserInterface.h"
|
||||
|
||||
#include <map>
|
||||
@@ -147,9 +147,12 @@ bool PackInitialize(const char * c_pszFolder)
|
||||
return false;
|
||||
}
|
||||
|
||||
CTextFileLoader::SetCacheMode();
|
||||
CEterPackManager::Instance().SetCacheMode();
|
||||
CEterPackManager::Instance().SetSearchMode(bPackFirst);
|
||||
|
||||
CSoundData::SetPackMode(); // Miles file callbacks
|
||||
|
||||
const std::map<std::string, std::string> names = list_folder(stFolder);
|
||||
|
||||
std::string strPackName, strTexCachePackName;
|
||||
|
||||
Reference in New Issue
Block a user