mirror of
https://github.com/whoahq/whoa.git
synced 2026-05-02 11:02:00 +03:00
Merge branch 'master' into feat-event-implement-sync-key-state
This commit is contained in:
commit
a0cbf743e6
@ -27,6 +27,7 @@ IncludeCategories:
|
||||
- Regex: ".*"
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
IndentAccessModifiers: true
|
||||
IndentGotoLabels: false
|
||||
IndentWidth: 4
|
||||
MaxEmptyLinesToKeep: 1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.1...3.5)
|
||||
|
||||
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR
|
||||
@ -24,8 +24,6 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
include(lib/system/cmake/system.cmake)
|
||||
|
||||
# Some templates abuse offsetof
|
||||
@ -65,6 +63,17 @@ if(WHOA_SYSTEM_LINUX OR WHOA_SYSTEM_MAC)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
# Library search paths
|
||||
if(WHOA_SYSTEM_MAC)
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set(CMAKE_INSTALL_RPATH "@executable_path")
|
||||
elseif(WHOA_SYSTEM_LINUX)
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
endif()
|
||||
|
||||
add_subdirectory(lib)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
|
||||
2
lib/bc
2
lib/bc
@ -1 +1 @@
|
||||
Subproject commit 6cff259dcac37698fd0c770d806646be13402b43
|
||||
Subproject commit 5a8d14766308be0746368d169b3b1ee834d91e4a
|
||||
@ -1 +1 @@
|
||||
Subproject commit 0a260b7bebe28bbc5998068f6f14e459a869de16
|
||||
Subproject commit 92a540a549c6882b6ebd87593ed97174865100c9
|
||||
@ -1 +1 @@
|
||||
Subproject commit f10552acea5fbfaa7f03075eddd46a92132bf732
|
||||
Subproject commit a96d1270d4a1f5d6fa6756c30696a13f87b08a0a
|
||||
@ -1 +1 @@
|
||||
Subproject commit f886ab5bc35b2e0d968baa8dec3faaccf385fbc3
|
||||
Subproject commit 63f4f710e47d37e82930d4a1750c7d3b36b700ec
|
||||
@ -1 +1 @@
|
||||
Subproject commit 036c986cd455179873baeb75e81fd3edaca4abbe
|
||||
Subproject commit f191151f1694ae471396c0cad6b89811fb6fa6ca
|
||||
@ -1,9 +1,10 @@
|
||||
#include "client/Client.hpp"
|
||||
#include "async/AsyncFile.hpp"
|
||||
#include "client/ClientHandlers.hpp"
|
||||
#include "client/ClientServices.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
#include "console/Client.hpp"
|
||||
#include "console/Device.hpp"
|
||||
#include "console/Initialize.hpp"
|
||||
#include "console/Screen.hpp"
|
||||
#include "db/Db.hpp"
|
||||
#include "glue/CGlueMgr.hpp"
|
||||
@ -30,6 +31,33 @@ void BaseInitializeGlobal() {
|
||||
PropInitialize();
|
||||
}
|
||||
|
||||
int32_t ClientIdle(const void* data, void* param) {
|
||||
// TODO
|
||||
// ClientGameTimeTickHandler(data, param);
|
||||
// Player_C_ZoneUpdateHandler(data, param);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ClientInitializeGame(uint32_t mapId, C3Vector position) {
|
||||
// TODO
|
||||
|
||||
EventRegister(EVENT_ID_IDLE, ClientIdle);
|
||||
|
||||
// TODO
|
||||
|
||||
ClientServices::SetMessageHandler(SMSG_NOTIFICATION, NotifyHandler, nullptr);
|
||||
ClientServices::SetMessageHandler(SMSG_PLAYED_TIME, PlayedTimeHandler, nullptr);
|
||||
ClientServices::SetMessageHandler(SMSG_NEW_WORLD, NewWorldHandler, nullptr);
|
||||
ClientServices::SetMessageHandler(SMSG_TRANSFER_PENDING, TransferPendingHandler, nullptr);
|
||||
ClientServices::SetMessageHandler(SMSG_TRANSFER_ABORTED, TransferAbortedHandler, nullptr);
|
||||
ClientServices::SetMessageHandler(SMSG_LOGIN_VERIFY_WORLD, LoginVerifyWorldHandler, nullptr);
|
||||
|
||||
ClientServices::SetMessageHandler(SMSG_KICK_REASON, CGlueMgr::OnKickReasonMsg, nullptr);
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void ClientMiscInitialize() {
|
||||
// TODO
|
||||
|
||||
@ -39,7 +67,7 @@ void ClientMiscInitialize() {
|
||||
0,
|
||||
"",
|
||||
nullptr,
|
||||
4,
|
||||
GAME,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -135,6 +163,24 @@ int32_t InitializeEngineCallback(const void* a1, void* a2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// TODO name this (maybe something like InitializeLocale?)
|
||||
void Sub405DD0() {
|
||||
// TODO
|
||||
|
||||
// TODO get this from the soupy mess of locale checks above
|
||||
auto locale = "enUS";
|
||||
|
||||
ClientServices::InitLoginServerCVars(1, locale);
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
bool LocaleChangedCallback(CVar* var, const char* oldValue, const char* value, void* arg) {
|
||||
// TODO
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int32_t InitializeGlobal() {
|
||||
// TODO
|
||||
|
||||
@ -175,13 +221,33 @@ int32_t InitializeGlobal() {
|
||||
|
||||
// CVar::Register("dbCompress", "Database compression", 0, "-1", 0, 5, 0, 0, 0);
|
||||
|
||||
// v2 = CVar::Register("locale", "Set the game locale", 0, "****", &LocaleChangedCallback, 5, 0, 0, 0);
|
||||
auto localeVar = CVar::Register(
|
||||
"locale",
|
||||
"Set the game locale",
|
||||
0x0,
|
||||
"****",
|
||||
&LocaleChangedCallback,
|
||||
DEFAULT,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
|
||||
// if (!SStrCmp(v2->m_stringValue.m_str, "****", 0x7FFFFFFFu)) {
|
||||
// CVar::Set(v2, "enUS", 1, 0, 0, 1);
|
||||
// }
|
||||
if (SStrCmp(localeVar->GetString(), "****") == 0) {
|
||||
localeVar->Set("enUS", true, false, false, true);
|
||||
}
|
||||
|
||||
// CVar::Register("useEnglishAudio", "override the locale and use English audio", 0, "0", 0, 5, 0, 0, 0);
|
||||
CVar::Register(
|
||||
"useEnglishAudio",
|
||||
"override the locale and use English audio",
|
||||
0x0,
|
||||
"0",
|
||||
nullptr,
|
||||
DEFAULT,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
|
||||
// if (sub_422140()) {
|
||||
// sub_4036B0(v24, 0, a2, (int)v2, (char)v24);
|
||||
@ -199,7 +265,7 @@ int32_t InitializeGlobal() {
|
||||
|
||||
// sub_423D70();
|
||||
|
||||
// sub_405DD0();
|
||||
Sub405DD0();
|
||||
|
||||
// CVar* v3 = CVar::Register(
|
||||
// "processAffinityMask",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define CLIENT_CLIENT_HPP
|
||||
|
||||
#include "event/Event.hpp"
|
||||
#include <cstdint>
|
||||
#include <tempest/Vector.hpp>
|
||||
|
||||
class CVar;
|
||||
|
||||
@ -11,6 +11,8 @@ namespace Client {
|
||||
extern HEVENTCONTEXT g_clientEventContext;
|
||||
}
|
||||
|
||||
void ClientInitializeGame(uint32_t mapId, C3Vector position);
|
||||
|
||||
void ClientPostClose(int32_t a1);
|
||||
|
||||
void CommonMain();
|
||||
|
||||
37
src/client/ClientHandlers.cpp
Normal file
37
src/client/ClientHandlers.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
#include "client/ClientHandlers.hpp"
|
||||
|
||||
int32_t LoginVerifyWorldHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t NewWorldHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t NotifyHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t PlayedTimeHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t TransferAbortedHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t TransferPendingHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
21
src/client/ClientHandlers.hpp
Normal file
21
src/client/ClientHandlers.hpp
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef CLIENT_CLIENT_HANDLERS_HPP
|
||||
#define CLIENT_CLIENT_HANDLERS_HPP
|
||||
|
||||
#include "net/Types.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
class CDataStore;
|
||||
|
||||
int32_t LoginVerifyWorldHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||
|
||||
int32_t NewWorldHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||
|
||||
int32_t NotifyHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||
|
||||
int32_t PlayedTimeHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||
|
||||
int32_t TransferAbortedHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||
|
||||
int32_t TransferPendingHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||
|
||||
#endif
|
||||
@ -1,9 +1,10 @@
|
||||
#include "client/ClientServices.hpp"
|
||||
#include "client/ClientRealmResponseAdapter.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
#include "console/Command.hpp"
|
||||
#include "glue/CGlueMgr.hpp"
|
||||
#include "net/Connection.hpp"
|
||||
#include "net/Login.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
#include <storm/Memory.hpp>
|
||||
#include <storm/String.hpp>
|
||||
#include <new>
|
||||
@ -13,12 +14,17 @@ ClientConnection* g_clientConnection;
|
||||
char ClientServices::s_accountName[1280];
|
||||
RealmResponse* ClientServices::s_clientRealmResponse;
|
||||
ClientConnection* ClientServices::s_currentConnection;
|
||||
CVar* ClientServices::s_darkPortalVar;
|
||||
CVar* ClientServices::s_decorateAccountName;
|
||||
ClientServices* ClientServices::s_instance;
|
||||
Login* ClientServices::s_loginObj;
|
||||
bool ClientServices::s_newLogin;
|
||||
CVar* ClientServices::s_realmListVar;
|
||||
CVar* ClientServices::s_realmListBNVar;
|
||||
CVar* ClientServices::s_realmNameVar;
|
||||
REALM_INFO ClientServices::s_selectRealmInfo;
|
||||
bool ClientServices::s_selectRealmInfoValid;
|
||||
CVar* ClientServices::s_serverAlertVar;
|
||||
|
||||
void ClientServices::ConnectToSelectedServer() {
|
||||
if (!ClientServices::s_selectRealmInfoValid && !ClientServices::SetSelectedRealmInfo(0)) {
|
||||
@ -46,6 +52,18 @@ ClientConnection* ClientServices::Connection() {
|
||||
return ClientServices::s_currentConnection;
|
||||
}
|
||||
|
||||
const char* ClientServices::GetCurrentLoginPortal() {
|
||||
return ClientServices::s_loginObj->GetLoginServerType() == 1
|
||||
? ClientServices::s_darkPortalVar->GetString()
|
||||
: "";
|
||||
}
|
||||
|
||||
const char* ClientServices::GetCurrentLoginServer() {
|
||||
return ClientServices::s_loginObj->GetLoginServerType() == 1
|
||||
? ClientServices::s_realmListBNVar->GetString()
|
||||
: ClientServices::s_realmListVar->GetString();
|
||||
}
|
||||
|
||||
ClientServices* ClientServices::GetInstance() {
|
||||
if (ClientServices::s_instance) {
|
||||
return ClientServices::s_instance;
|
||||
@ -74,7 +92,7 @@ const char* ClientServices::GetSelectedRealmName() {
|
||||
0,
|
||||
"",
|
||||
nullptr,
|
||||
6,
|
||||
NET,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -104,6 +122,99 @@ void ClientServices::Initialize() {
|
||||
// TODO ConsoleCommandRegister("logout", &Sub6B2030, 5, nullptr);
|
||||
}
|
||||
|
||||
void ClientServices::InitLoginServerCVars(int32_t force, const char* locale) {
|
||||
if (!ClientServices::s_realmListBNVar || !ClientServices::s_realmListVar || force) {
|
||||
ClientServices::s_decorateAccountName = CVar::Register(
|
||||
"decorateAccountName",
|
||||
"",
|
||||
0x0,
|
||||
"0",
|
||||
nullptr,
|
||||
NET,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
char dataPath[STORM_MAX_PATH];
|
||||
if (locale && *locale) {
|
||||
SStrPrintf(dataPath, sizeof(dataPath), "data\\%s\\", locale);
|
||||
} else {
|
||||
dataPath[0] = '\0';
|
||||
}
|
||||
|
||||
if (!ClientServices::s_realmListBNVar || force) {
|
||||
ClientServices::s_realmListBNVar = CVar::Register(
|
||||
"realmListbn",
|
||||
"Address of Battle.net server",
|
||||
0x0,
|
||||
"",
|
||||
nullptr,
|
||||
NET,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
|
||||
char realmListPath[STORM_MAX_PATH];
|
||||
SStrPrintf(realmListPath, sizeof(realmListPath), "%srealmlistbn.wtf", dataPath);
|
||||
|
||||
if (!CVar::Load(realmListPath)) {
|
||||
CVar::Load("realmlistbn.wtf");
|
||||
}
|
||||
}
|
||||
|
||||
if (!ClientServices::s_darkPortalVar || force) {
|
||||
ClientServices::s_darkPortalVar = CVar::Register(
|
||||
"portal",
|
||||
"Name of Battle.net portal to use",
|
||||
0x0,
|
||||
"",
|
||||
nullptr,
|
||||
NET,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
if (!ClientServices::s_serverAlertVar || force) {
|
||||
ClientServices::s_serverAlertVar = CVar::Register(
|
||||
"serverAlert",
|
||||
"Get the glue-string tag for the URL",
|
||||
0x0,
|
||||
"SERVER_ALERT_URL",
|
||||
nullptr,
|
||||
NET,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
if (!ClientServices::s_realmListVar || force) {
|
||||
ClientServices::s_realmListVar = CVar::Register(
|
||||
"realmList",
|
||||
"Address of realm list server",
|
||||
0x0,
|
||||
"us.logon.worldofwarcraft.com:3724",
|
||||
nullptr,
|
||||
NET,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
|
||||
char realmListPath[STORM_MAX_PATH];
|
||||
SStrPrintf(realmListPath, sizeof(realmListPath), "%srealmlist.wtf", dataPath);
|
||||
|
||||
if (!CVar::Load(realmListPath)) {
|
||||
CVar::Load("realmlist.wtf");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Login* ClientServices::LoginConnection() {
|
||||
return ClientServices::s_loginObj;
|
||||
}
|
||||
@ -138,9 +249,10 @@ void ClientServices::Logon(const char* accountName, const char* password) {
|
||||
|
||||
ClientServices::s_loginObj->SetLogonCreds(accountName, password);
|
||||
|
||||
// TODO
|
||||
|
||||
ClientServices::s_loginObj->Logon(nullptr, nullptr);
|
||||
ClientServices::s_loginObj->Logon(
|
||||
ClientServices::GetCurrentLoginServer(),
|
||||
ClientServices::GetCurrentLoginPortal()
|
||||
);
|
||||
}
|
||||
|
||||
void ClientServices::SelectRealm(const char* realmName) {
|
||||
@ -154,6 +266,13 @@ void ClientServices::SetAccountName(const char* accountName) {
|
||||
SStrCopy(ClientServices::s_accountName, accountName, sizeof(ClientServices::s_accountName));
|
||||
}
|
||||
|
||||
void ClientServices::SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param) {
|
||||
STORM_ASSERT(handler);
|
||||
STORM_ASSERT(ClientServices::s_currentConnection);
|
||||
|
||||
ClientServices::s_currentConnection->SetMessageHandler(msgId, handler, param);
|
||||
}
|
||||
|
||||
int32_t ClientServices::SetSelectedRealmInfo(int32_t a1) {
|
||||
auto instance = ClientServices::GetInstance();
|
||||
|
||||
@ -175,6 +294,12 @@ int32_t ClientServices::SetSelectedRealmInfo(int32_t a1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* ClientServices::GetLoginServer() {
|
||||
return ClientServices::s_loginObj->GetLoginServerType() == 1
|
||||
? ClientServices::s_realmListBNVar->GetString()
|
||||
: ClientServices::s_realmListVar->GetString();
|
||||
}
|
||||
|
||||
int32_t ClientServices::GetLoginServerType() {
|
||||
if (!ClientServices::LoginConnection()) {
|
||||
return 0;
|
||||
@ -183,6 +308,10 @@ int32_t ClientServices::GetLoginServerType() {
|
||||
return ClientServices::LoginConnection()->GetLoginServerType();
|
||||
}
|
||||
|
||||
void ClientServices::JoinRealmResult(uint32_t addr, int32_t port, int32_t a3, int32_t a4) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void ClientServices::LoginServerStatus(LOGIN_STATE state, LOGIN_RESULT result, const char* addrStr, const char* stateStr, const char* resultStr, uint8_t flags) {
|
||||
CGlueMgr::SetLoginStateAndResult(state, result, addrStr, stateStr, resultStr, flags);
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef CLIENT_CLIENT_SERVICES_HPP
|
||||
#define CLIENT_CLIENT_SERVICES_HPP
|
||||
|
||||
#include "net/connection/NetClient.hpp"
|
||||
#include "net/login/LoginResponse.hpp"
|
||||
|
||||
class ClientConnection;
|
||||
@ -14,29 +15,40 @@ class ClientServices : public LoginResponse {
|
||||
static char s_accountName[1280];
|
||||
static RealmResponse* s_clientRealmResponse;
|
||||
static ClientConnection* s_currentConnection;
|
||||
static CVar* s_darkPortalVar;
|
||||
static CVar* s_decorateAccountName;
|
||||
static ClientServices* s_instance;
|
||||
static Login* s_loginObj;
|
||||
static bool s_newLogin;
|
||||
static CVar* s_realmListVar;
|
||||
static CVar* s_realmListBNVar;
|
||||
static CVar* s_realmNameVar;
|
||||
static REALM_INFO s_selectRealmInfo;
|
||||
static bool s_selectRealmInfoValid;
|
||||
static CVar* s_serverAlertVar;
|
||||
|
||||
// Static functions
|
||||
static void ConnectToSelectedServer();
|
||||
static ClientConnection* Connection();
|
||||
static const char* GetCurrentLoginPortal();
|
||||
static const char* GetCurrentLoginServer();
|
||||
static ClientServices* GetInstance();
|
||||
static REALM_INFO* GetRealmInfoByIndex(int32_t index);
|
||||
static const char* GetSelectedRealmName();
|
||||
static const REALM_INFO* GetSelectedRealm();
|
||||
static void Initialize();
|
||||
static void InitLoginServerCVars(int32_t force, const char* locale);
|
||||
static Login* LoginConnection();
|
||||
static void Logon(const char* accountName, const char* password);
|
||||
static void SelectRealm(const char* realmName);
|
||||
static void SetAccountName(const char* accountName);
|
||||
static void SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param);
|
||||
static int32_t SetSelectedRealmInfo(int32_t a1);
|
||||
|
||||
// Virtual member functions
|
||||
virtual const char* GetLoginServer();
|
||||
virtual int32_t GetLoginServerType();
|
||||
virtual void JoinRealmResult(uint32_t addr, int32_t port, int32_t a3, int32_t a4);
|
||||
virtual void LoginServerStatus(LOGIN_STATE state, LOGIN_RESULT result, const char* addrStr, const char* stateStr, const char* resultStr, uint8_t flags);
|
||||
virtual void RealmEnumCallback(uint32_t a2);
|
||||
};
|
||||
|
||||
5
src/client/Util.cpp
Normal file
5
src/client/Util.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "client/Util.hpp"
|
||||
|
||||
void ChecksumExecutables(const uint8_t* challenge, uint32_t challengeLength, uint8_t* checksum) {
|
||||
// TODO
|
||||
}
|
||||
8
src/client/Util.hpp
Normal file
8
src/client/Util.hpp
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef CLIENT_UTIL_HPP
|
||||
#define CLIENT_UTIL_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
void ChecksumExecutables(const uint8_t* challenge, uint32_t challengeLength, uint8_t* checksum);
|
||||
|
||||
#endif
|
||||
@ -1,15 +1,51 @@
|
||||
#include "console/CVar.hpp"
|
||||
#include "console/Command.hpp"
|
||||
#include "console/CVarHandlers.hpp"
|
||||
#include <storm/String.hpp>
|
||||
|
||||
bool CVar::m_initialized;
|
||||
bool CVar::m_needsSave;
|
||||
TSHashTable<CVar, HASHKEY_STRI> CVar::s_registeredCVars;
|
||||
|
||||
void CVar::Initialize() {
|
||||
CVar::m_initialized = true;
|
||||
|
||||
char basePath[STORM_MAX_PATH];
|
||||
// TODO
|
||||
// SFile::GetBasePath(basePath, 260);
|
||||
// SStrPrintf(basePath, sizeof(basePath), "%s%s\\", basePath, "WTF");
|
||||
// s_CreatePathDirectories(basePath);
|
||||
|
||||
ConsoleCommandRegister("set", CVarSetCommandHandler, DEFAULT, "Set the value of a CVar");
|
||||
ConsoleCommandRegister("cvar_reset", CVarResetCommandHandler, DEFAULT, "Set the value of a CVar to it's startup value");
|
||||
ConsoleCommandRegister("cvar_default", CVarDefaultCommandHandler, DEFAULT, "Set the value of a CVar to it's coded default value");
|
||||
ConsoleCommandRegister("cvarlist", CVarListCommandHandler, DEFAULT, "List cvars");
|
||||
}
|
||||
|
||||
int32_t CVar::Load(const char* filename) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
CVar* CVar::Lookup(const char* name) {
|
||||
return name
|
||||
? CVar::s_registeredCVars.Ptr(name)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
CVar* CVar::LookupRegistered(const char* name) {
|
||||
auto var = CVar::Lookup(name);
|
||||
if (!var) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (var->m_flags >= 0 && !(var->m_flags & 0x80)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return var;
|
||||
}
|
||||
|
||||
CVar* CVar::Register(const char* name, const char* help, uint32_t flags, const char* value, bool (*fcn)(CVar*, const char*, const char*, void*), uint32_t category, bool a7, void* arg, bool a9) {
|
||||
CVar* var = CVar::s_registeredCVars.Ptr(name);
|
||||
|
||||
|
||||
@ -1,19 +1,24 @@
|
||||
#ifndef CONSOLE_C_VAR_HPP
|
||||
#define CONSOLE_C_VAR_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include "console/Types.hpp"
|
||||
#include <common/String.hpp>
|
||||
#include <storm/Hash.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
class CVar : public TSHashObject<CVar, HASHKEY_STRI> {
|
||||
public:
|
||||
// Static variables
|
||||
static bool m_initialized;
|
||||
static TSHashTable<CVar, HASHKEY_STRI> s_registeredCVars;
|
||||
static bool m_needsSave;
|
||||
|
||||
// Static functions
|
||||
static void Initialize();
|
||||
static int32_t Load(const char* filename);
|
||||
static CVar* Lookup(const char* name);
|
||||
static CVar* Register(const char*, const char*, uint32_t, const char*, bool (*)(CVar*, const char*, const char*, void*), uint32_t, bool, void*, bool);
|
||||
static CVar* LookupRegistered(const char* name);
|
||||
static CVar* Register(const char* name, const char* help, uint32_t flags, const char* value, bool (*fcn)(CVar*, const char*, const char*, void*), uint32_t category, bool a7, void* arg, bool a9);
|
||||
|
||||
// Member variables
|
||||
uint32_t m_category = 0;
|
||||
|
||||
25
src/console/CVarHandlers.cpp
Normal file
25
src/console/CVarHandlers.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
#include "console/CVarHandlers.hpp"
|
||||
|
||||
int32_t CVarDefaultCommandHandler(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CVarListCommandHandler(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CVarSetCommandHandler(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CVarResetCommandHandler(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
14
src/console/CVarHandlers.hpp
Normal file
14
src/console/CVarHandlers.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef CONSOLE_C_VAR_HANDLERS_HPP
|
||||
#define CONSOLE_C_VAR_HANDLERS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
int32_t CVarDefaultCommandHandler(const char* command, const char* arguments);
|
||||
|
||||
int32_t CVarListCommandHandler(const char* command, const char* arguments);
|
||||
|
||||
int32_t CVarSetCommandHandler(const char* command, const char* arguments);
|
||||
|
||||
int32_t CVarResetCommandHandler(const char* command, const char* arguments);
|
||||
|
||||
#endif
|
||||
@ -1,9 +0,0 @@
|
||||
#include "console/Client.hpp"
|
||||
|
||||
void ConsoleInitializeClientCommand() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void ConsoleInitializeClientCVar(const char* a1) {
|
||||
// TODO
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
#ifndef CONSOLE_CLIENT_HPP
|
||||
#define CONSOLE_CLIENT_HPP
|
||||
|
||||
void ConsoleInitializeClientCommand();
|
||||
|
||||
void ConsoleInitializeClientCVar(const char* a1);
|
||||
|
||||
#endif
|
||||
@ -1,4 +1,5 @@
|
||||
#include "console/Command.hpp"
|
||||
#include "console/CommandHandlers.hpp"
|
||||
#include <storm/Error.hpp>
|
||||
|
||||
int32_t ValidateFileName(const char* filename) {
|
||||
@ -68,19 +69,3 @@ void ConsoleCommandUnregister(const char* command) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
// ConsolePostClose()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef CONSOLE_COMMAND_HPP
|
||||
#define CONSOLE_COMMAND_HPP
|
||||
|
||||
#include "console/Types.hpp"
|
||||
#include <storm/Hash.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
@ -10,20 +11,6 @@
|
||||
#define HISTORY_DEPTH 32
|
||||
#define NOHELP nullptr
|
||||
|
||||
enum CATEGORY {
|
||||
DEBUG,
|
||||
GRAPHICS,
|
||||
CONSOLE,
|
||||
COMBAT,
|
||||
GAME,
|
||||
DEFAULT,
|
||||
NET,
|
||||
SOUND,
|
||||
GM,
|
||||
NONE,
|
||||
LAST
|
||||
};
|
||||
|
||||
struct CONSOLECOMMAND : TSHashObject<CONSOLECOMMAND, HASHKEY_STRI> {
|
||||
const char* command;
|
||||
int32_t (*handler)(const char*, const char*);
|
||||
@ -48,10 +35,4 @@ int32_t ConsoleCommandRegister(const char* command, int32_t (*handler)(const cha
|
||||
|
||||
void ConsoleCommandUnregister(const char* command);
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments);
|
||||
|
||||
#endif
|
||||
|
||||
24
src/console/CommandHandlers.cpp
Normal file
24
src/console/CommandHandlers.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "console/CommandHandlers.hpp"
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
// ConsolePostClose()
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_SetMap(const char* command, const char* arguments) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
14
src/console/CommandHandlers.hpp
Normal file
14
src/console/CommandHandlers.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef CONSOLE_COMMAND_HANDLERS_HPP
|
||||
#define CONSOLE_COMMAND_HANDLERS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
int32_t ConsoleCommand_Help(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Quit(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_SetMap(const char* command, const char* arguments);
|
||||
|
||||
int32_t ConsoleCommand_Ver(const char* command, const char* arguments);
|
||||
|
||||
#endif
|
||||
@ -42,7 +42,7 @@ void RegisterGxCVars() {
|
||||
0x0,
|
||||
"1",
|
||||
nullptr,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -54,10 +54,10 @@ void RegisterGxCVars() {
|
||||
0x1 | 0x2,
|
||||
v1 ? "1" : "0",
|
||||
&CVGxWindowCallback,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
|
||||
s_cvGxMaximize = CVar::Register(
|
||||
@ -66,10 +66,10 @@ void RegisterGxCVars() {
|
||||
0x1 | 0x2,
|
||||
v1 ? "1" : "0",
|
||||
&CVGxMaximizeCallback,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
);
|
||||
|
||||
// TODO s_cvGxColorBits
|
||||
@ -83,7 +83,7 @@ void RegisterGxCVars() {
|
||||
0x1 | 0x2,
|
||||
resolution,
|
||||
&CVGxResolutionCallback,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "console/Handlers.hpp"
|
||||
#include "console/Console.hpp"
|
||||
#include "console/EventHandlers.hpp"
|
||||
#include "console/Screen.hpp"
|
||||
#include "event/Event.hpp"
|
||||
#include <cstdint>
|
||||
6
src/console/EventHandlers.hpp
Normal file
6
src/console/EventHandlers.hpp
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef CONSOLE_EVENT_HANDLERS_HPP
|
||||
#define CONSOLE_EVENT_HANDLERS_HPP
|
||||
|
||||
void RegisterHandlers();
|
||||
|
||||
#endif
|
||||
@ -1,6 +0,0 @@
|
||||
#ifndef CONSOLE_HANDLERS_HPP
|
||||
#define CONSOLE_HANDLERS_HPP
|
||||
|
||||
void RegisterHandlers();
|
||||
|
||||
#endif
|
||||
30
src/console/Initialize.cpp
Normal file
30
src/console/Initialize.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include "console/Initialize.hpp"
|
||||
#include "console/Command.hpp"
|
||||
#include "console/CommandHandlers.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
|
||||
static const char* s_filename;
|
||||
|
||||
void ConsoleInitializeCommonCommand() {
|
||||
ConsoleCommandRegister("quit", ConsoleCommand_Quit, DEFAULT, NOHELP);
|
||||
ConsoleCommandRegister("ver", ConsoleCommand_Ver, DEFAULT, NOHELP);
|
||||
ConsoleCommandRegister("setmap", ConsoleCommand_SetMap, DEFAULT, NOHELP);
|
||||
}
|
||||
|
||||
void ConsoleInitializeDebugCommand() {
|
||||
// Unknown without debug build
|
||||
}
|
||||
|
||||
void ConsoleInitializeClientCommand() {
|
||||
ConsoleCommandInitialize();
|
||||
ConsoleInitializeCommonCommand();
|
||||
ConsoleInitializeDebugCommand();
|
||||
}
|
||||
|
||||
void ConsoleInitializeClientCVar(const char* filename) {
|
||||
s_filename = filename;
|
||||
|
||||
CVar::Initialize();
|
||||
|
||||
CVar::Load(s_filename);
|
||||
}
|
||||
8
src/console/Initialize.hpp
Normal file
8
src/console/Initialize.hpp
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef CONSOLE_INITIALIZE_HPP
|
||||
#define CONSOLE_INITIALIZE_HPP
|
||||
|
||||
void ConsoleInitializeClientCommand();
|
||||
|
||||
void ConsoleInitializeClientCVar(const char* filename);
|
||||
|
||||
#endif
|
||||
@ -1,6 +1,6 @@
|
||||
#include "console/Screen.hpp"
|
||||
#include "console/Console.hpp"
|
||||
#include "console/Handlers.hpp"
|
||||
#include "console/EventHandlers.hpp"
|
||||
#include "console/Types.hpp"
|
||||
#include "gx/Buffer.hpp"
|
||||
#include "gx/Coordinate.hpp"
|
||||
|
||||
@ -1,6 +1,20 @@
|
||||
#ifndef CONSOLE_TYPES_HPP
|
||||
#define CONSOLE_TYPES_HPP
|
||||
|
||||
enum CATEGORY {
|
||||
DEBUG,
|
||||
GRAPHICS,
|
||||
CONSOLE,
|
||||
COMBAT,
|
||||
GAME,
|
||||
DEFAULT,
|
||||
NET,
|
||||
SOUND,
|
||||
GM,
|
||||
NONE,
|
||||
LAST
|
||||
};
|
||||
|
||||
enum COLOR_T {
|
||||
DEFAULT_COLOR,
|
||||
INPUT_COLOR,
|
||||
|
||||
@ -5,6 +5,7 @@ WowClientDB<AchievementRec> g_achievementDB;
|
||||
WowClientDB<Cfg_CategoriesRec> g_cfg_CategoriesDB;
|
||||
WowClientDB<Cfg_ConfigsRec> g_cfg_ConfigsDB;
|
||||
WowClientDB<ChrRacesRec> g_chrRacesDB;
|
||||
WowClientDB<MapRec> g_mapDB;
|
||||
|
||||
void LoadDB(WowClientDB_Base* db, const char* filename, int32_t linenumber) {
|
||||
db->Load(filename, linenumber);
|
||||
@ -15,6 +16,7 @@ void StaticDBLoadAll(void (*loadFn)(WowClientDB_Base*, const char*, int32_t)) {
|
||||
loadFn(&g_cfg_CategoriesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_cfg_ConfigsDB, __FILE__, __LINE__);
|
||||
loadFn(&g_chrRacesDB, __FILE__, __LINE__);
|
||||
loadFn(&g_mapDB, __FILE__, __LINE__);
|
||||
};
|
||||
|
||||
void ClientDBInitialize() {
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
#ifndef DB_DB_HPP
|
||||
#define DB_DB_HPP
|
||||
|
||||
#include "db/WowClientDB.hpp"
|
||||
#include "db/rec/AchievementRec.hpp"
|
||||
#include "db/rec/Cfg_CategoriesRec.hpp"
|
||||
#include "db/rec/Cfg_ConfigsRec.hpp"
|
||||
#include "db/rec/ChrRacesRec.hpp"
|
||||
#include "db/WowClientDB.hpp"
|
||||
#include "db/rec/MapRec.hpp"
|
||||
|
||||
extern WowClientDB<AchievementRec> g_achievementDB;
|
||||
extern WowClientDB<Cfg_CategoriesRec> g_cfg_CategoriesDB;
|
||||
extern WowClientDB<Cfg_ConfigsRec> g_cfg_ConfigsDB;
|
||||
extern WowClientDB<ChrRacesRec> g_chrRacesDB;
|
||||
extern WowClientDB<MapRec> g_mapDB;
|
||||
|
||||
void ClientDBInitialize();
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#ifndef DB_I_DATABASE_HPP
|
||||
#define DB_I_DATABASE_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
template <class T>
|
||||
class IDatabase {
|
||||
public:
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/AchievementRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* AchievementRec::GetFilename() {
|
||||
@ -13,10 +15,18 @@ uint32_t AchievementRec::GetRowSize() {
|
||||
return 248;
|
||||
}
|
||||
|
||||
bool AchievementRec::NeedIDAssigned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t AchievementRec::GetID() {
|
||||
return this->m_ID;
|
||||
}
|
||||
|
||||
void AchievementRec::SetID(int32_t id) {
|
||||
this->m_ID = id;
|
||||
}
|
||||
|
||||
bool AchievementRec::Read(SFile* f, const char* stringBuffer) {
|
||||
uint32_t titleOfs[16];
|
||||
uint32_t titleMask;
|
||||
@ -30,62 +40,62 @@ bool AchievementRec::Read(SFile* f, const char* stringBuffer) {
|
||||
|| !SFile::Read(f, &this->m_faction, sizeof(this->m_faction), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_instanceID, sizeof(this->m_instanceID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_supercedes, sizeof(this->m_supercedes), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[0], sizeof(titleOfs[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[1], sizeof(titleOfs[1]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[2], sizeof(titleOfs[2]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[3], sizeof(titleOfs[3]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[4], sizeof(titleOfs[4]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[5], sizeof(titleOfs[5]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[6], sizeof(titleOfs[6]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[7], sizeof(titleOfs[7]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[8], sizeof(titleOfs[8]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[9], sizeof(titleOfs[9]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[10], sizeof(titleOfs[10]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[11], sizeof(titleOfs[11]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[12], sizeof(titleOfs[12]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[13], sizeof(titleOfs[13]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[14], sizeof(titleOfs[14]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[15], sizeof(titleOfs[15]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleMask, sizeof(titleMask), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[0], sizeof(descriptionOfs[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[1], sizeof(descriptionOfs[1]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[2], sizeof(descriptionOfs[2]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[3], sizeof(descriptionOfs[3]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[4], sizeof(descriptionOfs[4]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[5], sizeof(descriptionOfs[5]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[6], sizeof(descriptionOfs[6]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[7], sizeof(descriptionOfs[7]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[8], sizeof(descriptionOfs[8]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[9], sizeof(descriptionOfs[9]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[10], sizeof(descriptionOfs[10]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[11], sizeof(descriptionOfs[11]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[12], sizeof(descriptionOfs[12]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[13], sizeof(descriptionOfs[13]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[14], sizeof(descriptionOfs[14]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[15], sizeof(descriptionOfs[15]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionMask, sizeof(descriptionMask), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &titleMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &descriptionMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_category, sizeof(this->m_category), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_points, sizeof(this->m_points), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_uiOrder, sizeof(this->m_uiOrder), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_flags, sizeof(this->m_flags), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_iconID, sizeof(this->m_iconID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[0], sizeof(rewardOfs[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[1], sizeof(rewardOfs[1]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[2], sizeof(rewardOfs[2]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[3], sizeof(rewardOfs[3]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[4], sizeof(rewardOfs[4]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[5], sizeof(rewardOfs[5]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[6], sizeof(rewardOfs[6]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[7], sizeof(rewardOfs[7]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[8], sizeof(rewardOfs[8]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[9], sizeof(rewardOfs[9]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[10], sizeof(rewardOfs[10]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[11], sizeof(rewardOfs[11]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[12], sizeof(rewardOfs[12]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[13], sizeof(rewardOfs[13]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[14], sizeof(rewardOfs[14]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[15], sizeof(rewardOfs[15]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardMask, sizeof(rewardMask), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &rewardMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_minimumCriteria, sizeof(this->m_minimumCriteria), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_sharesCriteria, sizeof(this->m_sharesCriteria), nullptr, nullptr, nullptr)
|
||||
) {
|
||||
@ -93,9 +103,9 @@ bool AchievementRec::Read(SFile* f, const char* stringBuffer) {
|
||||
}
|
||||
|
||||
if (stringBuffer) {
|
||||
this->m_title = &stringBuffer[titleOfs[0]];
|
||||
this->m_description = &stringBuffer[descriptionOfs[0]];
|
||||
this->m_reward = &stringBuffer[rewardOfs[0]];
|
||||
this->m_title = &stringBuffer[titleOfs[CURRENT_LANGUAGE]];
|
||||
this->m_description = &stringBuffer[descriptionOfs[CURRENT_LANGUAGE]];
|
||||
this->m_reward = &stringBuffer[rewardOfs[CURRENT_LANGUAGE]];
|
||||
} else {
|
||||
this->m_title = "";
|
||||
this->m_description = "";
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_ACHIEVEMENT_REC_HPP
|
||||
#define DB_REC_ACHIEVEMENT_REC_HPP
|
||||
|
||||
@ -25,8 +26,9 @@ class AchievementRec {
|
||||
static const char* GetFilename();
|
||||
static uint32_t GetNumColumns();
|
||||
static uint32_t GetRowSize();
|
||||
|
||||
static bool NeedIDAssigned();
|
||||
int32_t GetID();
|
||||
void SetID(int32_t id);
|
||||
bool Read(SFile* f, const char* stringBuffer);
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/Cfg_CategoriesRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* Cfg_CategoriesRec::GetFilename() {
|
||||
@ -13,10 +15,18 @@ uint32_t Cfg_CategoriesRec::GetRowSize() {
|
||||
return 84;
|
||||
}
|
||||
|
||||
bool Cfg_CategoriesRec::NeedIDAssigned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t Cfg_CategoriesRec::GetID() {
|
||||
return this->m_ID;
|
||||
}
|
||||
|
||||
void Cfg_CategoriesRec::SetID(int32_t id) {
|
||||
this->m_ID = id;
|
||||
}
|
||||
|
||||
bool Cfg_CategoriesRec::Read(SFile* f, const char* stringBuffer) {
|
||||
uint32_t nameOfs[16];
|
||||
uint32_t nameMask;
|
||||
@ -26,29 +36,29 @@ bool Cfg_CategoriesRec::Read(SFile* f, const char* stringBuffer) {
|
||||
|| !SFile::Read(f, &this->m_localeMask, sizeof(this->m_localeMask), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_createCharsetMask, sizeof(this->m_createCharsetMask), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_flags, sizeof(this->m_flags), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[0], sizeof(nameOfs[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[1], sizeof(nameOfs[1]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[2], sizeof(nameOfs[2]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[3], sizeof(nameOfs[3]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[4], sizeof(nameOfs[4]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[5], sizeof(nameOfs[5]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[6], sizeof(nameOfs[6]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[7], sizeof(nameOfs[7]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[8], sizeof(nameOfs[8]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[9], sizeof(nameOfs[9]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[10], sizeof(nameOfs[10]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[11], sizeof(nameOfs[11]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[12], sizeof(nameOfs[12]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[13], sizeof(nameOfs[13]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[14], sizeof(nameOfs[14]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[15], sizeof(nameOfs[15]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameMask, sizeof(nameMask), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &nameMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stringBuffer) {
|
||||
this->m_name = &stringBuffer[nameOfs[0]];
|
||||
this->m_name = &stringBuffer[nameOfs[CURRENT_LANGUAGE]];
|
||||
} else {
|
||||
this->m_name = "";
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_CFG_CATEGORIES_REC_HPP
|
||||
#define DB_REC_CFG_CATEGORIES_REC_HPP
|
||||
|
||||
@ -11,13 +12,14 @@ class Cfg_CategoriesRec {
|
||||
int32_t m_localeMask;
|
||||
int32_t m_createCharsetMask;
|
||||
int32_t m_flags;
|
||||
const char *m_name;
|
||||
const char* m_name;
|
||||
|
||||
static const char* GetFilename();
|
||||
static uint32_t GetNumColumns();
|
||||
static uint32_t GetRowSize();
|
||||
|
||||
static bool NeedIDAssigned();
|
||||
int32_t GetID();
|
||||
void SetID(int32_t id);
|
||||
bool Read(SFile* f, const char* stringBuffer);
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/Cfg_ConfigsRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* Cfg_ConfigsRec::GetFilename() {
|
||||
@ -13,10 +15,18 @@ uint32_t Cfg_ConfigsRec::GetRowSize() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
bool Cfg_ConfigsRec::NeedIDAssigned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t Cfg_ConfigsRec::GetID() {
|
||||
return this->m_ID;
|
||||
}
|
||||
|
||||
void Cfg_ConfigsRec::SetID(int32_t id) {
|
||||
this->m_ID = id;
|
||||
}
|
||||
|
||||
bool Cfg_ConfigsRec::Read(SFile* f, const char* stringBuffer) {
|
||||
if (
|
||||
!SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_CFG_CONFIGS_REC_HPP
|
||||
#define DB_REC_CFG_CONFIGS_REC_HPP
|
||||
|
||||
@ -15,8 +16,9 @@ class Cfg_ConfigsRec {
|
||||
static const char* GetFilename();
|
||||
static uint32_t GetNumColumns();
|
||||
static uint32_t GetRowSize();
|
||||
|
||||
static bool NeedIDAssigned();
|
||||
int32_t GetID();
|
||||
void SetID(int32_t id);
|
||||
bool Read(SFile* f, const char* stringBuffer);
|
||||
};
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/ChrRacesRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* ChrRacesRec::GetFilename() {
|
||||
@ -115,9 +116,9 @@ bool ChrRacesRec::Read(SFile* f, const char* stringBuffer) {
|
||||
if (stringBuffer) {
|
||||
this->m_clientPrefix = &stringBuffer[clientPrefixOfs];
|
||||
this->m_clientFileString = &stringBuffer[clientFileStringOfs];
|
||||
this->m_name = &stringBuffer[nameOfs[0]];
|
||||
this->m_nameFemale = &stringBuffer[nameFemaleOfs[0]];
|
||||
this->m_nameMale = &stringBuffer[nameMaleOfs[0]];
|
||||
this->m_name = &stringBuffer[nameOfs[CURRENT_LANGUAGE]];
|
||||
this->m_nameFemale = &stringBuffer[nameFemaleOfs[CURRENT_LANGUAGE]];
|
||||
this->m_nameMale = &stringBuffer[nameMaleOfs[CURRENT_LANGUAGE]];
|
||||
this->m_facialHairCustomization[0] = &stringBuffer[facialHairCustomizationOfs[0]];
|
||||
this->m_facialHairCustomization[1] = &stringBuffer[facialHairCustomizationOfs[1]];
|
||||
this->m_hairCustomization = &stringBuffer[hairCustomizationOfs];
|
||||
|
||||
123
src/db/rec/MapRec.cpp
Normal file
123
src/db/rec/MapRec.cpp
Normal file
@ -0,0 +1,123 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#include "db/rec/MapRec.hpp"
|
||||
#include "util/Locale.hpp"
|
||||
#include "util/SFile.hpp"
|
||||
|
||||
const char* MapRec::GetFilename() {
|
||||
return "DBFilesClient\\Map.dbc";
|
||||
}
|
||||
|
||||
uint32_t MapRec::GetNumColumns() {
|
||||
return 66;
|
||||
}
|
||||
|
||||
uint32_t MapRec::GetRowSize() {
|
||||
return 264;
|
||||
}
|
||||
|
||||
bool MapRec::NeedIDAssigned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t MapRec::GetID() {
|
||||
return this->m_ID;
|
||||
}
|
||||
|
||||
void MapRec::SetID(int32_t id) {
|
||||
this->m_ID = id;
|
||||
}
|
||||
|
||||
bool MapRec::Read(SFile* f, const char* stringBuffer) {
|
||||
uint32_t directoryOfs;
|
||||
uint32_t mapNameOfs[16];
|
||||
uint32_t mapNameMask;
|
||||
uint32_t mapDescription0Ofs[16];
|
||||
uint32_t mapDescription0Mask;
|
||||
uint32_t mapDescription1Ofs[16];
|
||||
uint32_t mapDescription1Mask;
|
||||
|
||||
if (
|
||||
!SFile::Read(f, &this->m_ID, sizeof(this->m_ID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &directoryOfs, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_instanceType, sizeof(this->m_instanceType), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_flags, sizeof(this->m_flags), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_pvp, sizeof(this->m_pvp), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameOfs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapNameMask, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_areaTableID, sizeof(this->m_areaTableID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Ofs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription0Mask, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[0], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[1], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[2], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[3], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[4], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[5], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[6], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[7], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[8], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[9], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[10], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[11], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[12], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[13], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[14], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Ofs[15], sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &mapDescription1Mask, sizeof(uint32_t), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_loadingScreenID, sizeof(this->m_loadingScreenID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_minimapIconScale, sizeof(this->m_minimapIconScale), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_corpseMapID, sizeof(this->m_corpseMapID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_corpse[0], sizeof(m_corpse[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_corpse[1], sizeof(m_corpse[0]), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_timeOfDayOverride, sizeof(this->m_timeOfDayOverride), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_expansionID, sizeof(this->m_expansionID), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_raidOffset, sizeof(this->m_raidOffset), nullptr, nullptr, nullptr)
|
||||
|| !SFile::Read(f, &this->m_maxPlayers, sizeof(this->m_maxPlayers), nullptr, nullptr, nullptr)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stringBuffer) {
|
||||
this->m_directory = &stringBuffer[directoryOfs];
|
||||
this->m_mapName = &stringBuffer[mapNameOfs[CURRENT_LANGUAGE]];
|
||||
this->m_mapDescription0 = &stringBuffer[mapDescription0Ofs[CURRENT_LANGUAGE]];
|
||||
this->m_mapDescription1 = &stringBuffer[mapDescription1Ofs[CURRENT_LANGUAGE]];
|
||||
} else {
|
||||
this->m_directory = "";
|
||||
this->m_mapName = "";
|
||||
this->m_mapDescription0 = "";
|
||||
this->m_mapDescription1 = "";
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
38
src/db/rec/MapRec.hpp
Normal file
38
src/db/rec/MapRec.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
// DO NOT EDIT: generated by whoa-autocode
|
||||
#ifndef DB_REC_MAP_REC_HPP
|
||||
#define DB_REC_MAP_REC_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class SFile;
|
||||
|
||||
class MapRec {
|
||||
public:
|
||||
int32_t m_ID;
|
||||
const char* m_directory;
|
||||
int32_t m_instanceType;
|
||||
int32_t m_flags; // unconfirmed
|
||||
int32_t m_pvp;
|
||||
const char* m_mapName;
|
||||
int32_t m_areaTableID;
|
||||
const char* m_mapDescription0;
|
||||
const char* m_mapDescription1;
|
||||
int32_t m_loadingScreenID;
|
||||
float m_minimapIconScale;
|
||||
int32_t m_corpseMapID;
|
||||
float m_corpse[2];
|
||||
int32_t m_timeOfDayOverride;
|
||||
int32_t m_expansionID;
|
||||
int32_t m_raidOffset;
|
||||
int32_t m_maxPlayers;
|
||||
|
||||
static const char* GetFilename();
|
||||
static uint32_t GetNumColumns();
|
||||
static uint32_t GetRowSize();
|
||||
static bool NeedIDAssigned();
|
||||
int32_t GetID();
|
||||
void SetID(int32_t id);
|
||||
bool Read(SFile* f, const char* stringBuffer);
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -136,12 +136,11 @@ void EventRegister(EVENTID id, EVENTHANDLERFUNC handler) {
|
||||
}
|
||||
|
||||
void EventRegisterEx(EVENTID id, EVENTHANDLERFUNC handler, void* param, float priority) {
|
||||
STORM_ASSERT(id >= 0);
|
||||
STORM_VALIDATE(id >= 0, ERROR_INVALID_PARAMETER);
|
||||
STORM_ASSERT(id < EVENTIDS);
|
||||
STORM_VALIDATE(id < EVENTIDS, ERROR_INVALID_PARAMETER);
|
||||
STORM_ASSERT(handler);
|
||||
STORM_VALIDATE(handler, ERROR_INVALID_PARAMETER);
|
||||
STORM_VALIDATE_BEGIN;
|
||||
STORM_VALIDATE(id >= 0);
|
||||
STORM_VALIDATE(id < EVENTIDS);
|
||||
STORM_VALIDATE(handler);
|
||||
STORM_VALIDATE_END_VOID;
|
||||
|
||||
HEVENTCONTEXT hContext = PropGet(PROP_EVENTCONTEXT);
|
||||
|
||||
|
||||
@ -192,8 +192,9 @@ void PostSize(EvtContext* context, int32_t w, int32_t h) {
|
||||
}
|
||||
|
||||
void ProcessInput(const int32_t param[], OSINPUT id, int32_t* shutdown, EvtContext* context) {
|
||||
STORM_ASSERT(context);
|
||||
STORM_VALIDATE(context, ERROR_INVALID_PARAMETER);
|
||||
STORM_VALIDATE_BEGIN;
|
||||
STORM_VALIDATE(context);
|
||||
STORM_VALIDATE_END_VOID;
|
||||
|
||||
switch (id) {
|
||||
case OS_INPUT_CAPTURE_CHANGED:
|
||||
@ -361,8 +362,9 @@ void ConvertPosition(int32_t clientx, int32_t clienty, float* x, float* y) {
|
||||
}
|
||||
|
||||
void EventSetMouseMode(MOUSEMODE mode, uint32_t holdButton) {
|
||||
STORM_ASSERT(mode < MOUSE_MODES);
|
||||
STORM_VALIDATE(mode < MOUSE_MODES, ERROR_INVALID_PARAMETER);
|
||||
STORM_VALIDATE_BEGIN;
|
||||
STORM_VALIDATE(mode < MOUSE_MODES);
|
||||
STORM_VALIDATE_END_VOID;
|
||||
|
||||
auto contextId = *reinterpret_cast<uint32_t*>(PropGet(PROP_EVENTCONTEXT));
|
||||
int32_t findMask;
|
||||
@ -468,8 +470,9 @@ void IEvtInputInitialize() {
|
||||
}
|
||||
|
||||
int32_t IEvtInputProcess(EvtContext* context, int32_t* shutdown) {
|
||||
STORM_ASSERT(context);
|
||||
STORM_VALIDATE(context, ERROR_INVALID_PARAMETER, 0);
|
||||
STORM_VALIDATE_BEGIN;
|
||||
STORM_VALIDATE(context);
|
||||
STORM_VALIDATE_END;
|
||||
|
||||
int32_t v4 = 0;
|
||||
OSINPUT id;
|
||||
@ -484,8 +487,9 @@ int32_t IEvtInputProcess(EvtContext* context, int32_t* shutdown) {
|
||||
}
|
||||
|
||||
void IEvtInputSetMouseMode(EvtContext* context, MOUSEMODE mode, uint32_t holdButton) {
|
||||
STORM_ASSERT(context);
|
||||
STORM_VALIDATE(context, ERROR_INVALID_PARAMETER);
|
||||
STORM_VALIDATE_BEGIN;
|
||||
STORM_VALIDATE(context);
|
||||
STORM_VALIDATE_END_VOID;
|
||||
|
||||
if ((Input::s_buttonState & holdButton) == holdButton) {
|
||||
Input::s_mouseHoldButton = holdButton;
|
||||
|
||||
@ -408,8 +408,9 @@ int32_t OsInputGet(OSINPUT* id, int32_t* param0, int32_t* param1, int32_t* param
|
||||
}
|
||||
|
||||
void OsInputSetMouseMode(OS_MOUSE_MODE mode) {
|
||||
STORM_ASSERT(mode < OS_MOUSE_MODES);
|
||||
STORM_VALIDATE(mode < OS_MOUSE_MODES, ERROR_INVALID_PARAMETER);
|
||||
STORM_VALIDATE_BEGIN;
|
||||
STORM_VALIDATE(mode < OS_MOUSE_MODES);
|
||||
STORM_VALIDATE_END_VOID;
|
||||
|
||||
if (Input::s_osMouseMode == mode) {
|
||||
return;
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
#include "glue/CGlueMgr.hpp"
|
||||
#include "glue/CRealmList.hpp"
|
||||
#include "client/Client.hpp"
|
||||
#include "client/ClientServices.hpp"
|
||||
#include "client/Util.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
#include "glue/CRealmList.hpp"
|
||||
#include "gx/Coordinate.hpp"
|
||||
#include "gx/Device.hpp"
|
||||
#include "gx/LoadingScreen.hpp"
|
||||
#include "math/Utils.hpp"
|
||||
#include "net/Connection.hpp"
|
||||
#include "net/Login.hpp"
|
||||
@ -14,11 +17,10 @@
|
||||
#include "ui/FrameXML.hpp"
|
||||
#include "ui/Interface.hpp"
|
||||
#include "ui/ScriptFunctions.hpp"
|
||||
#include "console/CVar.hpp"
|
||||
#include "util/Filesystem.hpp"
|
||||
#include "util/Log.hpp"
|
||||
#include <cstdio>
|
||||
#include <common/MD5.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
unsigned char InterfaceKey[256] = {
|
||||
0xC3, 0x5B, 0x50, 0x84, 0xB9, 0x3E, 0x32, 0x42, 0x8C, 0xD0, 0xC7, 0x48, 0xFA, 0x0E, 0x5D, 0x54,
|
||||
@ -241,6 +243,11 @@ int32_t CGlueMgr::Idle(const void* a1, void* a2) {
|
||||
break;
|
||||
}
|
||||
|
||||
case IDLE_ENTER_WORLD: {
|
||||
CGlueMgr::PollEnterWorld();
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO other idle states
|
||||
|
||||
default:
|
||||
@ -334,8 +341,10 @@ void CGlueMgr::LoginServerLogin(const char* accountName, const char* password) {
|
||||
memset(const_cast<char*>(password), 0, SStrLen(password));
|
||||
}
|
||||
|
||||
void CGlueMgr::QuitGame() {
|
||||
ClientPostClose(0);
|
||||
int32_t CGlueMgr::OnKickReasonMsg(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op) {
|
||||
@ -407,6 +416,29 @@ void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t comp
|
||||
}
|
||||
}
|
||||
|
||||
void CGlueMgr::PollEnterWorld() {
|
||||
if (!LoadingScreenDrawing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CGlueMgr::m_suspended) {
|
||||
CGlueMgr::m_idleState = IDLE_NONE;
|
||||
CGlueMgr::m_showedDisconnect = 0;
|
||||
|
||||
// TODO SI Logic
|
||||
// TODO ClientConnection::CharacterLogin()
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO Get map ID and position from character info
|
||||
uint32_t mapId = 0;
|
||||
C3Vector position = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
CGlueMgr::Suspend();
|
||||
ClientInitializeGame(mapId, position);
|
||||
}
|
||||
|
||||
void CGlueMgr::PollLoginServerLogin() {
|
||||
if (CGlueMgr::m_loginState != LOGIN_STATE_PIN_WAIT) {
|
||||
CGlueMgr::DisplayLoginStatus();
|
||||
@ -454,10 +486,10 @@ void CGlueMgr::PollLoginServerLogin() {
|
||||
}
|
||||
|
||||
case LOGIN_STATE_CHECKINGVERSIONS: {
|
||||
uint8_t versionChecksum[20];
|
||||
// TODO
|
||||
// uint8_t* versionChallenge = ClientServices::LoginConnection()->GetVersionChallenge();
|
||||
// ChecksumExecutables(versionChallenge, 16, versionChecksum);
|
||||
uint8_t versionChecksum[LOGIN_VERSION_CHECKSUM_LEN];
|
||||
auto versionChallenge = ClientServices::LoginConnection()->GetVersionChallenge();
|
||||
ChecksumExecutables(versionChallenge, LOGIN_VERSION_CHALLENGE_LEN, versionChecksum);
|
||||
|
||||
ClientServices::LoginConnection()->ProveVersion(versionChecksum);
|
||||
|
||||
break;
|
||||
@ -468,6 +500,10 @@ void CGlueMgr::PollLoginServerLogin() {
|
||||
}
|
||||
}
|
||||
|
||||
void CGlueMgr::QuitGame() {
|
||||
ClientPostClose(0);
|
||||
}
|
||||
|
||||
void CGlueMgr::Resume() {
|
||||
// TODO
|
||||
// CGlueMgr::m_disconnectPending = 0;
|
||||
@ -655,7 +691,7 @@ void CGlueMgr::StatusDialogClick() {
|
||||
case IDLE_4:
|
||||
case IDLE_5:
|
||||
case IDLE_6:
|
||||
case IDLE_10: {
|
||||
case IDLE_ENTER_WORLD: {
|
||||
ClientServices::Connection()->Cancel(2);
|
||||
|
||||
CGlueMgr::m_showedDisconnect = 0;
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
#define GLUE_C_GLUE_MGR_HPP
|
||||
|
||||
#include "event/Event.hpp"
|
||||
#include "net/Login.hpp"
|
||||
#include "net/Types.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
class CDataStore;
|
||||
class CSimpleTop;
|
||||
|
||||
class CGlueMgr {
|
||||
@ -21,7 +22,7 @@ class CGlueMgr {
|
||||
IDLE_7 = 7,
|
||||
IDLE_8 = 8,
|
||||
IDLE_9 = 9,
|
||||
IDLE_10 = 10,
|
||||
IDLE_ENTER_WORLD = 10,
|
||||
IDLE_11 = 11,
|
||||
IDLE_12 = 12,
|
||||
IDLE_13 = 13
|
||||
@ -62,9 +63,11 @@ class CGlueMgr {
|
||||
static int32_t Idle(const void* a1, void* a2);
|
||||
static void Initialize();
|
||||
static void LoginServerLogin(const char* accountName, const char* password);
|
||||
static void QuitGame();
|
||||
static int32_t OnKickReasonMsg(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||
static void PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
|
||||
static void PollEnterWorld();
|
||||
static void PollLoginServerLogin();
|
||||
static void QuitGame();
|
||||
static void Resume();
|
||||
static void SetCurrentAccount(const char* accountName);
|
||||
static void SetLoginStateAndResult(LOGIN_STATE state, LOGIN_RESULT result, char const* addrStr, char const* stateStr, char const* resultStr, uint8_t flags);
|
||||
|
||||
8
src/gx/LoadingScreen.cpp
Normal file
8
src/gx/LoadingScreen.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
#include "gx/LoadingScreen.hpp"
|
||||
#include "gx/Screen.hpp"
|
||||
|
||||
static HLAYER s_loadingScreenLayer;
|
||||
|
||||
bool LoadingScreenDrawing() {
|
||||
return s_loadingScreenLayer != nullptr;
|
||||
}
|
||||
6
src/gx/LoadingScreen.hpp
Normal file
6
src/gx/LoadingScreen.hpp
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef GX_LOADING_SCREEN_HPP
|
||||
#define GX_LOADING_SCREEN_HPP
|
||||
|
||||
bool LoadingScreenDrawing();
|
||||
|
||||
#endif
|
||||
@ -29,7 +29,7 @@ FT_Face FontFaceGetFace(HFACE handle) {
|
||||
const char* FontFaceGetFontName(HFACE handle) {
|
||||
STORM_ASSERT(handle);
|
||||
|
||||
return reinterpret_cast<FACEDATA*>(handle)->m_key.m_str;
|
||||
return reinterpret_cast<FACEDATA*>(handle)->m_key.GetString();
|
||||
}
|
||||
|
||||
HFACE FontFaceGetHandle(const char* fileName, FT_Library library) {
|
||||
|
||||
@ -792,7 +792,7 @@ void CGxDeviceGLL::IShaderCreatePixel(CGxShader* ps) {
|
||||
GLShader::ShaderType::ePixelShader,
|
||||
codeStr,
|
||||
codeLen,
|
||||
ps->m_key.m_str
|
||||
ps->m_key.GetString()
|
||||
);
|
||||
|
||||
glShader->Compile(nullptr);
|
||||
@ -818,7 +818,7 @@ void CGxDeviceGLL::IShaderCreateVertex(CGxShader* vs) {
|
||||
GLShader::ShaderType::eVertexShader,
|
||||
code,
|
||||
codeLen,
|
||||
vs->m_key.m_str
|
||||
vs->m_key.GetString()
|
||||
);
|
||||
|
||||
glShader->Compile(nullptr);
|
||||
|
||||
@ -132,8 +132,9 @@ int32_t CBLPFile::LockChain2(const char* fileName, PIXEL_FORMAT format, MipBits*
|
||||
}
|
||||
|
||||
int32_t CBLPFile::Open(const char* filename, int32_t a3) {
|
||||
STORM_ASSERT(filename);
|
||||
STORM_VALIDATE(filename, ERROR_INVALID_PARAMETER, 0);
|
||||
STORM_VALIDATE_BEGIN;
|
||||
STORM_VALIDATE(filename);
|
||||
STORM_VALIDATE_END;
|
||||
|
||||
this->m_inMemoryImage = nullptr;
|
||||
|
||||
|
||||
@ -67,8 +67,8 @@ int32_t CM2SceneRender::s_shadedList[M2BLEND_COUNT] = {
|
||||
0 // M2BLEND_MOD_2X
|
||||
};
|
||||
|
||||
void CM2SceneRender::Draw(M2PASS pass, M2Element* elements, uint32_t* a4, uint32_t a5) {
|
||||
if (!a5) {
|
||||
void CM2SceneRender::Draw(M2PASS pass, M2Element* elements, uint32_t* indices, uint32_t count) {
|
||||
if (!count) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -103,9 +103,8 @@ void CM2SceneRender::Draw(M2PASS pass, M2Element* elements, uint32_t* a4, uint32
|
||||
|
||||
this->m_curPass = pass;
|
||||
|
||||
for (int32_t i = 0; i < a5; i++) {
|
||||
uint32_t index = a4[i];
|
||||
auto element = &elements[index];
|
||||
for (int32_t i = 0; i < count; i++) {
|
||||
auto element = &elements[indices[i]];
|
||||
|
||||
if (element->type == 2 || element->type == 4 || !element->model->m_flag2000) {
|
||||
this->m_curElement = element;
|
||||
@ -136,7 +135,7 @@ void CM2SceneRender::Draw(M2PASS pass, M2Element* elements, uint32_t* a4, uint32
|
||||
}
|
||||
|
||||
case 2: {
|
||||
this->DrawBatchDoodad(elements, &a4[i]);
|
||||
this->DrawBatchDoodad(elements, &indices[i]);
|
||||
// TODO
|
||||
// i += this->m_curElement->dword1C - 1;
|
||||
break;
|
||||
@ -148,7 +147,7 @@ void CM2SceneRender::Draw(M2PASS pass, M2Element* elements, uint32_t* a4, uint32
|
||||
}
|
||||
|
||||
case 4: {
|
||||
i += this->DrawParticle(i, elements, a4, a5);
|
||||
i += this->DrawParticle(i, elements, indices, count);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +149,7 @@ uint32_t M2RegisterCVars() {
|
||||
0,
|
||||
"1",
|
||||
nullptr,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -161,7 +161,7 @@ uint32_t M2RegisterCVars() {
|
||||
0,
|
||||
"1",
|
||||
nullptr,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -173,7 +173,7 @@ uint32_t M2RegisterCVars() {
|
||||
0,
|
||||
"1",
|
||||
nullptr,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -185,7 +185,7 @@ uint32_t M2RegisterCVars() {
|
||||
0,
|
||||
"1",
|
||||
BatchDoodadsCallback,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -197,7 +197,7 @@ uint32_t M2RegisterCVars() {
|
||||
0,
|
||||
"1",
|
||||
BatchParticlesCallback,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -209,7 +209,7 @@ uint32_t M2RegisterCVars() {
|
||||
0,
|
||||
"0",
|
||||
ForceAdditiveParticleSortCallback,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
@ -233,7 +233,7 @@ uint32_t M2RegisterCVars() {
|
||||
0,
|
||||
"0",
|
||||
M2DebugFasterChanged,
|
||||
1,
|
||||
GRAPHICS,
|
||||
false,
|
||||
nullptr,
|
||||
false
|
||||
|
||||
@ -3,5 +3,6 @@
|
||||
|
||||
#include "net/login/BattlenetLogin.hpp"
|
||||
#include "net/login/GruntLogin.hpp"
|
||||
#include "net/login/Types.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
@ -3,73 +3,6 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
enum LOGIN_RESULT {
|
||||
LOGIN_OK = 0,
|
||||
LOGIN_INVALID_CHALLENGE_MESSAGE = 1,
|
||||
LOGIN_SRP_ERROR = 2,
|
||||
LOGIN_INVALID_PROOF_MESSAGE = 3,
|
||||
LOGIN_BAD_SERVER_PROOF = 4,
|
||||
LOGIN_INVALID_RECODE_MESSAGE = 5,
|
||||
LOGIN_BAD_SERVER_RECODE_PROOF = 6,
|
||||
LOGIN_UNKNOWN_ACCOUNT = 7,
|
||||
LOGIN_UNKNOWN_ACCOUNT_PIN = 8,
|
||||
LOGIN_UNKNOWN_ACCOUNT_CALL = 9,
|
||||
LOGIN_INCORRECT_PASSWORD = 10,
|
||||
LOGIN_FAILED = 11,
|
||||
LOGIN_SERVER_DOWN = 12,
|
||||
LOGIN_BANNED = 13,
|
||||
LOGIN_BADVERSION = 14,
|
||||
LOGIN_ALREADYONLINE = 15,
|
||||
LOGIN_NOTIME = 16,
|
||||
LOGIN_DBBUSY = 17,
|
||||
LOGIN_SUSPENDED = 18,
|
||||
LOGIN_PARENTALCONTROL = 19,
|
||||
LOGIN_LOCKED_ENFORCED = 20,
|
||||
LOGIN_RESULT_21 = 21, // DISCONNECTED
|
||||
LOGIN_ACCOUNT_CONVERTED = 22,
|
||||
LOGIN_ANTI_INDULGENCE = 23,
|
||||
LOGIN_EXPIRED = 24,
|
||||
LOGIN_TRIAL_EXPIRED = 25,
|
||||
LOGIN_NO_GAME_ACCOUNT = 26,
|
||||
LOGIN_AUTH_OUTAGE = 27,
|
||||
LOGIN_GAME_ACCOUNT_LOCKED = 28,
|
||||
LOGIN_NO_BATTLENET_MANAGER = 29,
|
||||
LOGIN_NO_BATTLENET_APPLICATION = 30,
|
||||
LOGIN_MALFORMED_ACCOUNT_NAME = 31,
|
||||
LOGIN_USE_GRUNT = 32,
|
||||
LOGIN_TOO_FAST = 33,
|
||||
LOGIN_CHARGEBACK = 34,
|
||||
LOGIN_IGR_WITHOUT_BNET = 35,
|
||||
LOGIN_UNLOCKABLE_LOCK = 36,
|
||||
LOGIN_CONVERSION_REQUIRED = 37,
|
||||
LOGIN_UNABLE_TO_DOWNLOAD_MODULE = 38,
|
||||
LOGIN_NO_GAME_ACCOUNTS_IN_REGION = 39,
|
||||
LOGIN_ACCOUNT_LOCKED = 40,
|
||||
LOGIN_RESULT_MAX = 41,
|
||||
};
|
||||
|
||||
enum LOGIN_STATE {
|
||||
LOGIN_STATE_INITIALIZED = 0,
|
||||
LOGIN_STATE_CONNECTING = 1,
|
||||
LOGIN_STATE_HANDSHAKING = 2,
|
||||
LOGIN_STATE_AUTHENTICATING = 3,
|
||||
LOGIN_STATE_AUTHENTICATED = 4,
|
||||
LOGIN_STATE_FAILED = 5,
|
||||
LOGIN_STATE_DOWNLOADFILE = 6,
|
||||
LOGIN_STATE_FIRST_SECURITY = 7,
|
||||
LOGIN_STATE_PIN = 8,
|
||||
LOGIN_STATE_PIN_WAIT = 9,
|
||||
LOGIN_STATE_MATRIX = 10,
|
||||
LOGIN_STATE_MATRIX_WAIT = 11,
|
||||
LOGIN_STATE_TOKEN = 12,
|
||||
LOGIN_STATE_TOKEN_WAIT = 13,
|
||||
LOGIN_STATE_CHECKINGVERSIONS = 14,
|
||||
LOGIN_STATE_15 = 15, // RESPONSE_CONNECTED
|
||||
LOGIN_STATE_DISCONNECTED = 16,
|
||||
LOGIN_STATE_SURVEY = 17,
|
||||
LOGIN_STATE_MAX = 18,
|
||||
};
|
||||
|
||||
enum NETMESSAGE {
|
||||
MSG_NULL_ACTION = 0x0000,
|
||||
CMSG_BOOTME = 0x0001,
|
||||
|
||||
@ -153,7 +153,11 @@ void ClientConnection::Connect() {
|
||||
this->m_errorCode = 7;
|
||||
this->m_statusComplete = 0;
|
||||
|
||||
// TODO
|
||||
// TODO LogConnectionStatus(this->m_statusCop, this->m_errorCode, 1)
|
||||
|
||||
if (this->m_connected) {
|
||||
this->Complete(1, 5);
|
||||
}
|
||||
|
||||
ClientServices::LoginConnection()->GetRealmList();
|
||||
}
|
||||
|
||||
@ -210,11 +210,7 @@ int32_t NetClient::HandleConnect() {
|
||||
int32_t NetClient::HandleData(uint32_t timeReceived, void* data, int32_t size) {
|
||||
// TODO push obj mgr
|
||||
|
||||
CDataStore msg;
|
||||
msg.m_data = static_cast<uint8_t*>(data);
|
||||
msg.m_size = size;
|
||||
msg.m_alloc = -1;
|
||||
msg.m_read = 0;
|
||||
CDataStore msg = CDataStore(static_cast<uint8_t*>(data), size);
|
||||
|
||||
this->ProcessMessage(timeReceived, &msg, 0);
|
||||
|
||||
@ -295,7 +291,7 @@ void NetClient::Send(CDataStore* msg) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto v4 = msg->m_size - msg->m_read;
|
||||
auto v4 = msg->Size() - msg->Tell();
|
||||
|
||||
if (!v4) {
|
||||
return;
|
||||
@ -358,12 +354,12 @@ void NetClient::WCDisconnected(WowConnection* conn, uint32_t timeStamp, NETCONNA
|
||||
|
||||
void NetClient::WCMessageReady(WowConnection* conn, uint32_t timeStamp, CDataStore* msg) {
|
||||
uint8_t* data;
|
||||
msg->GetDataInSitu(reinterpret_cast<void*&>(data), msg->m_size);
|
||||
msg->GetDataInSitu(reinterpret_cast<void*&>(data), msg->Size());
|
||||
|
||||
// TODO increment byte counter
|
||||
// SInterlockedExchangeAdd(this->m_bytesReceived, msg->m_size);
|
||||
|
||||
msg->m_read = 0;
|
||||
msg->Seek(0);
|
||||
|
||||
uint16_t msgId;
|
||||
msg->Get(msgId);
|
||||
@ -381,8 +377,8 @@ void NetClient::WCMessageReady(WowConnection* conn, uint32_t timeStamp, CDataSto
|
||||
}
|
||||
|
||||
if (conn == this->m_serverConnection && !this->m_suspended) {
|
||||
msg->m_read = msg->m_size;
|
||||
this->m_netEventQueue->AddEvent(EVENT_ID_NET_DATA, conn, this, data, msg->m_size);
|
||||
msg->Seek(msg->Size());
|
||||
this->m_netEventQueue->AddEvent(EVENT_ID_NET_DATA, conn, this, data, msg->Size());
|
||||
} else {
|
||||
conn->Disconnect();
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ int32_t RealmConnection::HandleAuthResponse(uint32_t msgId, uint32_t time, CData
|
||||
this->m_authenticated = 1;
|
||||
}
|
||||
|
||||
if (msg->Size() - msg->m_read >= 10 + (authResult == 27 ? 5 : 0)) {
|
||||
if (msg->Size() - msg->Tell() >= 10 + (authResult == 27 ? 5 : 0)) {
|
||||
msg->Get(this->m_billingTimeRemaining);
|
||||
msg->Get(this->m_billingFlags);
|
||||
msg->Get(this->m_billingTimeRested);
|
||||
|
||||
@ -478,11 +478,7 @@ void WowConnection::DoMessageReads() {
|
||||
this->m_readBytes += bytesRead;
|
||||
|
||||
if (size >= 0 && this->m_readBytes >= size) {
|
||||
CDataStore msg;
|
||||
msg.m_data = &this->m_readBuffer[headerSize];
|
||||
msg.m_alloc = -1;
|
||||
msg.m_size = size - headerSize;
|
||||
msg.m_read = 0;
|
||||
CDataStore msg = CDataStore(&this->m_readBuffer[headerSize], size - headerSize);
|
||||
|
||||
this->AcquireResponseRef();
|
||||
|
||||
|
||||
@ -2,11 +2,19 @@
|
||||
#include "net/connection/WowConnection.hpp"
|
||||
#include "net/grunt/ClientResponse.hpp"
|
||||
#include "net/grunt/Command.hpp"
|
||||
#include "net/login/Types.hpp"
|
||||
#include "net/srp/SRP6_Random.hpp"
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
#include <common/MD5.hpp>
|
||||
#include <storm/Error.hpp>
|
||||
#include <storm/Memory.hpp>
|
||||
#include <storm/String.hpp>
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
|
||||
#define SERVER_PUBLIC_KEY_LEN 32
|
||||
#define SALT_LEN 32
|
||||
#define PIN_SALT_LEN 16
|
||||
#define SERVER_PROOF_LEN 20
|
||||
|
||||
Grunt::Command<Grunt::ClientLink> Grunt::s_clientCommands[] = {
|
||||
{ Grunt::ClientLink::CMD_AUTH_LOGON_CHALLENGE, "ClientLink::CMD_AUTH_LOGON_CHALLENGE", &Grunt::ClientLink::CmdAuthLogonChallenge, 0 },
|
||||
@ -23,7 +31,7 @@ Grunt::ClientLink::ClientLink(Grunt::ClientResponse& clientResponse) {
|
||||
|
||||
this->m_clientResponse = &clientResponse;
|
||||
|
||||
this->SetState(0);
|
||||
this->SetState(STATE_NONE);
|
||||
|
||||
if (this->m_timer.m_thread.Valid()) {
|
||||
this->m_interval = 100;
|
||||
@ -37,9 +45,9 @@ void Grunt::ClientLink::Call() {
|
||||
|
||||
this->m_critSect.Enter();
|
||||
|
||||
if (this->m_state == 2) {
|
||||
if (this->m_state == STATE_CONNECTED) {
|
||||
this->m_clientResponse->GetLogonMethod();
|
||||
} else if (this->m_state == 6 && !this->m_clientResponse->OnlineIdle()) {
|
||||
} else if (this->m_state == STATE_AUTHENTICATED && !this->m_clientResponse->OnlineIdle()) {
|
||||
this->Disconnect();
|
||||
}
|
||||
|
||||
@ -47,27 +55,29 @@ void Grunt::ClientLink::Call() {
|
||||
}
|
||||
|
||||
int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
|
||||
if (msg.m_read > msg.m_size || msg.m_size - msg.m_read < 2) {
|
||||
uint8_t protocol;
|
||||
uint8_t result;
|
||||
|
||||
if (!CanRead(msg, sizeof(protocol) + sizeof(result))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t v30;
|
||||
msg.Get(v30);
|
||||
msg.Get(protocol);
|
||||
|
||||
if (v30 != 0) {
|
||||
if (protocol != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t result;
|
||||
msg.Get(result);
|
||||
|
||||
// Auth failure (success == 0)
|
||||
// Logon challenge failure (result != 0)
|
||||
|
||||
if (result != 0) {
|
||||
if (msg.m_read > msg.m_size) {
|
||||
if (!msg.IsValid()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
this->SetState(2);
|
||||
this->SetState(STATE_CONNECTED);
|
||||
|
||||
if (result >= GRUNT_RESULT_LAST) {
|
||||
// TODO WLog error
|
||||
@ -78,106 +88,103 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (msg.m_read > msg.m_size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (msg.m_size - msg.m_read < 33) {
|
||||
return 0;
|
||||
}
|
||||
// Logon challenge success (result == 0)
|
||||
|
||||
uint8_t* serverPublicKey;
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(serverPublicKey), 32);
|
||||
|
||||
uint8_t generatorLen;
|
||||
|
||||
if (!CanRead(msg, SERVER_PUBLIC_KEY_LEN + sizeof(generatorLen))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(serverPublicKey), SERVER_PUBLIC_KEY_LEN);
|
||||
msg.Get(generatorLen);
|
||||
|
||||
// TODO
|
||||
// if (!msg.Sub8CBBF0(v31 + 1)) {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
uint8_t* generator;
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(generator), generatorLen);
|
||||
|
||||
uint8_t largeSafePrimeLen;
|
||||
|
||||
if (!CanRead(msg, generatorLen + sizeof(largeSafePrimeLen))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(generator), generatorLen);
|
||||
msg.Get(largeSafePrimeLen);
|
||||
|
||||
// TODO
|
||||
// if (!msg.sub_8CBBF0(v32 + 48)) {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
uint8_t* largeSafePrime;
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(largeSafePrime), largeSafePrimeLen);
|
||||
|
||||
uint8_t* salt;
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(salt), 32);
|
||||
|
||||
uint8_t* versionChallenge;
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(versionChallenge), 16);
|
||||
|
||||
// TODO
|
||||
// if (!msg.Sub8CBBF0(1)) {
|
||||
// return 0;
|
||||
// }
|
||||
if (!CanRead(msg, largeSafePrimeLen + SALT_LEN + LOGIN_VERSION_CHALLENGE_LEN)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(largeSafePrime), largeSafePrimeLen);
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(salt), SALT_LEN);
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(versionChallenge), LOGIN_VERSION_CHALLENGE_LEN);
|
||||
|
||||
uint8_t logonFlags;
|
||||
|
||||
if (!CanRead(msg, sizeof(logonFlags))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.Get(logonFlags);
|
||||
|
||||
bool pinEnabled = logonFlags & 0x1;
|
||||
bool matrixEnabled = logonFlags & 0x2;
|
||||
bool tokenEnabled = logonFlags & 0x4;
|
||||
|
||||
// PIN (0x1)
|
||||
|
||||
uint32_t pinGridSeed = 0;
|
||||
uint8_t* pinSalt = nullptr;
|
||||
|
||||
if (pinEnabled) {
|
||||
if (!CanRead(msg, sizeof(pinGridSeed) + PIN_SALT_LEN)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.Get(pinGridSeed);
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(pinSalt), 16);
|
||||
}
|
||||
|
||||
// MATRIX (0x2)
|
||||
|
||||
uint8_t matrixWidth = 0;
|
||||
uint8_t matrixHeight = 0;
|
||||
uint8_t matrixDigitCount = 0;
|
||||
uint8_t matrixChallengeCount = 0;
|
||||
uint64_t matrixSeed = 0;
|
||||
|
||||
uint8_t tokenRequired = 0;
|
||||
|
||||
// PIN
|
||||
if (logonFlags & 0x1) {
|
||||
// TODO
|
||||
// if (!msg.Sub8CBBF0(20)) {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
msg.Get(pinGridSeed);
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(pinSalt), 16);
|
||||
}
|
||||
|
||||
// MATRIX
|
||||
if (logonFlags & 0x2) {
|
||||
// TODO
|
||||
/*
|
||||
if (msg.Sub8CBBF0(12)) {
|
||||
msg.Get(matrixWidth);
|
||||
msg.Get(matrixHeight);
|
||||
msg.Get(matrixDigitCount);
|
||||
msg.Get(matrixChallengeCount);
|
||||
msg.Get(matrixSeed);
|
||||
|
||||
if ((logonFlags & 0x2) && matrixChallengeCount == 0) {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
if (matrixEnabled) {
|
||||
if (!CanRead(msg, sizeof(matrixWidth) + sizeof(matrixHeight) + sizeof(matrixDigitCount) + sizeof(matrixChallengeCount) + sizeof(matrixSeed))) {
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
msg.Get(matrixWidth);
|
||||
msg.Get(matrixHeight);
|
||||
msg.Get(matrixDigitCount);
|
||||
msg.Get(matrixChallengeCount);
|
||||
msg.Get(matrixSeed);
|
||||
|
||||
if (matrixChallengeCount == 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// TOKEN (authenticator)
|
||||
if (logonFlags & 0x4) {
|
||||
// TODO
|
||||
// if (!msg.Sub8CBBF0(1)) {
|
||||
// return 0;
|
||||
// }
|
||||
// TOKEN (aka authenticator) (0x4)
|
||||
|
||||
uint8_t tokenRequired = 0;
|
||||
|
||||
if (tokenEnabled) {
|
||||
if (!CanRead(msg, sizeof(tokenRequired))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.Get(tokenRequired);
|
||||
}
|
||||
|
||||
if (msg.m_read > msg.m_size) {
|
||||
if (!msg.IsValid()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -188,41 +195,81 @@ int32_t Grunt::ClientLink::CmdAuthLogonChallenge(CDataStore& msg) {
|
||||
// OsSecureRandom(randomSeed, sizeof(randomSeed));
|
||||
SRP6_Random srpRandom(randomSeed, sizeof(randomSeed));
|
||||
|
||||
if (this->m_srpClient.CalculateProof(largeSafePrime, largeSafePrimeLen, generator, generatorLen, salt, 32, serverPublicKey, 32, srpRandom)) {
|
||||
this->SetState(2);
|
||||
// Calculate proof
|
||||
|
||||
auto calculateResult = this->m_srpClient.CalculateProof(
|
||||
largeSafePrime,
|
||||
largeSafePrimeLen,
|
||||
generator,
|
||||
generatorLen,
|
||||
salt,
|
||||
SALT_LEN,
|
||||
serverPublicKey,
|
||||
SERVER_PUBLIC_KEY_LEN,
|
||||
srpRandom
|
||||
);
|
||||
|
||||
// Calculate proof failure
|
||||
|
||||
if (calculateResult != SRP6_OK) {
|
||||
this->SetState(STATE_CONNECTED);
|
||||
|
||||
this->m_clientResponse->LogonResult(GRUNT_RESULT_5, nullptr, 0, 0);
|
||||
} else {
|
||||
this->SetState(4);
|
||||
this->m_clientResponse->SetPinInfo(logonFlags & 0x1, pinGridSeed, pinSalt);
|
||||
// TODO
|
||||
// this->m_clientResponse->SetMatrixInfo(logonFlags & 0x2, matrixWidth, matrixHeight, matrixDigitCount, matrixDigitCount, 0, matrixChallengeCount, matrixSeed, this->m_srpClient.buf20, 40);
|
||||
this->m_clientResponse->SetTokenInfo(logonFlags & 0x4, tokenRequired);
|
||||
this->m_clientResponse->GetVersionProof(versionChallenge);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Calculate proof success
|
||||
|
||||
this->SetState(STATE_CONNECT_VERSION);
|
||||
|
||||
this->m_clientResponse->SetPinInfo(pinEnabled, pinGridSeed, pinSalt);
|
||||
|
||||
this->m_clientResponse->SetMatrixInfo(
|
||||
matrixEnabled,
|
||||
matrixWidth,
|
||||
matrixHeight,
|
||||
matrixDigitCount,
|
||||
matrixDigitCount,
|
||||
false,
|
||||
matrixChallengeCount,
|
||||
matrixSeed,
|
||||
this->m_srpClient.sessionKey,
|
||||
40
|
||||
);
|
||||
|
||||
this->m_clientResponse->SetTokenInfo(tokenEnabled, tokenRequired);
|
||||
|
||||
this->m_clientResponse->GetVersionProof(versionChallenge);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
|
||||
if (msg.m_read >= msg.m_size) {
|
||||
if (!msg.IsValid()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (msg.IsRead()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t result;
|
||||
msg.Get(result);
|
||||
|
||||
// Authentication failure (result for success is 0)
|
||||
// Logon proof failure (result != 0)
|
||||
|
||||
if (result != 0) {
|
||||
if (result == 4) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (msg.m_read > msg.m_size) {
|
||||
if (!msg.IsValid()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (result != 10) {
|
||||
this->SetState(2);
|
||||
this->SetState(STATE_CONNECTED);
|
||||
|
||||
// TODO range check on result
|
||||
|
||||
@ -232,78 +279,167 @@ int32_t Grunt::ClientLink::CmdAuthLogonProof(CDataStore& msg) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Authentication success
|
||||
if (msg.m_read <= msg.m_size && msg.m_size - msg.m_read >= 24) {
|
||||
void* serverProof;
|
||||
msg.GetDataInSitu(serverProof, 20);
|
||||
// Logon proof success (result == 0)
|
||||
|
||||
uint32_t accountFlags = 0x0;
|
||||
msg.Get(accountFlags);
|
||||
uint8_t* serverProof;
|
||||
uint32_t accountFlags = 0x0;
|
||||
uint32_t surveyID;
|
||||
|
||||
uint32_t surveyID;
|
||||
msg.Get(surveyID);
|
||||
|
||||
if (msg.m_read <= msg.m_size && msg.m_size - msg.m_read >= 2) {
|
||||
uint16_t logonFlags = 0x0;
|
||||
msg.Get(logonFlags);
|
||||
|
||||
if (msg.m_read <= msg.m_size) {
|
||||
if (this->m_srpClient.VerifyServerProof(static_cast<uint8_t*>(serverProof), 20)) {
|
||||
this->SetState(2);
|
||||
this->m_clientResponse->LogonResult(Grunt::GRUNT_RESULT_11, nullptr, 0, 0);
|
||||
} else {
|
||||
this->m_accountFlags = accountFlags;
|
||||
// TODO
|
||||
// this->uint94 = 0;
|
||||
this->m_surveyID = surveyID;
|
||||
|
||||
this->SetState(6);
|
||||
this->m_clientResponse->LogonResult(Grunt::GRUNT_RESULT_0, this->m_srpClient.sessionKey, 40, logonFlags);
|
||||
}
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
if (!CanRead(msg, SERVER_PROOF_LEN + sizeof(accountFlags))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(serverProof), SERVER_PROOF_LEN);
|
||||
msg.Get(accountFlags);
|
||||
msg.Get(surveyID);
|
||||
|
||||
uint16_t logonFlags = 0x0;
|
||||
|
||||
if (!CanRead(msg, sizeof(logonFlags))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.Get(logonFlags);
|
||||
|
||||
if (!msg.IsValid()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Verify server proof
|
||||
|
||||
auto verifyResult = this->m_srpClient.VerifyServerProof(serverProof, SERVER_PROOF_LEN);
|
||||
|
||||
// Verify server proof failure
|
||||
|
||||
if (verifyResult != SRP6_OK) {
|
||||
this->SetState(STATE_CONNECTED);
|
||||
|
||||
this->m_clientResponse->LogonResult(Result::GRUNT_RESULT_11, nullptr, 0, 0x0);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Verify server proof success
|
||||
|
||||
this->m_accountFlags = accountFlags;
|
||||
// TODO
|
||||
// this->uint94 = 0;
|
||||
this->m_surveyID = surveyID;
|
||||
|
||||
this->SetState(STATE_AUTHENTICATED);
|
||||
|
||||
this->m_clientResponse->LogonResult(Result::SUCCESS, this->m_srpClient.sessionKey, 40, logonFlags);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
int32_t Grunt::ClientLink::CmdAuthReconnectChallenge(CDataStore& msg) {
|
||||
// TODO
|
||||
return 0;
|
||||
uint8_t result;
|
||||
uint8_t* reconnectChallenge;
|
||||
uint8_t* versionChallenge;
|
||||
|
||||
if (!CanRead(msg, sizeof(result) + LOGIN_RECONNECT_CHALLENGE_LEN)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.Get(result);
|
||||
|
||||
// Reconnect challenge failure (result != 0)
|
||||
|
||||
if (result != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Reconnect challenge success (result == 0)
|
||||
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(reconnectChallenge), LOGIN_RECONNECT_CHALLENGE_LEN);
|
||||
msg.GetDataInSitu(reinterpret_cast<void*&>(versionChallenge), LOGIN_VERSION_CHALLENGE_LEN);
|
||||
|
||||
if (!msg.IsValid()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// During reconnects, the client appears to overwrite the first half of m_serverPublicKey with
|
||||
// the received reconnect challenge
|
||||
memcpy(this->m_serverPublicKey, reconnectChallenge, LOGIN_RECONNECT_CHALLENGE_LEN);
|
||||
|
||||
this->SetState(STATE_RECONNECT_VERSION);
|
||||
|
||||
this->m_clientResponse->GetVersionProof(versionChallenge);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
int32_t Grunt::ClientLink::CmdAuthReconnectProof(CDataStore& msg) {
|
||||
// TODO
|
||||
return 0;
|
||||
if (!msg.IsValid()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (msg.IsRead()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t result;
|
||||
msg.Get(result);
|
||||
|
||||
if (!msg.IsValid()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Reconnect proof failure (result != 0)
|
||||
|
||||
if (result != 0) {
|
||||
this->SetState(STATE_CONNECTED);
|
||||
|
||||
if (result >= 33) {
|
||||
result = -1;
|
||||
}
|
||||
|
||||
this->m_clientResponse->ReconnectResult(static_cast<Grunt::Result>(result), nullptr, 0, 0x0);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Reconnect proof success (result == 0)
|
||||
|
||||
uint16_t reconnectFlags = 0x0;
|
||||
|
||||
if (!CanRead(msg, sizeof(reconnectFlags))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg.Get(reconnectFlags);
|
||||
|
||||
this->SetState(STATE_AUTHENTICATED);
|
||||
|
||||
this->m_clientResponse->ReconnectResult(Result::SUCCESS, this->m_reconnectSessionKey, 40, reconnectFlags);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
int32_t Grunt::ClientLink::CmdRealmList(CDataStore& msg) {
|
||||
if (msg.m_read > msg.m_size || msg.m_size - msg.m_read < 2) {
|
||||
if (msg.Tell() > msg.Size() || msg.Size() - msg.Tell() < 2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint16_t size;
|
||||
msg.Get(size);
|
||||
|
||||
if (msg.m_read > msg.m_size || msg.m_size - msg.m_read < size) {
|
||||
if (msg.Tell() > msg.Size() || msg.Size() - msg.Tell() < size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t startData = msg.m_read;
|
||||
uint32_t startData = msg.Tell();
|
||||
|
||||
uint32_t padding;
|
||||
msg.Get(padding);
|
||||
|
||||
uint32_t startList = msg.m_read;
|
||||
uint32_t startList = msg.Tell();
|
||||
|
||||
uint16_t count;
|
||||
msg.Get(count);
|
||||
|
||||
for (uint32_t i = 0; i < count && msg.m_read < msg.m_size; i++) {
|
||||
for (uint32_t i = 0; i < count && msg.Tell() < msg.Size(); i++) {
|
||||
uint8_t realmType;
|
||||
msg.Get(realmType);
|
||||
|
||||
@ -350,13 +486,13 @@ int32_t Grunt::ClientLink::CmdRealmList(CDataStore& msg) {
|
||||
uint16_t padding2;
|
||||
msg.Get(padding2);
|
||||
|
||||
if (msg.m_read <= msg.m_size && msg.m_read - startData == size) {
|
||||
uint32_t endData = msg.m_read;
|
||||
msg.m_read = startList;
|
||||
if (msg.Tell() <= msg.Size() && msg.Tell() - startData == size) {
|
||||
uint32_t endData = msg.Tell();
|
||||
msg.Seek(startList);
|
||||
|
||||
this->m_clientResponse->RealmListResult(&msg);
|
||||
|
||||
msg.m_read = endData;
|
||||
msg.Seek(endData);
|
||||
|
||||
return 2;
|
||||
}
|
||||
@ -374,12 +510,12 @@ int32_t Grunt::ClientLink::CmdXferInitiate(CDataStore& msg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Grunt::ClientLink::Connect(const char* a2) {
|
||||
void Grunt::ClientLink::Connect(const char* loginServer) {
|
||||
if (this->m_state) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->SetState(1);
|
||||
this->SetState(STATE_CONNECTING);
|
||||
|
||||
auto connectionMem = SMemAlloc(sizeof(WowConnection), __FILE__, __LINE__, 0x0);
|
||||
auto connection = new (connectionMem) WowConnection(this, nullptr);
|
||||
@ -387,11 +523,11 @@ void Grunt::ClientLink::Connect(const char* a2) {
|
||||
this->m_connection = connection;
|
||||
this->m_connection->SetType(WOWC_TYPE_STREAM);
|
||||
|
||||
auto port = SStrChr(a2, ':');
|
||||
auto port = SStrChr(loginServer, ':');
|
||||
if (port) {
|
||||
this->m_connection->Connect(a2, 5000);
|
||||
this->m_connection->Connect(loginServer, 5000);
|
||||
} else {
|
||||
this->m_connection->Connect(a2, 3724, 5000);
|
||||
this->m_connection->Connect(loginServer, 3724, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -406,7 +542,7 @@ void Grunt::ClientLink::Disconnect() {
|
||||
}
|
||||
|
||||
void Grunt::ClientLink::GetRealmList() {
|
||||
if (this->m_state != 6) {
|
||||
if (this->m_state != STATE_AUTHENTICATED) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -424,7 +560,7 @@ void Grunt::ClientLink::GetRealmList() {
|
||||
}
|
||||
|
||||
void Grunt::ClientLink::LogonNewSession(const Grunt::ClientLink::Logon& logon) {
|
||||
this->SetState(3);
|
||||
this->SetState(STATE_AUTH_CHALLENGE);
|
||||
|
||||
SStrCopy(this->m_accountName, logon.accountName, sizeof(this->m_accountName));
|
||||
SStrUpper(this->m_accountName);
|
||||
@ -456,8 +592,32 @@ void Grunt::ClientLink::LogonNewSession(const Grunt::ClientLink::Logon& logon) {
|
||||
this->Send(clientChallenge);
|
||||
}
|
||||
|
||||
void Grunt::ClientLink::LogonStoredSession(const Grunt::ClientLink::Logon& logon) {
|
||||
this->SetState(STATE_AUTH_CHALLENGE);
|
||||
|
||||
SStrCopy(this->m_accountName, logon.accountName, sizeof(this->m_accountName));
|
||||
SStrUpper(this->m_accountName);
|
||||
|
||||
// logon.password is copy of session key from original session
|
||||
memcpy(this->m_reconnectSessionKey, logon.password, sizeof(this->m_reconnectSessionKey));
|
||||
|
||||
CDataStoreCache<1024> clientChallenge;
|
||||
|
||||
uint8_t opcode = CMD_AUTH_RECONNECT_CHALLENGE;
|
||||
clientChallenge.Put(opcode);
|
||||
|
||||
uint8_t protocol = 8;
|
||||
clientChallenge.Put(protocol);
|
||||
|
||||
this->PackLogon(clientChallenge, logon);
|
||||
|
||||
clientChallenge.Finalize();
|
||||
|
||||
this->Send(clientChallenge);
|
||||
}
|
||||
|
||||
void Grunt::ClientLink::PackLogon(CDataStore& msg, const Logon& logon) {
|
||||
uint32_t startPos = msg.m_size;
|
||||
uint32_t startPos = msg.Size();
|
||||
uint16_t tmpSize = 0;
|
||||
msg.Put(tmpSize);
|
||||
|
||||
@ -477,10 +637,12 @@ void Grunt::ClientLink::PackLogon(CDataStore& msg, const Logon& logon) {
|
||||
msg.Put(accountNameLen);
|
||||
msg.PutData(this->m_accountName, accountNameLen);
|
||||
|
||||
msg.Set(startPos, msg.m_size - startPos - 2);
|
||||
msg.Set(startPos, msg.Size() - startPos - 2);
|
||||
}
|
||||
|
||||
void Grunt::ClientLink::ProveVersion(const uint8_t* versionChecksum) {
|
||||
STORM_ASSERT(this->m_state == STATE_CONNECT_VERSION || this->m_state == STATE_RECONNECT_VERSION);
|
||||
|
||||
CDataStoreCache<1024> command;
|
||||
|
||||
// TODO cd keys
|
||||
@ -489,18 +651,29 @@ void Grunt::ClientLink::ProveVersion(const uint8_t* versionChecksum) {
|
||||
// cdKeys.int0 = 0;
|
||||
// }
|
||||
|
||||
if (this->m_state == 4) {
|
||||
if (this->m_state == STATE_CONNECT_VERSION) {
|
||||
command.Put(static_cast<uint8_t>(CMD_AUTH_LOGON_PROOF));
|
||||
|
||||
SHA1_CONTEXT sha1;
|
||||
|
||||
// Client public key (A)
|
||||
|
||||
command.PutData(this->m_srpClient.clientPublicKey, sizeof(this->m_srpClient.clientPublicKey));
|
||||
|
||||
// Client auth proof (M1)
|
||||
|
||||
command.PutData(this->m_srpClient.clientProof, sizeof(this->m_srpClient.clientProof));
|
||||
|
||||
uint8_t versionProof[SHA1_DIGEST_SIZE];
|
||||
SHA1_CONTEXT ctx;
|
||||
SHA1_Init(&ctx);
|
||||
SHA1_Update(&ctx, this->m_srpClient.clientPublicKey, sizeof(this->m_srpClient.clientPublicKey));
|
||||
SHA1_Update(&ctx, versionChecksum, 20);
|
||||
SHA1_Final(versionProof, &ctx);
|
||||
command.PutData(versionProof, sizeof(versionProof));
|
||||
// Client version proof
|
||||
|
||||
uint8_t clientVersionProof[SHA1_DIGEST_SIZE];
|
||||
|
||||
SHA1_Init(&sha1);
|
||||
SHA1_Update(&sha1, this->m_srpClient.clientPublicKey, sizeof(this->m_srpClient.clientPublicKey));
|
||||
SHA1_Update(&sha1, versionChecksum, LOGIN_VERSION_CHECKSUM_LEN);
|
||||
SHA1_Final(clientVersionProof, &sha1);
|
||||
|
||||
command.PutData(clientVersionProof, sizeof(clientVersionProof));
|
||||
|
||||
// TODO cd keys
|
||||
command.Put(static_cast<uint8_t>(0));
|
||||
@ -509,7 +682,54 @@ void Grunt::ClientLink::ProveVersion(const uint8_t* versionChecksum) {
|
||||
uint8_t authFlags = 0x0;
|
||||
command.Put(authFlags);
|
||||
} else {
|
||||
command.Put(static_cast<uint8_t>(CMD_AUTH_RECONNECT_PROOF));
|
||||
|
||||
MD5_CTX md5;
|
||||
SHA1_CONTEXT sha1;
|
||||
|
||||
// Client salt
|
||||
|
||||
uint8_t clientSalt[16];
|
||||
|
||||
MD5Init(&md5);
|
||||
MD5Update(&md5, reinterpret_cast<uint8_t*>(this->m_accountName), SStrLen(this->m_accountName));
|
||||
char randomSeed[16];
|
||||
// TODO
|
||||
// OsSecureRandom(randomSeed, sizeof(randomSeed));
|
||||
MD5Update(&md5, reinterpret_cast<uint8_t*>(randomSeed), sizeof(randomSeed));
|
||||
MD5Final(clientSalt, &md5);
|
||||
|
||||
command.PutData(clientSalt, sizeof(clientSalt));
|
||||
|
||||
// Client auth proof
|
||||
|
||||
uint8_t clientAuthProof[SHA1_DIGEST_SIZE];
|
||||
|
||||
// Stored in m_serverPublicKey after receiving CMD_AUTH_RECONNECT_CHALLENGE
|
||||
auto reconnectChallenge = reinterpret_cast<uint8_t*>(this->m_serverPublicKey);
|
||||
|
||||
SHA1_Init(&sha1);
|
||||
SHA1_Update(&sha1, reinterpret_cast<uint8_t*>(this->m_accountName), SStrLen(this->m_accountName));
|
||||
SHA1_Update(&sha1, clientSalt, sizeof(clientSalt));
|
||||
SHA1_Update(&sha1, reconnectChallenge, LOGIN_RECONNECT_CHALLENGE_LEN);
|
||||
SHA1_Update(&sha1, this->m_reconnectSessionKey, sizeof(this->m_reconnectSessionKey));
|
||||
SHA1_Final(clientAuthProof, &sha1);
|
||||
|
||||
command.PutData(clientAuthProof, sizeof(clientAuthProof));
|
||||
|
||||
// Client version proof
|
||||
|
||||
uint8_t clientVersionProof[SHA1_DIGEST_SIZE];
|
||||
|
||||
SHA1_Init(&sha1);
|
||||
SHA1_Update(&sha1, clientSalt, sizeof(clientSalt));
|
||||
SHA1_Update(&sha1, versionChecksum, LOGIN_VERSION_CHECKSUM_LEN);
|
||||
SHA1_Final(clientVersionProof, &sha1);
|
||||
|
||||
command.PutData(clientVersionProof, sizeof(clientVersionProof));
|
||||
|
||||
// TODO cd keys
|
||||
command.Put(static_cast<uint8_t>(0));
|
||||
}
|
||||
|
||||
command.Finalize();
|
||||
@ -522,15 +742,15 @@ void Grunt::ClientLink::Send(CDataStore& msg) {
|
||||
|
||||
if (this->m_connection) {
|
||||
void* data;
|
||||
msg.GetDataInSitu(data, msg.m_size);
|
||||
msg.GetDataInSitu(data, msg.Size());
|
||||
|
||||
this->m_connection->SendRaw(static_cast<uint8_t*>(data), msg.m_size, false);
|
||||
this->m_connection->SendRaw(static_cast<uint8_t*>(data), msg.Size(), false);
|
||||
}
|
||||
|
||||
this->m_critSect.Leave();
|
||||
}
|
||||
|
||||
void Grunt::ClientLink::SetState(int32_t state) {
|
||||
void Grunt::ClientLink::SetState(STATE state) {
|
||||
this->m_critSect.Enter();
|
||||
|
||||
this->m_state = state;
|
||||
@ -545,7 +765,7 @@ void Grunt::ClientLink::WCCantConnect(WowConnection* conn, uint32_t timeStamp, N
|
||||
void Grunt::ClientLink::WCConnected(WowConnection* conn, WowConnection* inbound, uint32_t timeStamp, const NETCONNADDR* addr) {
|
||||
this->m_critSect.Enter();
|
||||
|
||||
this->SetState(2);
|
||||
this->SetState(STATE_CONNECTED);
|
||||
|
||||
int32_t connected = this->m_clientResponse->Connected(addr->peerAddr);
|
||||
|
||||
@ -565,15 +785,15 @@ void Grunt::ClientLink::WCDataReady(WowConnection* conn, uint32_t timeStamp, uin
|
||||
|
||||
uint32_t pos = 0;
|
||||
if (Grunt::Command<Grunt::ClientLink>::Process(this->m_datastore1B0, Grunt::s_clientCommands, 7u, *this, pos)) {
|
||||
auto remainingBytes = this->m_datastore1B0.m_size - pos;
|
||||
this->m_datastore1B0.m_read = pos;
|
||||
auto remainingBytes = this->m_datastore1B0.Size() - pos;
|
||||
this->m_datastore1B0.Seek(pos);
|
||||
void* remainingData;
|
||||
this->m_datastore1B0.GetDataInSitu(remainingData, remainingBytes);
|
||||
this->m_datastore1B0.m_read = -1;
|
||||
this->m_datastore1B0.Seek(-1);
|
||||
this->m_datastore1B0.Reset();
|
||||
this->m_datastore1B0.PutData(remainingData, remainingBytes);
|
||||
} else {
|
||||
this->m_datastore1B0.m_read = -1;
|
||||
this->m_datastore1B0.Seek(-1);
|
||||
this->m_datastore1B0.Reset();
|
||||
this->Disconnect();
|
||||
}
|
||||
|
||||
@ -25,6 +25,16 @@ class Grunt::ClientLink : public WowConnectionResponse, Grunt::Pending, Grunt::T
|
||||
CMD_XFER_DATA = 49,
|
||||
};
|
||||
|
||||
enum STATE {
|
||||
STATE_NONE = 0,
|
||||
STATE_CONNECTING = 1,
|
||||
STATE_CONNECTED = 2,
|
||||
STATE_AUTH_CHALLENGE = 3,
|
||||
STATE_CONNECT_VERSION = 4,
|
||||
STATE_RECONNECT_VERSION = 5,
|
||||
STATE_AUTHENTICATED = 6
|
||||
};
|
||||
|
||||
struct Logon {
|
||||
const char* accountName;
|
||||
const char* password;
|
||||
@ -43,7 +53,7 @@ class Grunt::ClientLink : public WowConnectionResponse, Grunt::Pending, Grunt::T
|
||||
uint32_t m_accountFlags = 0x0;
|
||||
uint32_t m_surveyID = 0;
|
||||
uint32_t m_clientIP = 0;
|
||||
int32_t m_state;
|
||||
STATE m_state;
|
||||
SRP6_Client m_srpClient;
|
||||
SCritSect m_critSect;
|
||||
CDataStore m_datastore1B0;
|
||||
@ -51,6 +61,7 @@ class Grunt::ClientLink : public WowConnectionResponse, Grunt::Pending, Grunt::T
|
||||
ClientResponse* m_clientResponse;
|
||||
char m_accountName[1280];
|
||||
char m_serverPublicKey[32];
|
||||
uint8_t m_reconnectSessionKey[40];
|
||||
|
||||
// Virtual member functions
|
||||
virtual void WCMessageReady(WowConnection *conn, uint32_t timeStamp, CDataStore* msg) {};
|
||||
@ -68,14 +79,15 @@ class Grunt::ClientLink : public WowConnectionResponse, Grunt::Pending, Grunt::T
|
||||
int32_t CmdRealmList(CDataStore& msg);
|
||||
int32_t CmdXferData(CDataStore& msg);
|
||||
int32_t CmdXferInitiate(CDataStore& msg);
|
||||
void Connect(const char* a2);
|
||||
void Connect(const char* loginServer);
|
||||
void Disconnect();
|
||||
void GetRealmList();
|
||||
void LogonNewSession(const Logon& logon);
|
||||
void LogonStoredSession(const Logon& logon);
|
||||
void PackLogon(CDataStore& msg, const Logon& logon);
|
||||
void ProveVersion(const uint8_t* versionChecksum);
|
||||
void Send(CDataStore& msg);
|
||||
void SetState(int32_t state);
|
||||
void SetState(STATE state);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -2,10 +2,12 @@
|
||||
#define NET_GRUNT_CLIENT_RESPONSE_HPP
|
||||
|
||||
#include "net/grunt/Grunt.hpp"
|
||||
#include "net/Types.hpp"
|
||||
#include "net/login/Types.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
class CDataStore;
|
||||
class LoginResponse;
|
||||
struct NETADDR;
|
||||
|
||||
class Grunt::ClientResponse {
|
||||
public:
|
||||
@ -13,15 +15,18 @@ class Grunt::ClientResponse {
|
||||
virtual bool OnlineIdle() = 0;
|
||||
virtual void GetLogonMethod() = 0;
|
||||
virtual void GetVersionProof(const uint8_t* versionChallenge) = 0;
|
||||
virtual void SetPinInfo(bool enabled, uint32_t a3, const uint8_t* a4) = 0;
|
||||
virtual void SetMatrixInfo(bool enabled, uint8_t a3, uint8_t a4, uint8_t a5, uint8_t a6, bool a7, uint8_t a8, uint64_t a9, const uint8_t* a10, uint32_t a11) = 0;
|
||||
virtual void SetPinInfo(bool enabled, uint32_t gridSeed, const uint8_t* salt) = 0;
|
||||
virtual void SetMatrixInfo(bool enabled, uint8_t width, uint8_t height, uint8_t a5, uint8_t a6, bool a7, uint8_t challengeCount, uint64_t seed, const uint8_t* sessionKey, uint32_t a11) = 0;
|
||||
virtual void SetTokenInfo(bool enabled, uint8_t required) = 0;
|
||||
virtual void LogonResult(Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags) = 0;
|
||||
virtual void ReconnectResult(Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags) = 0;
|
||||
virtual void RealmListResult(CDataStore* msg) = 0;
|
||||
virtual LOGIN_STATE NextSecurityState(LOGIN_STATE state) = 0;
|
||||
virtual int32_t GetServerId() = 0;
|
||||
virtual const uint8_t* GetVersionChallenge() = 0;
|
||||
virtual void GetRealmList() = 0;
|
||||
virtual void Logon(const char* a2, const char* a3) = 0;
|
||||
virtual void Reconnect() = 0;
|
||||
virtual void Logon(const char* loginServer, const char* loginPortal) = 0;
|
||||
virtual void ProveVersion(const uint8_t* versionChecksum) = 0;
|
||||
virtual void Logoff() = 0;
|
||||
virtual void Init(LoginResponse* loginResponse) = 0;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define NET_GRUNT_COMMAND_HPP
|
||||
|
||||
#include "net/Grunt.hpp"
|
||||
#include "net/grunt/Util.hpp"
|
||||
|
||||
template <class T>
|
||||
class Grunt::Command {
|
||||
@ -19,7 +20,7 @@ class Grunt::Command {
|
||||
template <class T>
|
||||
int32_t Grunt::Command<T>::Process(CDataStore& msg, Command<T>* commands, uint32_t commandCount, T& a4, uint32_t& pos) {
|
||||
while (true) {
|
||||
if (!msg.Sub8CBBF0(1)) {
|
||||
if (!CanRead(msg, 1)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -50,7 +51,7 @@ int32_t Grunt::Command<T>::Process(CDataStore& msg, Command<T>* commands, uint32
|
||||
}
|
||||
|
||||
if (result == 2) {
|
||||
pos = msg.m_read;
|
||||
pos = msg.Tell();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,40 +12,41 @@ namespace Grunt {
|
||||
extern Command<ClientLink> s_clientCommands[];
|
||||
|
||||
enum Result {
|
||||
GRUNT_RESULT_0 = 0,
|
||||
GRUNT_RESULT_1 = 1,
|
||||
GRUNT_RESULT_2 = 2,
|
||||
GRUNT_RESULT_3 = 3,
|
||||
GRUNT_RESULT_4 = 4,
|
||||
GRUNT_RESULT_5 = 5,
|
||||
GRUNT_RESULT_6 = 6,
|
||||
GRUNT_RESULT_7 = 7,
|
||||
GRUNT_RESULT_8 = 8,
|
||||
GRUNT_RESULT_9 = 9,
|
||||
GRUNT_RESULT_10 = 10,
|
||||
GRUNT_RESULT_11 = 11,
|
||||
GRUNT_RESULT_12 = 12,
|
||||
GRUNT_RESULT_13 = 13,
|
||||
GRUNT_RESULT_14 = 14,
|
||||
GRUNT_RESULT_15 = 15,
|
||||
GRUNT_RESULT_16 = 16,
|
||||
GRUNT_RESULT_17 = 17,
|
||||
GRUNT_RESULT_18 = 18,
|
||||
GRUNT_RESULT_19 = 19,
|
||||
GRUNT_RESULT_20 = 20,
|
||||
GRUNT_RESULT_21 = 21,
|
||||
GRUNT_RESULT_22 = 22,
|
||||
GRUNT_RESULT_23 = 23,
|
||||
GRUNT_RESULT_24 = 24,
|
||||
GRUNT_RESULT_25 = 25,
|
||||
GRUNT_RESULT_26 = 26,
|
||||
GRUNT_RESULT_27 = 27,
|
||||
GRUNT_RESULT_28 = 28,
|
||||
GRUNT_RESULT_29 = 29,
|
||||
GRUNT_RESULT_30 = 30,
|
||||
GRUNT_RESULT_31 = 31,
|
||||
GRUNT_RESULT_32 = 32,
|
||||
SUCCESS = 0,
|
||||
GRUNT_RESULT_1 = 1,
|
||||
GRUNT_RESULT_2 = 2,
|
||||
BANNED = 3,
|
||||
GRUNT_RESULT_4 = 4,
|
||||
GRUNT_RESULT_5 = 5,
|
||||
ALREADYONLINE = 6,
|
||||
NOTIME = 7,
|
||||
DBBUSY = 8,
|
||||
BADVERSION = 9,
|
||||
DOWNLOADFILE = 10,
|
||||
GRUNT_RESULT_11 = 11,
|
||||
SUSPENDED = 12,
|
||||
GRUNT_RESULT_13 = 13,
|
||||
SUCCESS_SURVEY = 14,
|
||||
PARENTALCONTROL = 15,
|
||||
LOCKED_ENFORCED = 16,
|
||||
TRIAL_EXPIRED = 17,
|
||||
ACCOUNT_CONVERTED = 18,
|
||||
GRUNT_RESULT_19 = 19,
|
||||
GRUNT_RESULT_20 = 20,
|
||||
GRUNT_RESULT_21 = 21,
|
||||
CHARGEBACK = 22,
|
||||
IGR_WITHOUT_BNET = 23,
|
||||
GAME_ACCOUNT_LOCKED = 24,
|
||||
UNLOCKABLE_LOCK = 25,
|
||||
GRUNT_RESULT_26 = 26,
|
||||
GRUNT_RESULT_27 = 27,
|
||||
GRUNT_RESULT_28 = 28,
|
||||
GRUNT_RESULT_29 = 29,
|
||||
GRUNT_RESULT_30 = 30,
|
||||
GRUNT_RESULT_31 = 31,
|
||||
CONVERSION_REQUIRED = 32,
|
||||
GRUNT_RESULT_LAST,
|
||||
DISCONNECTED = 255
|
||||
};
|
||||
|
||||
extern const char* g_LoginResultStringNames[];
|
||||
|
||||
4
src/net/grunt/Types.hpp
Normal file
4
src/net/grunt/Types.hpp
Normal file
@ -0,0 +1,4 @@
|
||||
#ifndef NET_GRUNT_TYPES_HPP
|
||||
#define NET_GRUNT_TYPES_HPP
|
||||
|
||||
#endif
|
||||
7
src/net/grunt/Util.cpp
Normal file
7
src/net/grunt/Util.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include "net/grunt/Util.hpp"
|
||||
#include <common/DataStore.hpp>
|
||||
|
||||
// Invented name. Appears to be private to Grunt. Found at 8CBBF0 in 3.3.5a (Windows).
|
||||
bool CanRead(const CDataStore& msg, uint32_t bytes) {
|
||||
return msg.IsValid() && msg.Size() - msg.Tell() >= bytes;
|
||||
}
|
||||
10
src/net/grunt/Util.hpp
Normal file
10
src/net/grunt/Util.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef NET_GRUNT_UTIL_HPP
|
||||
#define NET_GRUNT_UTIL_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class CDataStore;
|
||||
|
||||
bool CanRead(const CDataStore& msg, uint32_t bytes);
|
||||
|
||||
#endif
|
||||
@ -13,7 +13,7 @@ GruntLogin::~GruntLogin() {
|
||||
bool GruntLogin::Connected(const NETADDR& addr) {
|
||||
this->m_loggedOn = true;
|
||||
|
||||
this->m_loginResponse->m_loginState = LOGIN_STATE_15;
|
||||
this->m_loginResponse->m_loginState = LOGIN_STATE_CONNECTED;
|
||||
this->m_loginResponse->m_loginResult = LOGIN_OK;
|
||||
|
||||
char addrStr[32];
|
||||
@ -21,7 +21,7 @@ bool GruntLogin::Connected(const NETADDR& addr) {
|
||||
// OsNetAddrToStr(addr, addrStr, sizeof(addrStr));
|
||||
|
||||
this->m_loginResponse->UpdateLoginStatus(
|
||||
LOGIN_STATE_15,
|
||||
LOGIN_STATE_CONNECTED,
|
||||
LOGIN_OK,
|
||||
addrStr,
|
||||
0x0
|
||||
@ -60,7 +60,10 @@ void GruntLogin::GetLogonMethod() {
|
||||
// TODO
|
||||
|
||||
if (this->IsReconnect()) {
|
||||
// TODO
|
||||
logon.accountName = this->m_accountName;
|
||||
logon.password = reinterpret_cast<const char*>(this->m_sessionKey);
|
||||
|
||||
this->m_clientLink->LogonStoredSession(logon);
|
||||
} else if (this->m_password) {
|
||||
this->m_loginResponse->UpdateLoginStatus(
|
||||
LOGIN_STATE_AUTHENTICATING,
|
||||
@ -89,11 +92,19 @@ int32_t GruntLogin::GetServerId() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const uint8_t* GruntLogin::GetVersionChallenge() {
|
||||
return this->m_versionChallenge;
|
||||
}
|
||||
|
||||
void GruntLogin::GetVersionProof(const uint8_t* versionChallenge) {
|
||||
if (this->IsReconnect()) {
|
||||
// TODO
|
||||
// During reconnect, version challenge is ignored and version checksum is zeroed out
|
||||
uint8_t versionChecksum[LOGIN_VERSION_CHECKSUM_LEN] = {};
|
||||
|
||||
this->m_clientLink->ProveVersion(versionChecksum);
|
||||
} else {
|
||||
memcpy(this->m_versionChallenge, versionChallenge, sizeof(this->m_versionChallenge));
|
||||
|
||||
LOGIN_STATE nextState = this->NextSecurityState(LOGIN_STATE_FIRST_SECURITY);
|
||||
|
||||
this->m_loginResponse->UpdateLoginStatus(
|
||||
@ -114,10 +125,14 @@ void GruntLogin::Init(LoginResponse* loginResponse) {
|
||||
}
|
||||
|
||||
void GruntLogin::Logoff() {
|
||||
// TODO
|
||||
if (!this->m_loggedOn) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->m_clientLink->Disconnect();
|
||||
}
|
||||
|
||||
void GruntLogin::Logon(const char* a2, const char* a3) {
|
||||
void GruntLogin::Logon(const char* loginServer, const char* loginPortal) {
|
||||
if (this->m_loggedOn) {
|
||||
return;
|
||||
}
|
||||
@ -126,6 +141,12 @@ void GruntLogin::Logon(const char* a2, const char* a3) {
|
||||
|
||||
// TODO
|
||||
|
||||
this->m_pinEnabled = false;
|
||||
this->m_matrixEnabled = false;
|
||||
this->m_tokenEnabled = false;
|
||||
|
||||
// TODO
|
||||
|
||||
this->m_loginResponse->UpdateLoginStatus(
|
||||
LOGIN_STATE_CONNECTING,
|
||||
LOGIN_OK,
|
||||
@ -133,25 +154,28 @@ void GruntLogin::Logon(const char* a2, const char* a3) {
|
||||
0x0
|
||||
);
|
||||
|
||||
if (!a2) {
|
||||
a2 = "us.logon.worldofwarcraft.com:3724";
|
||||
if (!loginServer) {
|
||||
loginServer = "us.logon.worldofwarcraft.com:3724";
|
||||
}
|
||||
|
||||
this->m_clientLink->Connect(a2);
|
||||
this->m_clientLink->Connect(loginServer);
|
||||
}
|
||||
|
||||
void GruntLogin::LogonResult(Grunt::Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags) {
|
||||
using ::Grunt::Result;
|
||||
|
||||
// Reconnect
|
||||
|
||||
if (this->IsReconnect()) {
|
||||
// TODO
|
||||
// this->m_loginResponse->HandleRealmData(1, 0);
|
||||
this->m_loginResponse->HandleRealmData(1, nullptr);
|
||||
this->m_clientLink->Disconnect();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Authentication success
|
||||
if (result == Grunt::GRUNT_RESULT_0 || result == Grunt::GRUNT_RESULT_14) {
|
||||
|
||||
if (result == Result::SUCCESS || result == Result::SUCCESS_SURVEY) {
|
||||
// TODO
|
||||
// this->uint8 = 0;
|
||||
// LOBYTE(this->uint105C) = 0;
|
||||
@ -185,12 +209,12 @@ void GruntLogin::LogonResult(Grunt::Result result, const uint8_t* sessionKey, ui
|
||||
// TODO this->uint8 = 1;
|
||||
|
||||
switch (result) {
|
||||
case 3:
|
||||
case Result::BANNED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_BANNED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case 5: {
|
||||
case Result::GRUNT_RESULT_4:
|
||||
case Result::GRUNT_RESULT_5: {
|
||||
LOGIN_RESULT loginResult = LOGIN_UNKNOWN_ACCOUNT;
|
||||
|
||||
// TODO
|
||||
@ -203,58 +227,69 @@ void GruntLogin::LogonResult(Grunt::Result result, const uint8_t* sessionKey, ui
|
||||
break;
|
||||
}
|
||||
|
||||
case 6:
|
||||
case Result::ALREADYONLINE:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_ALREADYONLINE, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
case Result::NOTIME:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_NOTIME, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
case Result::DBBUSY:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_DBBUSY, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
case Result::BADVERSION:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_BADVERSION, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
case Result::DOWNLOADFILE:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_DOWNLOADFILE, LOGIN_OK, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
case Result::SUSPENDED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_SUSPENDED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 15:
|
||||
// TODO
|
||||
case Result::PARENTALCONTROL:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_PARENTALCONTROL, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
// TODO
|
||||
case Result::LOCKED_ENFORCED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_LOCKED_ENFORCED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 17:
|
||||
// TODO
|
||||
case Result::TRIAL_EXPIRED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_TRIAL_EXPIRED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 18:
|
||||
// TODO
|
||||
case Result::ACCOUNT_CONVERTED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_ACCOUNT_CONVERTED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 22:
|
||||
// TODO
|
||||
case Result::CHARGEBACK:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_CHARGEBACK, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 23:
|
||||
// TODO
|
||||
case Result::IGR_WITHOUT_BNET:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_IGR_WITHOUT_BNET, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 24:
|
||||
// TODO
|
||||
case Result::GAME_ACCOUNT_LOCKED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_GAME_ACCOUNT_LOCKED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
// TODO
|
||||
case Result::UNLOCKABLE_LOCK:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_UNLOCKABLE_LOCK, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
case 32:
|
||||
// TODO
|
||||
case Result::CONVERSION_REQUIRED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_CONVERSION_REQUIRED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
// TODO case 255
|
||||
case Result::DISCONNECTED:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_DISCONNECTED, nullptr, 0x0);
|
||||
break;
|
||||
|
||||
default:
|
||||
this->m_loginResponse->UpdateLoginStatus(LOGIN_STATE_FAILED, LOGIN_FAILED, nullptr, 0x0);
|
||||
@ -263,8 +298,25 @@ void GruntLogin::LogonResult(Grunt::Result result, const uint8_t* sessionKey, ui
|
||||
}
|
||||
|
||||
LOGIN_STATE GruntLogin::NextSecurityState(LOGIN_STATE state) {
|
||||
// TODO
|
||||
return LOGIN_STATE_CHECKINGVERSIONS;
|
||||
switch (state) {
|
||||
case LOGIN_STATE_FIRST_SECURITY:
|
||||
if (this->m_pinEnabled) {
|
||||
return LOGIN_STATE_PIN;
|
||||
}
|
||||
|
||||
case LOGIN_STATE_PIN:
|
||||
if (this->m_matrixEnabled) {
|
||||
return LOGIN_STATE_MATRIX;
|
||||
}
|
||||
|
||||
case LOGIN_STATE_MATRIX:
|
||||
if (this->m_tokenEnabled) {
|
||||
return LOGIN_STATE_TOKEN;
|
||||
}
|
||||
|
||||
default:
|
||||
return LOGIN_STATE_CHECKINGVERSIONS;
|
||||
}
|
||||
}
|
||||
|
||||
void GruntLogin::ProveVersion(const uint8_t* versionChecksum) {
|
||||
@ -282,14 +334,24 @@ void GruntLogin::ProveVersion(const uint8_t* versionChecksum) {
|
||||
);
|
||||
}
|
||||
|
||||
void GruntLogin::SetMatrixInfo(bool enabled, uint8_t a3, uint8_t a4, uint8_t a5, uint8_t a6, bool a7, uint8_t a8, uint64_t a9, const uint8_t* a10, uint32_t a11) {
|
||||
void GruntLogin::Reconnect() {
|
||||
this->m_reconnect = true;
|
||||
|
||||
this->m_clientLink->Connect(this->m_loginResponse->GetLoginServer());
|
||||
}
|
||||
|
||||
void GruntLogin::ReconnectResult(Grunt::Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void GruntLogin::SetPinInfo(bool enabled, uint32_t a3, const uint8_t* a4) {
|
||||
void GruntLogin::SetMatrixInfo(bool enabled, uint8_t width, uint8_t height, uint8_t a5, uint8_t a6, bool a7, uint8_t challengeCount, uint64_t seed, const uint8_t* sessionKey, uint32_t a11) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void GruntLogin::SetTokenInfo(bool enabled, uint8_t tokenRequired) {
|
||||
void GruntLogin::SetPinInfo(bool enabled, uint32_t gridSeed, const uint8_t* salt) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void GruntLogin::SetTokenInfo(bool enabled, uint8_t required) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -2,13 +2,17 @@
|
||||
#define NET_LOGIN_GRUNT_LOGIN_HPP
|
||||
|
||||
#include "net/grunt/Grunt.hpp"
|
||||
#include "net/grunt/ClientResponse.hpp"
|
||||
#include "net/login/Login.hpp"
|
||||
#include "net/login/Types.hpp"
|
||||
|
||||
class GruntLogin : public Login {
|
||||
public:
|
||||
// Member variables
|
||||
uint8_t m_versionChallenge[16];
|
||||
uint8_t m_versionChallenge[LOGIN_VERSION_CHALLENGE_LEN];
|
||||
uint8_t m_pinEnabled;
|
||||
uint8_t m_matrixEnabled;
|
||||
uint8_t m_tokenEnabled;
|
||||
uint8_t m_tokenRequired;
|
||||
Grunt::ClientLink* m_clientLink = nullptr;
|
||||
|
||||
// Virtual member functions
|
||||
@ -16,14 +20,17 @@ class GruntLogin : public Login {
|
||||
virtual bool Connected(const NETADDR& addr);
|
||||
virtual void GetLogonMethod();
|
||||
virtual void GetVersionProof(const uint8_t* versionChallenge);
|
||||
virtual void SetPinInfo(bool enabled, uint32_t a3, const uint8_t* a4);
|
||||
virtual void SetMatrixInfo(bool enabled, uint8_t a3, uint8_t a4, uint8_t a5, uint8_t a6, bool a7, uint8_t a8, uint64_t a9, const uint8_t* a10, uint32_t a11);
|
||||
virtual void SetTokenInfo(bool enabled, uint8_t tokenRequired);
|
||||
virtual void SetPinInfo(bool enabled, uint32_t gridSeed, const uint8_t* salt);
|
||||
virtual void SetMatrixInfo(bool enabled, uint8_t width, uint8_t height, uint8_t a5, uint8_t a6, bool a7, uint8_t challengeCount, uint64_t seed, const uint8_t* sessionKey, uint32_t a11);
|
||||
virtual void SetTokenInfo(bool enabled, uint8_t required);
|
||||
virtual void LogonResult(Grunt::Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags);
|
||||
virtual void ReconnectResult(Grunt::Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags);
|
||||
virtual LOGIN_STATE NextSecurityState(LOGIN_STATE state);
|
||||
virtual int32_t GetServerId();
|
||||
virtual const uint8_t* GetVersionChallenge();
|
||||
virtual void GetRealmList();
|
||||
virtual void Logon(const char* a2, const char* a3);
|
||||
virtual void Reconnect();
|
||||
virtual void Logon(const char* loginServer, const char* loginPortal);
|
||||
virtual void ProveVersion(const uint8_t* versionChecksum);
|
||||
virtual void Logoff();
|
||||
virtual void Init(LoginResponse* loginResponse);
|
||||
|
||||
@ -57,7 +57,7 @@ void LoginResponse::HandleRealmData(uint32_t a2, CDataStore* msg) {
|
||||
realm.revision = 0;
|
||||
}
|
||||
|
||||
if (msg->m_read > msg->m_size) {
|
||||
if (msg->Tell() > msg->Size()) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ void LoginResponse::HandleRealmData(uint32_t a2, CDataStore* msg) {
|
||||
msg->Get(reinterpret_cast<uint16_t&>(this->uint10));
|
||||
|
||||
// Overrun or underrun
|
||||
if (msg->m_read > msg->m_size || !msg->IsRead()) {
|
||||
if (msg->Tell() > msg->Size() || !msg->IsRead()) {
|
||||
this->m_realmList.Clear();
|
||||
this->RealmEnumCallback(4);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef NET_LOGIN_LOGIN_RESPONSE_HPP
|
||||
#define NET_LOGIN_LOGIN_RESPONSE_HPP
|
||||
|
||||
#include "net/login/Types.hpp"
|
||||
#include "net/Types.hpp"
|
||||
#include <storm/Array.hpp>
|
||||
|
||||
@ -15,7 +16,9 @@ class LoginResponse {
|
||||
LOGIN_RESULT m_loginResult;
|
||||
|
||||
// Virtual member functions
|
||||
virtual const char* GetLoginServer() = 0;
|
||||
virtual int32_t GetLoginServerType() = 0;
|
||||
virtual void JoinRealmResult(uint32_t addr, int32_t port, int32_t a3, int32_t a4) = 0;
|
||||
virtual void LoginServerStatus(LOGIN_STATE state, LOGIN_RESULT result, const char* addrStr, const char* stateStr, const char* resultStr, uint8_t flags) = 0;
|
||||
virtual void RealmEnumCallback(uint32_t a2) = 0;
|
||||
|
||||
|
||||
75
src/net/login/Types.hpp
Normal file
75
src/net/login/Types.hpp
Normal file
@ -0,0 +1,75 @@
|
||||
#ifndef NET_LOGIN_TYPES_HPP
|
||||
#define NET_LOGIN_TYPES_HPP
|
||||
|
||||
#define LOGIN_RECONNECT_CHALLENGE_LEN 16
|
||||
#define LOGIN_VERSION_CHALLENGE_LEN 16
|
||||
#define LOGIN_VERSION_CHECKSUM_LEN 20
|
||||
|
||||
enum LOGIN_RESULT {
|
||||
LOGIN_OK = 0,
|
||||
LOGIN_INVALID_CHALLENGE_MESSAGE = 1,
|
||||
LOGIN_SRP_ERROR = 2,
|
||||
LOGIN_INVALID_PROOF_MESSAGE = 3,
|
||||
LOGIN_BAD_SERVER_PROOF = 4,
|
||||
LOGIN_INVALID_RECODE_MESSAGE = 5,
|
||||
LOGIN_BAD_SERVER_RECODE_PROOF = 6,
|
||||
LOGIN_UNKNOWN_ACCOUNT = 7,
|
||||
LOGIN_UNKNOWN_ACCOUNT_PIN = 8,
|
||||
LOGIN_UNKNOWN_ACCOUNT_CALL = 9,
|
||||
LOGIN_INCORRECT_PASSWORD = 10,
|
||||
LOGIN_FAILED = 11,
|
||||
LOGIN_SERVER_DOWN = 12,
|
||||
LOGIN_BANNED = 13,
|
||||
LOGIN_BADVERSION = 14,
|
||||
LOGIN_ALREADYONLINE = 15,
|
||||
LOGIN_NOTIME = 16,
|
||||
LOGIN_DBBUSY = 17,
|
||||
LOGIN_SUSPENDED = 18,
|
||||
LOGIN_PARENTALCONTROL = 19,
|
||||
LOGIN_LOCKED_ENFORCED = 20,
|
||||
LOGIN_DISCONNECTED = 21,
|
||||
LOGIN_ACCOUNT_CONVERTED = 22,
|
||||
LOGIN_ANTI_INDULGENCE = 23,
|
||||
LOGIN_EXPIRED = 24,
|
||||
LOGIN_TRIAL_EXPIRED = 25,
|
||||
LOGIN_NO_GAME_ACCOUNT = 26,
|
||||
LOGIN_AUTH_OUTAGE = 27,
|
||||
LOGIN_GAME_ACCOUNT_LOCKED = 28,
|
||||
LOGIN_NO_BATTLENET_MANAGER = 29,
|
||||
LOGIN_NO_BATTLENET_APPLICATION = 30,
|
||||
LOGIN_MALFORMED_ACCOUNT_NAME = 31,
|
||||
LOGIN_USE_GRUNT = 32,
|
||||
LOGIN_TOO_FAST = 33,
|
||||
LOGIN_CHARGEBACK = 34,
|
||||
LOGIN_IGR_WITHOUT_BNET = 35,
|
||||
LOGIN_UNLOCKABLE_LOCK = 36,
|
||||
LOGIN_CONVERSION_REQUIRED = 37,
|
||||
LOGIN_UNABLE_TO_DOWNLOAD_MODULE = 38,
|
||||
LOGIN_NO_GAME_ACCOUNTS_IN_REGION = 39,
|
||||
LOGIN_ACCOUNT_LOCKED = 40,
|
||||
LOGIN_RESULT_MAX = 41,
|
||||
};
|
||||
|
||||
enum LOGIN_STATE {
|
||||
LOGIN_STATE_INITIALIZED = 0,
|
||||
LOGIN_STATE_CONNECTING = 1,
|
||||
LOGIN_STATE_HANDSHAKING = 2,
|
||||
LOGIN_STATE_AUTHENTICATING = 3,
|
||||
LOGIN_STATE_AUTHENTICATED = 4,
|
||||
LOGIN_STATE_FAILED = 5,
|
||||
LOGIN_STATE_DOWNLOADFILE = 6,
|
||||
LOGIN_STATE_FIRST_SECURITY = 7,
|
||||
LOGIN_STATE_PIN = 8,
|
||||
LOGIN_STATE_PIN_WAIT = 9,
|
||||
LOGIN_STATE_MATRIX = 10,
|
||||
LOGIN_STATE_MATRIX_WAIT = 11,
|
||||
LOGIN_STATE_TOKEN = 12,
|
||||
LOGIN_STATE_TOKEN_WAIT = 13,
|
||||
LOGIN_STATE_CHECKINGVERSIONS = 14,
|
||||
LOGIN_STATE_CONNECTED = 15,
|
||||
LOGIN_STATE_DISCONNECTED = 16,
|
||||
LOGIN_STATE_SURVEY = 17,
|
||||
LOGIN_STATE_MAX = 18,
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
int32_t SRP6_Client::BeginAuthentication(const char* accountName, const char* password) {
|
||||
if (!accountName || !password) {
|
||||
return -1;
|
||||
return SRP6_INVALID;
|
||||
}
|
||||
|
||||
SHA1_Init(&this->ctx);
|
||||
@ -22,7 +22,7 @@ int32_t SRP6_Client::BeginAuthentication(const char* accountName, const char* pa
|
||||
SHA1_Update(&ctx, reinterpret_cast<const uint8_t*>(password), strlen(password));
|
||||
SHA1_Final(this->interimDigest, &ctx);
|
||||
|
||||
return 0;
|
||||
return SRP6_OK;
|
||||
}
|
||||
|
||||
int32_t SRP6_Client::CalculateProof(const uint8_t* largeSafePrime, uint32_t largeSafePrimeLen, const uint8_t* generator, uint32_t generatorLen, const uint8_t* salt, uint32_t saltLen, const uint8_t* publicKey, uint32_t publicKeyLen, SRP6_Random& random) {
|
||||
@ -39,25 +39,25 @@ int32_t SRP6_Client::CalculateProof(const uint8_t* largeSafePrime, uint32_t larg
|
||||
auto k = BigIntegerFromInt(0);
|
||||
auto S = BigIntegerFromInt(0);
|
||||
|
||||
int32_t result = 0;
|
||||
int32_t result = SRP6_OK;
|
||||
|
||||
if (!largeSafePrime || largeSafePrimeLen - 1 > 31) {
|
||||
result = -1;
|
||||
result = SRP6_INVALID;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!generator || generatorLen - 1 > 31) {
|
||||
result = -1;
|
||||
result = SRP6_INVALID;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!salt || saltLen - 1 > 31) {
|
||||
result = -1;
|
||||
result = SRP6_INVALID;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!publicKey || publicKeyLen < 31) {
|
||||
result = -1;
|
||||
result = SRP6_INVALID;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -150,12 +150,12 @@ int32_t SRP6_Client::CalculateProof(const uint8_t* largeSafePrime, uint32_t larg
|
||||
SHA1_Update(&this->ctx, this->clientProof, sizeof(this->clientProof));
|
||||
SHA1_Update(&this->ctx, this->sessionKey, sizeof(this->sessionKey));
|
||||
|
||||
result = 0;
|
||||
result = SRP6_OK;
|
||||
} else {
|
||||
result = -2;
|
||||
result = SRP6_FAILURE;
|
||||
}
|
||||
} else {
|
||||
result = -1;
|
||||
result = SRP6_INVALID;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@ -177,7 +177,7 @@ cleanup:
|
||||
|
||||
int32_t SRP6_Client::VerifyServerProof(const uint8_t* serverProof, uint32_t serverProofLen) {
|
||||
if (serverProofLen != 20) {
|
||||
return -2;
|
||||
return SRP6_FAILURE;
|
||||
}
|
||||
|
||||
// Calculate expected server proof
|
||||
|
||||
@ -3,6 +3,11 @@
|
||||
|
||||
#include <common/SHA1.hpp>
|
||||
|
||||
// Invented names
|
||||
#define SRP6_OK (0)
|
||||
#define SRP6_INVALID (-1)
|
||||
#define SRP6_FAILURE (-2)
|
||||
|
||||
class SRP6_Random;
|
||||
|
||||
class SRP6_Client {
|
||||
|
||||
@ -383,3 +383,11 @@ void CBackdropGenerator::SetOutput(CSimpleFrame* frame) {
|
||||
bottomRightTexture->SetBlendMode(this->m_blend);
|
||||
}
|
||||
}
|
||||
|
||||
void CBackdropGenerator::SetVertexColor(const CImVector& color) {
|
||||
this->m_color = color;
|
||||
|
||||
if (this->m_backgroundTexture) {
|
||||
this->m_backgroundTexture->SetVertexColor(this->m_color);
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ class CBackdropGenerator {
|
||||
void LoadXML(XMLNode* node, CStatus* status);
|
||||
void SetBorderVertexColor(const CImVector& borderColor);
|
||||
void SetOutput(CSimpleFrame* frame);
|
||||
void SetVertexColor(const CImVector& color);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -176,7 +176,12 @@ int32_t CSimpleEditBox_GetTextInsets(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t CSimpleEditBox_SetFocus(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
auto type = CSimpleEditBox::GetObjectType();
|
||||
auto editBox = static_cast<CSimpleEditBox*>(FrameScript_GetObjectThis(L, type));
|
||||
|
||||
CSimpleEditBox::SetKeyboardFocus(editBox);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CSimpleEditBox_ClearFocus(lua_State* L) {
|
||||
|
||||
@ -44,7 +44,7 @@ CSimpleFont* CSimpleFont::GetFont(const char* name, int32_t a2) {
|
||||
font->UnregisterScriptObject(font->m_name);
|
||||
}
|
||||
|
||||
font->m_name = hashed->m_key.m_str;
|
||||
font->m_name = hashed->m_key.GetString();
|
||||
|
||||
if (font->m_name) {
|
||||
font->RegisterScriptObject(font->m_name);
|
||||
|
||||
@ -140,7 +140,16 @@ int32_t CSimpleFontString_GetTextColor(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t CSimpleFontString_SetTextColor(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
auto type = CSimpleFontString::GetObjectType();
|
||||
auto string = static_cast<CSimpleFontString*>(FrameScript_GetObjectThis(L, type));
|
||||
|
||||
CImVector color = { 0x00, 0x00, 0x00, 0x00 };
|
||||
FrameScript_GetColor(L, 2, color);
|
||||
|
||||
string->SetVertexColor(color);
|
||||
string->m_fontableFlags &= ~FLAG_COLOR_UPDATE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CSimpleFontString_GetShadowColor(lua_State* L) {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include "ui/CSimpleFrameScript.hpp"
|
||||
#include "gx/Coordinate.hpp"
|
||||
#include "ui/CBackdropGenerator.hpp"
|
||||
#include "ui/CSimpleFrame.hpp"
|
||||
#include "ui/FrameScript.hpp"
|
||||
#include "util/Lua.hpp"
|
||||
@ -460,7 +461,17 @@ int32_t CSimpleFrame_GetBackdropColor(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t CSimpleFrame_SetBackdropColor(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
auto type = CSimpleFrame::GetObjectType();
|
||||
auto frame = static_cast<CSimpleFrame*>(FrameScript_GetObjectThis(L, type));
|
||||
|
||||
CImVector color = { 0x00 };
|
||||
FrameScript_GetColor(L, 2, color);
|
||||
|
||||
if (frame->m_backdrop) {
|
||||
frame->m_backdrop->SetVertexColor(color);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t CSimpleFrame_GetBackdropBorderColor(lua_State* L) {
|
||||
|
||||
@ -94,7 +94,7 @@ str.join = strjoin
|
||||
str.replace = strreplace)";
|
||||
|
||||
const char* FrameScript_EventObject::GetName() {
|
||||
return this->m_key.m_str;
|
||||
return this->m_key.GetString();
|
||||
}
|
||||
|
||||
int64_t OsGetAsyncClocksPerSecond() {
|
||||
|
||||
@ -72,7 +72,11 @@ int32_t strlenutf8(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t issecure(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
// TODO taint check
|
||||
|
||||
lua_pushnumber(L, 1.0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t issecurevariable(lua_State* L) {
|
||||
|
||||
@ -490,7 +490,20 @@ int32_t Script_CancelLogin(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_GetCVar(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
if (!lua_isstring(L, 1)) {
|
||||
return luaL_error(L, "Usage: GetCVar(\"cvar\")");
|
||||
}
|
||||
|
||||
auto name = lua_tostring(L, 1);
|
||||
auto var = CVar::LookupRegistered(name);
|
||||
|
||||
if (!var) {
|
||||
return luaL_error(L, "Couldn't find CVar named '%s'", name);
|
||||
}
|
||||
|
||||
lua_pushstring(L, var->GetString());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_GetCVarBool(lua_State* L) {
|
||||
|
||||
@ -238,7 +238,36 @@ int32_t Script_ChangeRealm(lua_State* L) {
|
||||
}
|
||||
|
||||
int32_t Script_GetRealmCategories(lua_State* L) {
|
||||
WHOA_UNIMPLEMENTED(0);
|
||||
lua_checkstack(L, CRealmList::s_categories.Count());
|
||||
|
||||
int32_t pushed = 0;
|
||||
|
||||
for (uint32_t i = 0; i < CRealmList::s_categories.Count(); i++) {
|
||||
auto realmCategory = CRealmList::s_categories[i];
|
||||
|
||||
if (realmCategory && realmCategory->uint14) {
|
||||
auto categoryName = realmCategory->m_category
|
||||
? realmCategory->m_category->m_name
|
||||
: "UNKNOWN";
|
||||
|
||||
lua_pushstring(L, categoryName);
|
||||
|
||||
pushed++;
|
||||
}
|
||||
}
|
||||
|
||||
if (pushed) {
|
||||
return pushed;
|
||||
}
|
||||
|
||||
auto realmCategory = CRealmList::s_categories[0];
|
||||
auto categoryName = realmCategory->m_category
|
||||
? realmCategory->m_category->m_name
|
||||
: "UNKNOWN";
|
||||
|
||||
lua_pushstring(L, categoryName);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t Script_SetPreferredInfo(lua_State* L) {
|
||||
|
||||
3
src/util/Locale.cpp
Normal file
3
src/util/Locale.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include "util/Locale.hpp"
|
||||
|
||||
WOW_LOCALE CURRENT_LANGUAGE = DEFAULT_LANGUAGE;
|
||||
20
src/util/Locale.hpp
Normal file
20
src/util/Locale.hpp
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef UTIL_LOCALE_HPP
|
||||
#define UTIL_LOCALE_HPP
|
||||
|
||||
enum WOW_LOCALE {
|
||||
LOCALE_en_US = 0,
|
||||
LOCALE_ko_KR = 1,
|
||||
LOCALE_fr_FR = 2,
|
||||
LOCALE_de_DE = 3,
|
||||
LOCALE_zh_CN = 4,
|
||||
LOCALE_zh_TW = 5,
|
||||
LOCALE_es_ES = 6,
|
||||
LOCALE_es_MX = 7,
|
||||
LOCALE_ru_RU = 8,
|
||||
NUM_LOCALES = 9,
|
||||
DEFAULT_LANGUAGE = 0,
|
||||
};
|
||||
|
||||
extern WOW_LOCALE CURRENT_LANGUAGE;
|
||||
|
||||
#endif
|
||||
120
vendor/CMakeLists.txt
vendored
120
vendor/CMakeLists.txt
vendored
@ -1,32 +1,116 @@
|
||||
add_subdirectory(freetype-2.0.9)
|
||||
add_subdirectory(lua-5.1.3)
|
||||
|
||||
# FMOD Ex
|
||||
set(FMODEX_DIR "./fmodex-4.32.09")
|
||||
add_library(fmodex SHARED IMPORTED)
|
||||
# FMOD
|
||||
|
||||
add_library(fmod SHARED IMPORTED GLOBAL)
|
||||
|
||||
# Determine which flavor of FMOD to use:
|
||||
# - macOS versions from 10.9 down prefer FMOD Ex
|
||||
# - macOS versions from 10.10 up prefer FMOD Core
|
||||
# - Windows versions from Vista down prefer FMOD Ex
|
||||
# - Windows versions from 7 up prefer FMOD Core
|
||||
# - All versions of Linux prefer FMOD Core
|
||||
# - Any missed detection prefers FMOD Core
|
||||
if(WHOA_SYSTEM_MAC AND WHOA_SYSTEM_VERSION LESS WHOA_MAC_10_10)
|
||||
set(WHOA_FMOD_EX 1)
|
||||
target_compile_definitions(fmod INTERFACE -DWHOA_FMOD_EX=1)
|
||||
elseif(WHOA_SYSTEM_WIN AND WHOA_SYSTEM_VERSION LESS WHOA_WIN_7)
|
||||
set(WHOA_FMOD_EX 1)
|
||||
target_compile_definitions(fmod INTERFACE -DWHOA_FMOD_EX=1)
|
||||
else()
|
||||
set(WHOA_FMOD_CORE 1)
|
||||
target_compile_definitions(fmod INTERFACE -DWHOA_FMOD_CORE=1)
|
||||
endif()
|
||||
|
||||
if(WHOA_FMOD_EX)
|
||||
set(FMOD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/fmodex-4.24.16")
|
||||
else()
|
||||
set(FMOD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/fmodcore-2.02.18")
|
||||
endif()
|
||||
|
||||
if(WHOA_SYSTEM_WIN)
|
||||
if(WHOA_ARCH_32)
|
||||
include_directories(${FMODEX_DIR}/win32/inc)
|
||||
set_target_properties(fmodex PROPERTIES IMPORTED_LOCATION ${FMODEX_DIR}/win32/lib/fmodex_vc.lib)
|
||||
install(FILES ${FMODEX_DIR}/win32/lib/fmodex.dll DESTINATION "bin")
|
||||
if(WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_IMPLIB ${FMOD_DIR}/win-x86/lib/fmodex_vc.lib
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/win-x86/lib/fmodex.dll
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/win-x86/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/win-x86/lib/fmodex.dll DESTINATION "bin")
|
||||
else()
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_IMPLIB ${FMOD_DIR}/win-x86/lib/fmod_vc.lib
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/win-x86/lib/fmod.dll
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/win-x86/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/win-x86/lib/fmod.dll DESTINATION "bin")
|
||||
endif()
|
||||
elseif(WHOA_ARCH_64)
|
||||
include_directories(${FMODEX_DIR}/win64/inc)
|
||||
set_target_properties(fmodex PROPERTIES IMPORTED_LOCATION ${FMODEX_DIR}/win64/lib/fmodex64_vc.lib)
|
||||
install(FILES ${FMODEX_DIR}/win64/lib/fmodex64.dll DESTINATION "bin")
|
||||
if(WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_IMPLIB ${FMOD_DIR}/win-x86_64/lib/fmodex64_vc.lib
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/win-x86_64/lib/fmodex64.dll
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/win-x86_64/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/win-x86_64/lib/fmodex64.dll DESTINATION "bin")
|
||||
else()
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_IMPLIB ${FMOD_DIR}/win-x86_64/lib/fmod_vc.lib
|
||||
IMPORTED_LOCATION FMOD_DIR}/win-x86_64/lib/fmod.dll
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/win-x86_64/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/win-x86_64/lib/fmod.dll DESTINATION "bin")
|
||||
endif()
|
||||
endif()
|
||||
elseif(WHOA_SYSTEM_LINUX)
|
||||
if(WHOA_ARCH_32)
|
||||
include_directories(${FMODEX_DIR}/linux32/inc)
|
||||
set_target_properties(fmodex PROPERTIES IMPORTED_LOCATION ${FMODEX_DIR}/linux32/lib/libfmodex-4.32.09.so)
|
||||
install(FILES ${FMODEX_DIR}/linux32/lib/libfmodex-4.32.09.so DESTINATION "bin")
|
||||
if(WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/linux-x86/lib/libfmodex-4.24.16.so
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/linux-x86/lib/libfmodex-4.24.16.so DESTINATION "bin")
|
||||
else()
|
||||
# TODO Add ARM support for FMOD Core on Linux
|
||||
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/linux-x86/lib/libfmod.so.13.18
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/linux-x86/lib/libfmod.so.13.18 DESTINATION "bin")
|
||||
endif()
|
||||
elseif(WHOA_ARCH_64)
|
||||
include_directories(${FMODEX_DIR}/linux64/inc)
|
||||
set_target_properties(fmodex PROPERTIES IMPORTED_LOCATION ${FMODEX_DIR}/linux64/lib/libfmodex-4.32.09.so)
|
||||
install(FILES ${FMODEX_DIR}/linux32/lib/libfmodex-4.32.09.so DESTINATION "bin")
|
||||
if(WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/linux-x86_64/lib/libfmodex-4.24.16.so
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86_64/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/linux-x86_64/lib/libfmodex-4.24.16.so DESTINATION "bin")
|
||||
else()
|
||||
# TODO Add ARM support for FMOD Core on Linux
|
||||
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/linux-x86_64/lib/libfmod.so.13.18
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86_64/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/linux-x86_64/lib/libfmod.so.13.18 DESTINATION "bin")
|
||||
endif()
|
||||
endif()
|
||||
elseif(WHOA_SYSTEM_MAC)
|
||||
# The Mac lib is universal
|
||||
include_directories(${FMODEX_DIR}/mac/inc)
|
||||
set_target_properties(fmodex PROPERTIES IMPORTED_LOCATION ${FMODEX_DIR}/mac/lib/libfmodex.dylib)
|
||||
install(FILES ${FMODEX_DIR}/mac/lib/libfmodex.dylib DESTINATION "bin")
|
||||
|
||||
if(WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/mac/lib/libfmodex.dylib
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/mac/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/mac/lib/libfmodex.dylib DESTINATION "bin")
|
||||
else()
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/mac/lib/libfmod.dylib
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/mac/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/mac/lib/libfmod.dylib DESTINATION "bin")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
157
vendor/fmodcore-2.02.18/LICENSE.TXT
vendored
Normal file
157
vendor/fmodcore-2.02.18/LICENSE.TXT
vendored
Normal file
@ -0,0 +1,157 @@
|
||||
FMOD END USER LICENCE AGREEMENT
|
||||
===============================
|
||||
|
||||
This End User Licence Agreement (EULA) is a legal agreement between you and
|
||||
Firelight Technologies Pty Ltd (ACN 099 182 448) (us or we) and governs your use
|
||||
of FMOD Studio Authoring Tool and FMOD Studio Engine, together the Software.
|
||||
|
||||
1. GRANT OF LICENCE
|
||||
|
||||
1.1 FMOD Studio Authoring Tool
|
||||
|
||||
This EULA grants you the right to use FMOD Studio Authoring Tool for all use,
|
||||
including Commercial use, subject to the following:
|
||||
|
||||
i. FMOD Studio Authoring Tool is used to create content for use with the
|
||||
FMOD Studio Engine only;
|
||||
|
||||
ii. FMOD Studio Authoring Tool is not redistributed in any form.
|
||||
|
||||
1.2 FMOD Studio Engine
|
||||
|
||||
This EULA grants you the right to use FMOD Studio Engine, for personal
|
||||
(hobbyist), educational (students and teachers) or Non-Commercial use only,
|
||||
subject to the following:
|
||||
|
||||
i. FMOD Studio Engine is integrated and redistributed in a software
|
||||
application (Product) only;
|
||||
|
||||
ii. FMOD Studio Engine is not distributed as part of a game engine or tool
|
||||
set;
|
||||
|
||||
iii. FMOD Studio Engine is not used in any Commercial enterprise or for any
|
||||
Commercial production or subcontracting, except for the purposes of
|
||||
Evaluation or Development of a Commercial Product;
|
||||
|
||||
iv. Non-Commercial use does not involve any form of monetisation,
|
||||
sponsorship or promotion;
|
||||
|
||||
v. Product includes attribution in accordance with Clause 3.
|
||||
|
||||
2.OTHER USE
|
||||
|
||||
For all Commercial use, and any Non Commercial use not permitted by this
|
||||
license, a separate license is required. Refer to www.fmod.com/licensing for
|
||||
information.
|
||||
|
||||
3. CREDITS
|
||||
|
||||
All Products require an in game credit line which must include the words “FMOD
|
||||
Studio” and “Firelight Technologies Pty Ltd”. Refer to www.fmod.com/attribution
|
||||
for examples.
|
||||
|
||||
4. INTELLECTUAL PROPERTY RIGHTS
|
||||
|
||||
We are and remain at all times the owner of the Software (including all
|
||||
intellectual property rights in or to the Software). For the avoidance of doubt,
|
||||
nothing in this EULA may be deemed to grant or assign to you any proprietary or
|
||||
ownership interest or intellectual property rights in or to the Software other
|
||||
than the rights licensed pursuant to Clause 1.
|
||||
|
||||
You acknowledge and agree that you have no right, title or interest in and to
|
||||
the intellectual property rights in the Software.
|
||||
|
||||
5. SECURITY AND RISK
|
||||
|
||||
You are responsible for protecting the Software and any related materials at all
|
||||
times from unauthorised access, use or damage.
|
||||
|
||||
6. WARRANTY AND LIMITATION OF LIABILITY
|
||||
|
||||
The Software is provided by us “as is” and, to the maximum extent permitted by
|
||||
law, any express or implied warranties of any kind, including (but not limited
|
||||
to) all implied warranties of merchantability and fitness for a particular
|
||||
purpose are disclaimed.
|
||||
|
||||
In no event shall we (and our employees, contractors and subcontractors),
|
||||
developers and contributors be liable for any direct, special, indirect or
|
||||
consequential damages whatsoever resulting from loss of data or profits, whether
|
||||
in an action of contract, negligence or other tortious conduct, arising out of
|
||||
or in connection with the use or performance of the Software.
|
||||
|
||||
7. OGG VORBIS CODEC
|
||||
|
||||
FMOD uses the Ogg Vorbis codec © 2002, Xiph.Org Foundation.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
i. Redistributions of source code must retain the above copyright notice,
|
||||
the list of conditions and the following disclaimer.
|
||||
|
||||
ii. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other material provided with the distribution.
|
||||
|
||||
iii. Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
8. RESONANCE AUDIO SDK
|
||||
|
||||
FMOD includes Resonance Audio SDK, licensed under the Apache Licence, Version
|
||||
2.0 (the Licence); you may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed
|
||||
under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations under the License.
|
||||
|
||||
8. ANDROID PLATFORM CODE
|
||||
|
||||
Copyright (C) 2010 The Android Open Source Project All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
9. AUDIOMOTORS DEMO CONTENT
|
||||
|
||||
The audiogaming_audiomotors_demo_engine.agp file is provided for evaluation
|
||||
purposes only and is not to be redistributed. AudioMotors V2 Pro is required to
|
||||
create your own engine content. Refer to https://lesound.io for information.
|
||||
4082
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod.cs
vendored
Normal file
4082
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod.cs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
668
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod.h
vendored
Normal file
668
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod.h
vendored
Normal file
@ -0,0 +1,668 @@
|
||||
/* ======================================================================================== */
|
||||
/* FMOD Core API - C header file. */
|
||||
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2023. */
|
||||
/* */
|
||||
/* Use this header in conjunction with fmod_common.h (which contains all the constants / */
|
||||
/* callbacks) to develop using the C interface */
|
||||
/* */
|
||||
/* For more detail visit: */
|
||||
/* https://fmod.com/docs/2.02/api/core-api.html */
|
||||
/* ======================================================================================== */
|
||||
|
||||
#ifndef _FMOD_H
|
||||
#define _FMOD_H
|
||||
|
||||
#include "fmod_common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
FMOD global system functions (optional).
|
||||
*/
|
||||
FMOD_RESULT F_API FMOD_Memory_Initialize (void *poolmem, int poollen, FMOD_MEMORY_ALLOC_CALLBACK useralloc, FMOD_MEMORY_REALLOC_CALLBACK userrealloc, FMOD_MEMORY_FREE_CALLBACK userfree, FMOD_MEMORY_TYPE memtypeflags);
|
||||
FMOD_RESULT F_API FMOD_Memory_GetStats (int *currentalloced, int *maxalloced, FMOD_BOOL blocking);
|
||||
FMOD_RESULT F_API FMOD_Debug_Initialize (FMOD_DEBUG_FLAGS flags, FMOD_DEBUG_MODE mode, FMOD_DEBUG_CALLBACK callback, const char *filename);
|
||||
FMOD_RESULT F_API FMOD_File_SetDiskBusy (int busy);
|
||||
FMOD_RESULT F_API FMOD_File_GetDiskBusy (int *busy);
|
||||
FMOD_RESULT F_API FMOD_Thread_SetAttributes (FMOD_THREAD_TYPE type, FMOD_THREAD_AFFINITY affinity, FMOD_THREAD_PRIORITY priority, FMOD_THREAD_STACK_SIZE stacksize);
|
||||
|
||||
/*
|
||||
FMOD System factory functions. Use this to create an FMOD System Instance. below you will see FMOD_System_Init/Close to get started.
|
||||
*/
|
||||
FMOD_RESULT F_API FMOD_System_Create (FMOD_SYSTEM **system, unsigned int headerversion);
|
||||
FMOD_RESULT F_API FMOD_System_Release (FMOD_SYSTEM *system);
|
||||
|
||||
/*
|
||||
'System' API
|
||||
*/
|
||||
|
||||
/* Setup functions. */
|
||||
FMOD_RESULT F_API FMOD_System_SetOutput (FMOD_SYSTEM *system, FMOD_OUTPUTTYPE output);
|
||||
FMOD_RESULT F_API FMOD_System_GetOutput (FMOD_SYSTEM *system, FMOD_OUTPUTTYPE *output);
|
||||
FMOD_RESULT F_API FMOD_System_GetNumDrivers (FMOD_SYSTEM *system, int *numdrivers);
|
||||
FMOD_RESULT F_API FMOD_System_GetDriverInfo (FMOD_SYSTEM *system, int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels);
|
||||
FMOD_RESULT F_API FMOD_System_SetDriver (FMOD_SYSTEM *system, int driver);
|
||||
FMOD_RESULT F_API FMOD_System_GetDriver (FMOD_SYSTEM *system, int *driver);
|
||||
FMOD_RESULT F_API FMOD_System_SetSoftwareChannels (FMOD_SYSTEM *system, int numsoftwarechannels);
|
||||
FMOD_RESULT F_API FMOD_System_GetSoftwareChannels (FMOD_SYSTEM *system, int *numsoftwarechannels);
|
||||
FMOD_RESULT F_API FMOD_System_SetSoftwareFormat (FMOD_SYSTEM *system, int samplerate, FMOD_SPEAKERMODE speakermode, int numrawspeakers);
|
||||
FMOD_RESULT F_API FMOD_System_GetSoftwareFormat (FMOD_SYSTEM *system, int *samplerate, FMOD_SPEAKERMODE *speakermode, int *numrawspeakers);
|
||||
FMOD_RESULT F_API FMOD_System_SetDSPBufferSize (FMOD_SYSTEM *system, unsigned int bufferlength, int numbuffers);
|
||||
FMOD_RESULT F_API FMOD_System_GetDSPBufferSize (FMOD_SYSTEM *system, unsigned int *bufferlength, int *numbuffers);
|
||||
FMOD_RESULT F_API FMOD_System_SetFileSystem (FMOD_SYSTEM *system, FMOD_FILE_OPEN_CALLBACK useropen, FMOD_FILE_CLOSE_CALLBACK userclose, FMOD_FILE_READ_CALLBACK userread, FMOD_FILE_SEEK_CALLBACK userseek, FMOD_FILE_ASYNCREAD_CALLBACK userasyncread, FMOD_FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign);
|
||||
FMOD_RESULT F_API FMOD_System_AttachFileSystem (FMOD_SYSTEM *system, FMOD_FILE_OPEN_CALLBACK useropen, FMOD_FILE_CLOSE_CALLBACK userclose, FMOD_FILE_READ_CALLBACK userread, FMOD_FILE_SEEK_CALLBACK userseek);
|
||||
FMOD_RESULT F_API FMOD_System_SetAdvancedSettings (FMOD_SYSTEM *system, FMOD_ADVANCEDSETTINGS *settings);
|
||||
FMOD_RESULT F_API FMOD_System_GetAdvancedSettings (FMOD_SYSTEM *system, FMOD_ADVANCEDSETTINGS *settings);
|
||||
FMOD_RESULT F_API FMOD_System_SetCallback (FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK callback, FMOD_SYSTEM_CALLBACK_TYPE callbackmask);
|
||||
|
||||
/* Plug-in support. */
|
||||
FMOD_RESULT F_API FMOD_System_SetPluginPath (FMOD_SYSTEM *system, const char *path);
|
||||
FMOD_RESULT F_API FMOD_System_LoadPlugin (FMOD_SYSTEM *system, const char *filename, unsigned int *handle, unsigned int priority);
|
||||
FMOD_RESULT F_API FMOD_System_UnloadPlugin (FMOD_SYSTEM *system, unsigned int handle);
|
||||
FMOD_RESULT F_API FMOD_System_GetNumNestedPlugins (FMOD_SYSTEM *system, unsigned int handle, int *count);
|
||||
FMOD_RESULT F_API FMOD_System_GetNestedPlugin (FMOD_SYSTEM *system, unsigned int handle, int index, unsigned int *nestedhandle);
|
||||
FMOD_RESULT F_API FMOD_System_GetNumPlugins (FMOD_SYSTEM *system, FMOD_PLUGINTYPE plugintype, int *numplugins);
|
||||
FMOD_RESULT F_API FMOD_System_GetPluginHandle (FMOD_SYSTEM *system, FMOD_PLUGINTYPE plugintype, int index, unsigned int *handle);
|
||||
FMOD_RESULT F_API FMOD_System_GetPluginInfo (FMOD_SYSTEM *system, unsigned int handle, FMOD_PLUGINTYPE *plugintype, char *name, int namelen, unsigned int *version);
|
||||
FMOD_RESULT F_API FMOD_System_SetOutputByPlugin (FMOD_SYSTEM *system, unsigned int handle);
|
||||
FMOD_RESULT F_API FMOD_System_GetOutputByPlugin (FMOD_SYSTEM *system, unsigned int *handle);
|
||||
FMOD_RESULT F_API FMOD_System_CreateDSPByPlugin (FMOD_SYSTEM *system, unsigned int handle, FMOD_DSP **dsp);
|
||||
FMOD_RESULT F_API FMOD_System_GetDSPInfoByPlugin (FMOD_SYSTEM *system, unsigned int handle, const FMOD_DSP_DESCRIPTION **description);
|
||||
FMOD_RESULT F_API FMOD_System_RegisterCodec (FMOD_SYSTEM *system, FMOD_CODEC_DESCRIPTION *description, unsigned int *handle, unsigned int priority);
|
||||
FMOD_RESULT F_API FMOD_System_RegisterDSP (FMOD_SYSTEM *system, const FMOD_DSP_DESCRIPTION *description, unsigned int *handle);
|
||||
FMOD_RESULT F_API FMOD_System_RegisterOutput (FMOD_SYSTEM *system, const FMOD_OUTPUT_DESCRIPTION *description, unsigned int *handle);
|
||||
|
||||
/* Init/Close. */
|
||||
FMOD_RESULT F_API FMOD_System_Init (FMOD_SYSTEM *system, int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata);
|
||||
FMOD_RESULT F_API FMOD_System_Close (FMOD_SYSTEM *system);
|
||||
|
||||
/* General post-init system functions. */
|
||||
FMOD_RESULT F_API FMOD_System_Update (FMOD_SYSTEM *system);
|
||||
FMOD_RESULT F_API FMOD_System_SetSpeakerPosition (FMOD_SYSTEM *system, FMOD_SPEAKER speaker, float x, float y, FMOD_BOOL active);
|
||||
FMOD_RESULT F_API FMOD_System_GetSpeakerPosition (FMOD_SYSTEM *system, FMOD_SPEAKER speaker, float *x, float *y, FMOD_BOOL *active);
|
||||
FMOD_RESULT F_API FMOD_System_SetStreamBufferSize (FMOD_SYSTEM *system, unsigned int filebuffersize, FMOD_TIMEUNIT filebuffersizetype);
|
||||
FMOD_RESULT F_API FMOD_System_GetStreamBufferSize (FMOD_SYSTEM *system, unsigned int *filebuffersize, FMOD_TIMEUNIT *filebuffersizetype);
|
||||
FMOD_RESULT F_API FMOD_System_Set3DSettings (FMOD_SYSTEM *system, float dopplerscale, float distancefactor, float rolloffscale);
|
||||
FMOD_RESULT F_API FMOD_System_Get3DSettings (FMOD_SYSTEM *system, float *dopplerscale, float *distancefactor, float *rolloffscale);
|
||||
FMOD_RESULT F_API FMOD_System_Set3DNumListeners (FMOD_SYSTEM *system, int numlisteners);
|
||||
FMOD_RESULT F_API FMOD_System_Get3DNumListeners (FMOD_SYSTEM *system, int *numlisteners);
|
||||
FMOD_RESULT F_API FMOD_System_Set3DListenerAttributes (FMOD_SYSTEM *system, int listener, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel, const FMOD_VECTOR *forward, const FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API FMOD_System_Get3DListenerAttributes (FMOD_SYSTEM *system, int listener, FMOD_VECTOR *pos, FMOD_VECTOR *vel, FMOD_VECTOR *forward, FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API FMOD_System_Set3DRolloffCallback (FMOD_SYSTEM *system, FMOD_3D_ROLLOFF_CALLBACK callback);
|
||||
FMOD_RESULT F_API FMOD_System_MixerSuspend (FMOD_SYSTEM *system);
|
||||
FMOD_RESULT F_API FMOD_System_MixerResume (FMOD_SYSTEM *system);
|
||||
FMOD_RESULT F_API FMOD_System_GetDefaultMixMatrix (FMOD_SYSTEM *system, FMOD_SPEAKERMODE sourcespeakermode, FMOD_SPEAKERMODE targetspeakermode, float *matrix, int matrixhop);
|
||||
FMOD_RESULT F_API FMOD_System_GetSpeakerModeChannels (FMOD_SYSTEM *system, FMOD_SPEAKERMODE mode, int *channels);
|
||||
|
||||
/* System information functions. */
|
||||
FMOD_RESULT F_API FMOD_System_GetVersion (FMOD_SYSTEM *system, unsigned int *version);
|
||||
FMOD_RESULT F_API FMOD_System_GetOutputHandle (FMOD_SYSTEM *system, void **handle);
|
||||
FMOD_RESULT F_API FMOD_System_GetChannelsPlaying (FMOD_SYSTEM *system, int *channels, int *realchannels);
|
||||
FMOD_RESULT F_API FMOD_System_GetCPUUsage (FMOD_SYSTEM *system, FMOD_CPU_USAGE *usage);
|
||||
FMOD_RESULT F_API FMOD_System_GetFileUsage (FMOD_SYSTEM *system, long long *sampleBytesRead, long long *streamBytesRead, long long *otherBytesRead);
|
||||
|
||||
/* Sound/DSP/Channel/FX creation and retrieval. */
|
||||
FMOD_RESULT F_API FMOD_System_CreateSound (FMOD_SYSTEM *system, const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, FMOD_SOUND **sound);
|
||||
FMOD_RESULT F_API FMOD_System_CreateStream (FMOD_SYSTEM *system, const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, FMOD_SOUND **sound);
|
||||
FMOD_RESULT F_API FMOD_System_CreateDSP (FMOD_SYSTEM *system, const FMOD_DSP_DESCRIPTION *description, FMOD_DSP **dsp);
|
||||
FMOD_RESULT F_API FMOD_System_CreateDSPByType (FMOD_SYSTEM *system, FMOD_DSP_TYPE type, FMOD_DSP **dsp);
|
||||
FMOD_RESULT F_API FMOD_System_CreateChannelGroup (FMOD_SYSTEM *system, const char *name, FMOD_CHANNELGROUP **channelgroup);
|
||||
FMOD_RESULT F_API FMOD_System_CreateSoundGroup (FMOD_SYSTEM *system, const char *name, FMOD_SOUNDGROUP **soundgroup);
|
||||
FMOD_RESULT F_API FMOD_System_CreateReverb3D (FMOD_SYSTEM *system, FMOD_REVERB3D **reverb);
|
||||
FMOD_RESULT F_API FMOD_System_PlaySound (FMOD_SYSTEM *system, FMOD_SOUND *sound, FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL paused, FMOD_CHANNEL **channel);
|
||||
FMOD_RESULT F_API FMOD_System_PlayDSP (FMOD_SYSTEM *system, FMOD_DSP *dsp, FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL paused, FMOD_CHANNEL **channel);
|
||||
FMOD_RESULT F_API FMOD_System_GetChannel (FMOD_SYSTEM *system, int channelid, FMOD_CHANNEL **channel);
|
||||
FMOD_RESULT F_API FMOD_System_GetDSPInfoByType (FMOD_SYSTEM *system, FMOD_DSP_TYPE type, const FMOD_DSP_DESCRIPTION **description);
|
||||
FMOD_RESULT F_API FMOD_System_GetMasterChannelGroup (FMOD_SYSTEM *system, FMOD_CHANNELGROUP **channelgroup);
|
||||
FMOD_RESULT F_API FMOD_System_GetMasterSoundGroup (FMOD_SYSTEM *system, FMOD_SOUNDGROUP **soundgroup);
|
||||
|
||||
/* Routing to ports. */
|
||||
FMOD_RESULT F_API FMOD_System_AttachChannelGroupToPort (FMOD_SYSTEM *system, FMOD_PORT_TYPE portType, FMOD_PORT_INDEX portIndex, FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL passThru);
|
||||
FMOD_RESULT F_API FMOD_System_DetachChannelGroupFromPort(FMOD_SYSTEM *system, FMOD_CHANNELGROUP *channelgroup);
|
||||
|
||||
/* Reverb API. */
|
||||
FMOD_RESULT F_API FMOD_System_SetReverbProperties (FMOD_SYSTEM *system, int instance, const FMOD_REVERB_PROPERTIES *prop);
|
||||
FMOD_RESULT F_API FMOD_System_GetReverbProperties (FMOD_SYSTEM *system, int instance, FMOD_REVERB_PROPERTIES *prop);
|
||||
|
||||
/* System level DSP functionality. */
|
||||
FMOD_RESULT F_API FMOD_System_LockDSP (FMOD_SYSTEM *system);
|
||||
FMOD_RESULT F_API FMOD_System_UnlockDSP (FMOD_SYSTEM *system);
|
||||
|
||||
/* Recording API. */
|
||||
FMOD_RESULT F_API FMOD_System_GetRecordNumDrivers (FMOD_SYSTEM *system, int *numdrivers, int *numconnected);
|
||||
FMOD_RESULT F_API FMOD_System_GetRecordDriverInfo (FMOD_SYSTEM *system, int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels, FMOD_DRIVER_STATE *state);
|
||||
FMOD_RESULT F_API FMOD_System_GetRecordPosition (FMOD_SYSTEM *system, int id, unsigned int *position);
|
||||
FMOD_RESULT F_API FMOD_System_RecordStart (FMOD_SYSTEM *system, int id, FMOD_SOUND *sound, FMOD_BOOL loop);
|
||||
FMOD_RESULT F_API FMOD_System_RecordStop (FMOD_SYSTEM *system, int id);
|
||||
FMOD_RESULT F_API FMOD_System_IsRecording (FMOD_SYSTEM *system, int id, FMOD_BOOL *recording);
|
||||
|
||||
/* Geometry API. */
|
||||
FMOD_RESULT F_API FMOD_System_CreateGeometry (FMOD_SYSTEM *system, int maxpolygons, int maxvertices, FMOD_GEOMETRY **geometry);
|
||||
FMOD_RESULT F_API FMOD_System_SetGeometrySettings (FMOD_SYSTEM *system, float maxworldsize);
|
||||
FMOD_RESULT F_API FMOD_System_GetGeometrySettings (FMOD_SYSTEM *system, float *maxworldsize);
|
||||
FMOD_RESULT F_API FMOD_System_LoadGeometry (FMOD_SYSTEM *system, const void *data, int datasize, FMOD_GEOMETRY **geometry);
|
||||
FMOD_RESULT F_API FMOD_System_GetGeometryOcclusion (FMOD_SYSTEM *system, const FMOD_VECTOR *listener, const FMOD_VECTOR *source, float *direct, float *reverb);
|
||||
|
||||
/* Network functions. */
|
||||
FMOD_RESULT F_API FMOD_System_SetNetworkProxy (FMOD_SYSTEM *system, const char *proxy);
|
||||
FMOD_RESULT F_API FMOD_System_GetNetworkProxy (FMOD_SYSTEM *system, char *proxy, int proxylen);
|
||||
FMOD_RESULT F_API FMOD_System_SetNetworkTimeout (FMOD_SYSTEM *system, int timeout);
|
||||
FMOD_RESULT F_API FMOD_System_GetNetworkTimeout (FMOD_SYSTEM *system, int *timeout);
|
||||
|
||||
/* Userdata set/get. */
|
||||
FMOD_RESULT F_API FMOD_System_SetUserData (FMOD_SYSTEM *system, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_System_GetUserData (FMOD_SYSTEM *system, void **userdata);
|
||||
|
||||
/* Sound API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Sound_Release (FMOD_SOUND *sound);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetSystemObject (FMOD_SOUND *sound, FMOD_SYSTEM **system);
|
||||
|
||||
/*
|
||||
Standard sound manipulation functions.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Sound_Lock (FMOD_SOUND *sound, unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
|
||||
FMOD_RESULT F_API FMOD_Sound_Unlock (FMOD_SOUND *sound, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
|
||||
FMOD_RESULT F_API FMOD_Sound_SetDefaults (FMOD_SOUND *sound, float frequency, int priority);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetDefaults (FMOD_SOUND *sound, float *frequency, int *priority);
|
||||
FMOD_RESULT F_API FMOD_Sound_Set3DMinMaxDistance (FMOD_SOUND *sound, float min, float max);
|
||||
FMOD_RESULT F_API FMOD_Sound_Get3DMinMaxDistance (FMOD_SOUND *sound, float *min, float *max);
|
||||
FMOD_RESULT F_API FMOD_Sound_Set3DConeSettings (FMOD_SOUND *sound, float insideconeangle, float outsideconeangle, float outsidevolume);
|
||||
FMOD_RESULT F_API FMOD_Sound_Get3DConeSettings (FMOD_SOUND *sound, float *insideconeangle, float *outsideconeangle, float *outsidevolume);
|
||||
FMOD_RESULT F_API FMOD_Sound_Set3DCustomRolloff (FMOD_SOUND *sound, FMOD_VECTOR *points, int numpoints);
|
||||
FMOD_RESULT F_API FMOD_Sound_Get3DCustomRolloff (FMOD_SOUND *sound, FMOD_VECTOR **points, int *numpoints);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetSubSound (FMOD_SOUND *sound, int index, FMOD_SOUND **subsound);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetSubSoundParent (FMOD_SOUND *sound, FMOD_SOUND **parentsound);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetName (FMOD_SOUND *sound, char *name, int namelen);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetLength (FMOD_SOUND *sound, unsigned int *length, FMOD_TIMEUNIT lengthtype);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetFormat (FMOD_SOUND *sound, FMOD_SOUND_TYPE *type, FMOD_SOUND_FORMAT *format, int *channels, int *bits);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetNumSubSounds (FMOD_SOUND *sound, int *numsubsounds);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetNumTags (FMOD_SOUND *sound, int *numtags, int *numtagsupdated);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetTag (FMOD_SOUND *sound, const char *name, int index, FMOD_TAG *tag);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetOpenState (FMOD_SOUND *sound, FMOD_OPENSTATE *openstate, unsigned int *percentbuffered, FMOD_BOOL *starving, FMOD_BOOL *diskbusy);
|
||||
FMOD_RESULT F_API FMOD_Sound_ReadData (FMOD_SOUND *sound, void *buffer, unsigned int length, unsigned int *read);
|
||||
FMOD_RESULT F_API FMOD_Sound_SeekData (FMOD_SOUND *sound, unsigned int pcm);
|
||||
|
||||
FMOD_RESULT F_API FMOD_Sound_SetSoundGroup (FMOD_SOUND *sound, FMOD_SOUNDGROUP *soundgroup);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetSoundGroup (FMOD_SOUND *sound, FMOD_SOUNDGROUP **soundgroup);
|
||||
|
||||
/*
|
||||
Synchronization point API. These points can come from markers embedded in wav files, and can also generate channel callbacks.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Sound_GetNumSyncPoints (FMOD_SOUND *sound, int *numsyncpoints);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetSyncPoint (FMOD_SOUND *sound, int index, FMOD_SYNCPOINT **point);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetSyncPointInfo (FMOD_SOUND *sound, FMOD_SYNCPOINT *point, char *name, int namelen, unsigned int *offset, FMOD_TIMEUNIT offsettype);
|
||||
FMOD_RESULT F_API FMOD_Sound_AddSyncPoint (FMOD_SOUND *sound, unsigned int offset, FMOD_TIMEUNIT offsettype, const char *name, FMOD_SYNCPOINT **point);
|
||||
FMOD_RESULT F_API FMOD_Sound_DeleteSyncPoint (FMOD_SOUND *sound, FMOD_SYNCPOINT *point);
|
||||
|
||||
/*
|
||||
Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Sound_SetMode (FMOD_SOUND *sound, FMOD_MODE mode);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetMode (FMOD_SOUND *sound, FMOD_MODE *mode);
|
||||
FMOD_RESULT F_API FMOD_Sound_SetLoopCount (FMOD_SOUND *sound, int loopcount);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetLoopCount (FMOD_SOUND *sound, int *loopcount);
|
||||
FMOD_RESULT F_API FMOD_Sound_SetLoopPoints (FMOD_SOUND *sound, unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetLoopPoints (FMOD_SOUND *sound, unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype);
|
||||
|
||||
/*
|
||||
For MOD/S3M/XM/IT/MID sequenced formats only.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Sound_GetMusicNumChannels (FMOD_SOUND *sound, int *numchannels);
|
||||
FMOD_RESULT F_API FMOD_Sound_SetMusicChannelVolume (FMOD_SOUND *sound, int channel, float volume);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetMusicChannelVolume (FMOD_SOUND *sound, int channel, float *volume);
|
||||
FMOD_RESULT F_API FMOD_Sound_SetMusicSpeed (FMOD_SOUND *sound, float speed);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetMusicSpeed (FMOD_SOUND *sound, float *speed);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Sound_SetUserData (FMOD_SOUND *sound, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_Sound_GetUserData (FMOD_SOUND *sound, void **userdata);
|
||||
|
||||
/*
|
||||
'Channel' API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_GetSystemObject (FMOD_CHANNEL *channel, FMOD_SYSTEM **system);
|
||||
|
||||
/*
|
||||
General control functionality for Channels and ChannelGroups.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_Stop (FMOD_CHANNEL *channel);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetPaused (FMOD_CHANNEL *channel, FMOD_BOOL paused);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetPaused (FMOD_CHANNEL *channel, FMOD_BOOL *paused);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetVolume (FMOD_CHANNEL *channel, float volume);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetVolume (FMOD_CHANNEL *channel, float *volume);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetVolumeRamp (FMOD_CHANNEL *channel, FMOD_BOOL ramp);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetVolumeRamp (FMOD_CHANNEL *channel, FMOD_BOOL *ramp);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetAudibility (FMOD_CHANNEL *channel, float *audibility);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetPitch (FMOD_CHANNEL *channel, float pitch);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetPitch (FMOD_CHANNEL *channel, float *pitch);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetMute (FMOD_CHANNEL *channel, FMOD_BOOL mute);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetMute (FMOD_CHANNEL *channel, FMOD_BOOL *mute);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetReverbProperties (FMOD_CHANNEL *channel, int instance, float wet);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetReverbProperties (FMOD_CHANNEL *channel, int instance, float *wet);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetLowPassGain (FMOD_CHANNEL *channel, float gain);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetLowPassGain (FMOD_CHANNEL *channel, float *gain);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetMode (FMOD_CHANNEL *channel, FMOD_MODE mode);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetMode (FMOD_CHANNEL *channel, FMOD_MODE *mode);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetCallback (FMOD_CHANNEL *channel, FMOD_CHANNELCONTROL_CALLBACK callback);
|
||||
FMOD_RESULT F_API FMOD_Channel_IsPlaying (FMOD_CHANNEL *channel, FMOD_BOOL *isplaying);
|
||||
|
||||
/*
|
||||
Note all 'set' functions alter a final matrix, this is why the only get function is getMixMatrix, to avoid other get functions returning incorrect/obsolete values.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_SetPan (FMOD_CHANNEL *channel, float pan);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetMixLevelsOutput (FMOD_CHANNEL *channel, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetMixLevelsInput (FMOD_CHANNEL *channel, float *levels, int numlevels);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetMixMatrix (FMOD_CHANNEL *channel, float *matrix, int outchannels, int inchannels, int inchannel_hop);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetMixMatrix (FMOD_CHANNEL *channel, float *matrix, int *outchannels, int *inchannels, int inchannel_hop);
|
||||
|
||||
/*
|
||||
Clock based functionality.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_GetDSPClock (FMOD_CHANNEL *channel, unsigned long long *dspclock, unsigned long long *parentclock);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetDelay (FMOD_CHANNEL *channel, unsigned long long dspclock_start, unsigned long long dspclock_end, FMOD_BOOL stopchannels);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetDelay (FMOD_CHANNEL *channel, unsigned long long *dspclock_start, unsigned long long *dspclock_end, FMOD_BOOL *stopchannels);
|
||||
FMOD_RESULT F_API FMOD_Channel_AddFadePoint (FMOD_CHANNEL *channel, unsigned long long dspclock, float volume);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetFadePointRamp (FMOD_CHANNEL *channel, unsigned long long dspclock, float volume);
|
||||
FMOD_RESULT F_API FMOD_Channel_RemoveFadePoints (FMOD_CHANNEL *channel, unsigned long long dspclock_start, unsigned long long dspclock_end);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetFadePoints (FMOD_CHANNEL *channel, unsigned int *numpoints, unsigned long long *point_dspclock, float *point_volume);
|
||||
|
||||
/*
|
||||
DSP effects.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_GetDSP (FMOD_CHANNEL *channel, int index, FMOD_DSP **dsp);
|
||||
FMOD_RESULT F_API FMOD_Channel_AddDSP (FMOD_CHANNEL *channel, int index, FMOD_DSP *dsp);
|
||||
FMOD_RESULT F_API FMOD_Channel_RemoveDSP (FMOD_CHANNEL *channel, FMOD_DSP *dsp);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetNumDSPs (FMOD_CHANNEL *channel, int *numdsps);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetDSPIndex (FMOD_CHANNEL *channel, FMOD_DSP *dsp, int index);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetDSPIndex (FMOD_CHANNEL *channel, FMOD_DSP *dsp, int *index);
|
||||
|
||||
/*
|
||||
3D functionality.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DAttributes (FMOD_CHANNEL *channel, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DAttributes (FMOD_CHANNEL *channel, FMOD_VECTOR *pos, FMOD_VECTOR *vel);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DMinMaxDistance (FMOD_CHANNEL *channel, float mindistance, float maxdistance);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DMinMaxDistance (FMOD_CHANNEL *channel, float *mindistance, float *maxdistance);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DConeSettings (FMOD_CHANNEL *channel, float insideconeangle, float outsideconeangle, float outsidevolume);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DConeSettings (FMOD_CHANNEL *channel, float *insideconeangle, float *outsideconeangle, float *outsidevolume);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DConeOrientation (FMOD_CHANNEL *channel, FMOD_VECTOR *orientation);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DConeOrientation (FMOD_CHANNEL *channel, FMOD_VECTOR *orientation);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DCustomRolloff (FMOD_CHANNEL *channel, FMOD_VECTOR *points, int numpoints);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DCustomRolloff (FMOD_CHANNEL *channel, FMOD_VECTOR **points, int *numpoints);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DOcclusion (FMOD_CHANNEL *channel, float directocclusion, float reverbocclusion);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DOcclusion (FMOD_CHANNEL *channel, float *directocclusion, float *reverbocclusion);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DSpread (FMOD_CHANNEL *channel, float angle);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DSpread (FMOD_CHANNEL *channel, float *angle);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DLevel (FMOD_CHANNEL *channel, float level);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DLevel (FMOD_CHANNEL *channel, float *level);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DDopplerLevel (FMOD_CHANNEL *channel, float level);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DDopplerLevel (FMOD_CHANNEL *channel, float *level);
|
||||
FMOD_RESULT F_API FMOD_Channel_Set3DDistanceFilter (FMOD_CHANNEL *channel, FMOD_BOOL custom, float customLevel, float centerFreq);
|
||||
FMOD_RESULT F_API FMOD_Channel_Get3DDistanceFilter (FMOD_CHANNEL *channel, FMOD_BOOL *custom, float *customLevel, float *centerFreq);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_SetUserData (FMOD_CHANNEL *channel, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetUserData (FMOD_CHANNEL *channel, void **userdata);
|
||||
|
||||
/*
|
||||
Channel specific control functionality.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_SetFrequency (FMOD_CHANNEL *channel, float frequency);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetFrequency (FMOD_CHANNEL *channel, float *frequency);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetPriority (FMOD_CHANNEL *channel, int priority);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetPriority (FMOD_CHANNEL *channel, int *priority);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetPosition (FMOD_CHANNEL *channel, unsigned int position, FMOD_TIMEUNIT postype);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetPosition (FMOD_CHANNEL *channel, unsigned int *position, FMOD_TIMEUNIT postype);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetChannelGroup (FMOD_CHANNEL *channel, FMOD_CHANNELGROUP *channelgroup);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetChannelGroup (FMOD_CHANNEL *channel, FMOD_CHANNELGROUP **channelgroup);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetLoopCount (FMOD_CHANNEL *channel, int loopcount);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetLoopCount (FMOD_CHANNEL *channel, int *loopcount);
|
||||
FMOD_RESULT F_API FMOD_Channel_SetLoopPoints (FMOD_CHANNEL *channel, unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetLoopPoints (FMOD_CHANNEL *channel, unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype);
|
||||
|
||||
/*
|
||||
Information only functions.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Channel_IsVirtual (FMOD_CHANNEL *channel, FMOD_BOOL *isvirtual);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetCurrentSound (FMOD_CHANNEL *channel, FMOD_SOUND **sound);
|
||||
FMOD_RESULT F_API FMOD_Channel_GetIndex (FMOD_CHANNEL *channel, int *index);
|
||||
|
||||
/*
|
||||
'ChannelGroup' API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetSystemObject (FMOD_CHANNELGROUP *channelgroup, FMOD_SYSTEM **system);
|
||||
|
||||
/*
|
||||
General control functionality for Channels and ChannelGroups.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Stop (FMOD_CHANNELGROUP *channelgroup);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetPaused (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL paused);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetPaused (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL *paused);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetVolume (FMOD_CHANNELGROUP *channelgroup, float volume);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetVolume (FMOD_CHANNELGROUP *channelgroup, float *volume);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetVolumeRamp (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL ramp);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetVolumeRamp (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL *ramp);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetAudibility (FMOD_CHANNELGROUP *channelgroup, float *audibility);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetPitch (FMOD_CHANNELGROUP *channelgroup, float pitch);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetPitch (FMOD_CHANNELGROUP *channelgroup, float *pitch);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetMute (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL mute);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetMute (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL *mute);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetReverbProperties (FMOD_CHANNELGROUP *channelgroup, int instance, float wet);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetReverbProperties (FMOD_CHANNELGROUP *channelgroup, int instance, float *wet);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetLowPassGain (FMOD_CHANNELGROUP *channelgroup, float gain);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetLowPassGain (FMOD_CHANNELGROUP *channelgroup, float *gain);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetMode (FMOD_CHANNELGROUP *channelgroup, FMOD_MODE mode);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetMode (FMOD_CHANNELGROUP *channelgroup, FMOD_MODE *mode);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetCallback (FMOD_CHANNELGROUP *channelgroup, FMOD_CHANNELCONTROL_CALLBACK callback);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_IsPlaying (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL *isplaying);
|
||||
|
||||
/*
|
||||
Note all 'set' functions alter a final matrix, this is why the only get function is getMixMatrix, to avoid other get functions returning incorrect/obsolete values.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetPan (FMOD_CHANNELGROUP *channelgroup, float pan);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetMixLevelsOutput (FMOD_CHANNELGROUP *channelgroup, float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetMixLevelsInput (FMOD_CHANNELGROUP *channelgroup, float *levels, int numlevels);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetMixMatrix (FMOD_CHANNELGROUP *channelgroup, float *matrix, int outchannels, int inchannels, int inchannel_hop);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetMixMatrix (FMOD_CHANNELGROUP *channelgroup, float *matrix, int *outchannels, int *inchannels, int inchannel_hop);
|
||||
|
||||
/*
|
||||
Clock based functionality.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetDSPClock (FMOD_CHANNELGROUP *channelgroup, unsigned long long *dspclock, unsigned long long *parentclock);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetDelay (FMOD_CHANNELGROUP *channelgroup, unsigned long long dspclock_start, unsigned long long dspclock_end, FMOD_BOOL stopchannels);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetDelay (FMOD_CHANNELGROUP *channelgroup, unsigned long long *dspclock_start, unsigned long long *dspclock_end, FMOD_BOOL *stopchannels);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_AddFadePoint (FMOD_CHANNELGROUP *channelgroup, unsigned long long dspclock, float volume);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetFadePointRamp (FMOD_CHANNELGROUP *channelgroup, unsigned long long dspclock, float volume);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_RemoveFadePoints (FMOD_CHANNELGROUP *channelgroup, unsigned long long dspclock_start, unsigned long long dspclock_end);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetFadePoints (FMOD_CHANNELGROUP *channelgroup, unsigned int *numpoints, unsigned long long *point_dspclock, float *point_volume);
|
||||
|
||||
/*
|
||||
DSP effects.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetDSP (FMOD_CHANNELGROUP *channelgroup, int index, FMOD_DSP **dsp);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_AddDSP (FMOD_CHANNELGROUP *channelgroup, int index, FMOD_DSP *dsp);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_RemoveDSP (FMOD_CHANNELGROUP *channelgroup, FMOD_DSP *dsp);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetNumDSPs (FMOD_CHANNELGROUP *channelgroup, int *numdsps);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetDSPIndex (FMOD_CHANNELGROUP *channelgroup, FMOD_DSP *dsp, int index);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetDSPIndex (FMOD_CHANNELGROUP *channelgroup, FMOD_DSP *dsp, int *index);
|
||||
|
||||
/*
|
||||
3D functionality.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DAttributes (FMOD_CHANNELGROUP *channelgroup, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DAttributes (FMOD_CHANNELGROUP *channelgroup, FMOD_VECTOR *pos, FMOD_VECTOR *vel);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DMinMaxDistance (FMOD_CHANNELGROUP *channelgroup, float mindistance, float maxdistance);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DMinMaxDistance (FMOD_CHANNELGROUP *channelgroup, float *mindistance, float *maxdistance);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DConeSettings (FMOD_CHANNELGROUP *channelgroup, float insideconeangle, float outsideconeangle, float outsidevolume);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DConeSettings (FMOD_CHANNELGROUP *channelgroup, float *insideconeangle, float *outsideconeangle, float *outsidevolume);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DConeOrientation(FMOD_CHANNELGROUP *channelgroup, FMOD_VECTOR *orientation);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DConeOrientation(FMOD_CHANNELGROUP *channelgroup, FMOD_VECTOR *orientation);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DCustomRolloff (FMOD_CHANNELGROUP *channelgroup, FMOD_VECTOR *points, int numpoints);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DCustomRolloff (FMOD_CHANNELGROUP *channelgroup, FMOD_VECTOR **points, int *numpoints);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DOcclusion (FMOD_CHANNELGROUP *channelgroup, float directocclusion, float reverbocclusion);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DOcclusion (FMOD_CHANNELGROUP *channelgroup, float *directocclusion, float *reverbocclusion);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DSpread (FMOD_CHANNELGROUP *channelgroup, float angle);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DSpread (FMOD_CHANNELGROUP *channelgroup, float *angle);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DLevel (FMOD_CHANNELGROUP *channelgroup, float level);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DLevel (FMOD_CHANNELGROUP *channelgroup, float *level);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DDopplerLevel (FMOD_CHANNELGROUP *channelgroup, float level);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DDopplerLevel (FMOD_CHANNELGROUP *channelgroup, float *level);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Set3DDistanceFilter (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL custom, float customLevel, float centerFreq);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Get3DDistanceFilter (FMOD_CHANNELGROUP *channelgroup, FMOD_BOOL *custom, float *customLevel, float *centerFreq);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_SetUserData (FMOD_CHANNELGROUP *channelgroup, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetUserData (FMOD_CHANNELGROUP *channelgroup, void **userdata);
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_Release (FMOD_CHANNELGROUP *channelgroup);
|
||||
|
||||
/*
|
||||
Nested channel groups.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_AddGroup (FMOD_CHANNELGROUP *channelgroup, FMOD_CHANNELGROUP *group, FMOD_BOOL propagatedspclock, FMOD_DSPCONNECTION **connection);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetNumGroups (FMOD_CHANNELGROUP *channelgroup, int *numgroups);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetGroup (FMOD_CHANNELGROUP *channelgroup, int index, FMOD_CHANNELGROUP **group);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetParentGroup (FMOD_CHANNELGROUP *channelgroup, FMOD_CHANNELGROUP **group);
|
||||
|
||||
/*
|
||||
Information only functions.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetName (FMOD_CHANNELGROUP *channelgroup, char *name, int namelen);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetNumChannels (FMOD_CHANNELGROUP *channelgroup, int *numchannels);
|
||||
FMOD_RESULT F_API FMOD_ChannelGroup_GetChannel (FMOD_CHANNELGROUP *channelgroup, int index, FMOD_CHANNEL **channel);
|
||||
|
||||
/*
|
||||
'SoundGroup' API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_Release (FMOD_SOUNDGROUP *soundgroup);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetSystemObject (FMOD_SOUNDGROUP *soundgroup, FMOD_SYSTEM **system);
|
||||
|
||||
/*
|
||||
SoundGroup control functions.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_SetMaxAudible (FMOD_SOUNDGROUP *soundgroup, int maxaudible);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetMaxAudible (FMOD_SOUNDGROUP *soundgroup, int *maxaudible);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_SetMaxAudibleBehavior (FMOD_SOUNDGROUP *soundgroup, FMOD_SOUNDGROUP_BEHAVIOR behavior);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetMaxAudibleBehavior (FMOD_SOUNDGROUP *soundgroup, FMOD_SOUNDGROUP_BEHAVIOR *behavior);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_SetMuteFadeSpeed (FMOD_SOUNDGROUP *soundgroup, float speed);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetMuteFadeSpeed (FMOD_SOUNDGROUP *soundgroup, float *speed);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_SetVolume (FMOD_SOUNDGROUP *soundgroup, float volume);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetVolume (FMOD_SOUNDGROUP *soundgroup, float *volume);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_Stop (FMOD_SOUNDGROUP *soundgroup);
|
||||
|
||||
/*
|
||||
Information only functions.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetName (FMOD_SOUNDGROUP *soundgroup, char *name, int namelen);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetNumSounds (FMOD_SOUNDGROUP *soundgroup, int *numsounds);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetSound (FMOD_SOUNDGROUP *soundgroup, int index, FMOD_SOUND **sound);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetNumPlaying (FMOD_SOUNDGROUP *soundgroup, int *numplaying);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_SetUserData (FMOD_SOUNDGROUP *soundgroup, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_SoundGroup_GetUserData (FMOD_SOUNDGROUP *soundgroup, void **userdata);
|
||||
|
||||
/*
|
||||
'DSP' API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSP_Release (FMOD_DSP *dsp);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetSystemObject (FMOD_DSP *dsp, FMOD_SYSTEM **system);
|
||||
|
||||
/*
|
||||
Connection / disconnection / input and output enumeration.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSP_AddInput (FMOD_DSP *dsp, FMOD_DSP *input, FMOD_DSPCONNECTION **connection, FMOD_DSPCONNECTION_TYPE type);
|
||||
FMOD_RESULT F_API FMOD_DSP_DisconnectFrom (FMOD_DSP *dsp, FMOD_DSP *target, FMOD_DSPCONNECTION *connection);
|
||||
FMOD_RESULT F_API FMOD_DSP_DisconnectAll (FMOD_DSP *dsp, FMOD_BOOL inputs, FMOD_BOOL outputs);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetNumInputs (FMOD_DSP *dsp, int *numinputs);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetNumOutputs (FMOD_DSP *dsp, int *numoutputs);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetInput (FMOD_DSP *dsp, int index, FMOD_DSP **input, FMOD_DSPCONNECTION **inputconnection);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetOutput (FMOD_DSP *dsp, int index, FMOD_DSP **output, FMOD_DSPCONNECTION **outputconnection);
|
||||
|
||||
/*
|
||||
DSP unit control.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSP_SetActive (FMOD_DSP *dsp, FMOD_BOOL active);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetActive (FMOD_DSP *dsp, FMOD_BOOL *active);
|
||||
FMOD_RESULT F_API FMOD_DSP_SetBypass (FMOD_DSP *dsp, FMOD_BOOL bypass);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetBypass (FMOD_DSP *dsp, FMOD_BOOL *bypass);
|
||||
FMOD_RESULT F_API FMOD_DSP_SetWetDryMix (FMOD_DSP *dsp, float prewet, float postwet, float dry);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetWetDryMix (FMOD_DSP *dsp, float *prewet, float *postwet, float *dry);
|
||||
FMOD_RESULT F_API FMOD_DSP_SetChannelFormat (FMOD_DSP *dsp, FMOD_CHANNELMASK channelmask, int numchannels, FMOD_SPEAKERMODE source_speakermode);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetChannelFormat (FMOD_DSP *dsp, FMOD_CHANNELMASK *channelmask, int *numchannels, FMOD_SPEAKERMODE *source_speakermode);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetOutputChannelFormat (FMOD_DSP *dsp, FMOD_CHANNELMASK inmask, int inchannels, FMOD_SPEAKERMODE inspeakermode, FMOD_CHANNELMASK *outmask, int *outchannels, FMOD_SPEAKERMODE *outspeakermode);
|
||||
FMOD_RESULT F_API FMOD_DSP_Reset (FMOD_DSP *dsp);
|
||||
FMOD_RESULT F_API FMOD_DSP_SetCallback (FMOD_DSP *dsp, FMOD_DSP_CALLBACK callback);
|
||||
|
||||
/*
|
||||
DSP parameter control.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSP_SetParameterFloat (FMOD_DSP *dsp, int index, float value);
|
||||
FMOD_RESULT F_API FMOD_DSP_SetParameterInt (FMOD_DSP *dsp, int index, int value);
|
||||
FMOD_RESULT F_API FMOD_DSP_SetParameterBool (FMOD_DSP *dsp, int index, FMOD_BOOL value);
|
||||
FMOD_RESULT F_API FMOD_DSP_SetParameterData (FMOD_DSP *dsp, int index, void *data, unsigned int length);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetParameterFloat (FMOD_DSP *dsp, int index, float *value, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetParameterInt (FMOD_DSP *dsp, int index, int *value, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetParameterBool (FMOD_DSP *dsp, int index, FMOD_BOOL *value, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetParameterData (FMOD_DSP *dsp, int index, void **data, unsigned int *length, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetNumParameters (FMOD_DSP *dsp, int *numparams);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetParameterInfo (FMOD_DSP *dsp, int index, FMOD_DSP_PARAMETER_DESC **desc);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetDataParameterIndex (FMOD_DSP *dsp, int datatype, int *index);
|
||||
FMOD_RESULT F_API FMOD_DSP_ShowConfigDialog (FMOD_DSP *dsp, void *hwnd, FMOD_BOOL show);
|
||||
|
||||
/*
|
||||
DSP attributes.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSP_GetInfo (FMOD_DSP *dsp, char *name, unsigned int *version, int *channels, int *configwidth, int *configheight);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetType (FMOD_DSP *dsp, FMOD_DSP_TYPE *type);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetIdle (FMOD_DSP *dsp, FMOD_BOOL *idle);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSP_SetUserData (FMOD_DSP *dsp, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetUserData (FMOD_DSP *dsp, void **userdata);
|
||||
|
||||
/*
|
||||
Metering.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSP_SetMeteringEnabled (FMOD_DSP *dsp, FMOD_BOOL inputEnabled, FMOD_BOOL outputEnabled);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetMeteringEnabled (FMOD_DSP *dsp, FMOD_BOOL *inputEnabled, FMOD_BOOL *outputEnabled);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetMeteringInfo (FMOD_DSP *dsp, FMOD_DSP_METERING_INFO *inputInfo, FMOD_DSP_METERING_INFO *outputInfo);
|
||||
FMOD_RESULT F_API FMOD_DSP_GetCPUUsage (FMOD_DSP *dsp, unsigned int *exclusive, unsigned int *inclusive);
|
||||
|
||||
/*
|
||||
'DSPConnection' API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_GetInput (FMOD_DSPCONNECTION *dspconnection, FMOD_DSP **input);
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_GetOutput (FMOD_DSPCONNECTION *dspconnection, FMOD_DSP **output);
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_SetMix (FMOD_DSPCONNECTION *dspconnection, float volume);
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_GetMix (FMOD_DSPCONNECTION *dspconnection, float *volume);
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_SetMixMatrix (FMOD_DSPCONNECTION *dspconnection, float *matrix, int outchannels, int inchannels, int inchannel_hop);
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_GetMixMatrix (FMOD_DSPCONNECTION *dspconnection, float *matrix, int *outchannels, int *inchannels, int inchannel_hop);
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_GetType (FMOD_DSPCONNECTION *dspconnection, FMOD_DSPCONNECTION_TYPE *type);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_SetUserData (FMOD_DSPCONNECTION *dspconnection, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_DSPConnection_GetUserData (FMOD_DSPCONNECTION *dspconnection, void **userdata);
|
||||
|
||||
/*
|
||||
'Geometry' API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Geometry_Release (FMOD_GEOMETRY *geometry);
|
||||
|
||||
/*
|
||||
Polygon manipulation.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Geometry_AddPolygon (FMOD_GEOMETRY *geometry, float directocclusion, float reverbocclusion, FMOD_BOOL doublesided, int numvertices, const FMOD_VECTOR *vertices, int *polygonindex);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetNumPolygons (FMOD_GEOMETRY *geometry, int *numpolygons);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetMaxPolygons (FMOD_GEOMETRY *geometry, int *maxpolygons, int *maxvertices);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetPolygonNumVertices (FMOD_GEOMETRY *geometry, int index, int *numvertices);
|
||||
FMOD_RESULT F_API FMOD_Geometry_SetPolygonVertex (FMOD_GEOMETRY *geometry, int index, int vertexindex, const FMOD_VECTOR *vertex);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetPolygonVertex (FMOD_GEOMETRY *geometry, int index, int vertexindex, FMOD_VECTOR *vertex);
|
||||
FMOD_RESULT F_API FMOD_Geometry_SetPolygonAttributes (FMOD_GEOMETRY *geometry, int index, float directocclusion, float reverbocclusion, FMOD_BOOL doublesided);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetPolygonAttributes (FMOD_GEOMETRY *geometry, int index, float *directocclusion, float *reverbocclusion, FMOD_BOOL *doublesided);
|
||||
|
||||
/*
|
||||
Object manipulation.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Geometry_SetActive (FMOD_GEOMETRY *geometry, FMOD_BOOL active);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetActive (FMOD_GEOMETRY *geometry, FMOD_BOOL *active);
|
||||
FMOD_RESULT F_API FMOD_Geometry_SetRotation (FMOD_GEOMETRY *geometry, const FMOD_VECTOR *forward, const FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetRotation (FMOD_GEOMETRY *geometry, FMOD_VECTOR *forward, FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API FMOD_Geometry_SetPosition (FMOD_GEOMETRY *geometry, const FMOD_VECTOR *position);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetPosition (FMOD_GEOMETRY *geometry, FMOD_VECTOR *position);
|
||||
FMOD_RESULT F_API FMOD_Geometry_SetScale (FMOD_GEOMETRY *geometry, const FMOD_VECTOR *scale);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetScale (FMOD_GEOMETRY *geometry, FMOD_VECTOR *scale);
|
||||
FMOD_RESULT F_API FMOD_Geometry_Save (FMOD_GEOMETRY *geometry, void *data, int *datasize);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Geometry_SetUserData (FMOD_GEOMETRY *geometry, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_Geometry_GetUserData (FMOD_GEOMETRY *geometry, void **userdata);
|
||||
|
||||
/*
|
||||
'Reverb3D' API
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_Release (FMOD_REVERB3D *reverb3d);
|
||||
|
||||
/*
|
||||
Reverb manipulation.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_Set3DAttributes (FMOD_REVERB3D *reverb3d, const FMOD_VECTOR *position, float mindistance, float maxdistance);
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_Get3DAttributes (FMOD_REVERB3D *reverb3d, FMOD_VECTOR *position, float *mindistance, float *maxdistance);
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_SetProperties (FMOD_REVERB3D *reverb3d, const FMOD_REVERB_PROPERTIES *properties);
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_GetProperties (FMOD_REVERB3D *reverb3d, FMOD_REVERB_PROPERTIES *properties);
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_SetActive (FMOD_REVERB3D *reverb3d, FMOD_BOOL active);
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_GetActive (FMOD_REVERB3D *reverb3d, FMOD_BOOL *active);
|
||||
|
||||
/*
|
||||
Userdata set/get.
|
||||
*/
|
||||
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_SetUserData (FMOD_REVERB3D *reverb3d, void *userdata);
|
||||
FMOD_RESULT F_API FMOD_Reverb3D_GetUserData (FMOD_REVERB3D *reverb3d, void **userdata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FMOD_H */
|
||||
607
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod.hpp
vendored
Normal file
607
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod.hpp
vendored
Normal file
@ -0,0 +1,607 @@
|
||||
/* ======================================================================================== */
|
||||
/* FMOD Core API - C++ header file. */
|
||||
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2023. */
|
||||
/* */
|
||||
/* Use this header in conjunction with fmod_common.h (which contains all the constants / */
|
||||
/* callbacks) to develop using the C++ language. */
|
||||
/* */
|
||||
/* For more detail visit: */
|
||||
/* https://fmod.com/docs/2.02/api/core-api.html */
|
||||
/* ======================================================================================== */
|
||||
#ifndef _FMOD_HPP
|
||||
#define _FMOD_HPP
|
||||
|
||||
#include "fmod_common.h"
|
||||
#include "fmod.h"
|
||||
|
||||
/*
|
||||
FMOD Namespace
|
||||
*/
|
||||
namespace FMOD
|
||||
{
|
||||
class System;
|
||||
class Sound;
|
||||
class ChannelControl;
|
||||
class Channel;
|
||||
class ChannelGroup;
|
||||
class SoundGroup;
|
||||
class DSP;
|
||||
class DSPConnection;
|
||||
class Geometry;
|
||||
class Reverb3D;
|
||||
|
||||
/*
|
||||
FMOD global system functions (optional).
|
||||
*/
|
||||
inline FMOD_RESULT Memory_Initialize (void *poolmem, int poollen, FMOD_MEMORY_ALLOC_CALLBACK useralloc, FMOD_MEMORY_REALLOC_CALLBACK userrealloc, FMOD_MEMORY_FREE_CALLBACK userfree, FMOD_MEMORY_TYPE memtypeflags = FMOD_MEMORY_ALL) { return FMOD_Memory_Initialize(poolmem, poollen, useralloc, userrealloc, userfree, memtypeflags); }
|
||||
inline FMOD_RESULT Memory_GetStats (int *currentalloced, int *maxalloced, bool blocking = true) { return FMOD_Memory_GetStats(currentalloced, maxalloced, blocking); }
|
||||
inline FMOD_RESULT Debug_Initialize (FMOD_DEBUG_FLAGS flags, FMOD_DEBUG_MODE mode = FMOD_DEBUG_MODE_TTY, FMOD_DEBUG_CALLBACK callback = 0, const char *filename = 0) { return FMOD_Debug_Initialize(flags, mode, callback, filename); }
|
||||
inline FMOD_RESULT File_SetDiskBusy (int busy) { return FMOD_File_SetDiskBusy(busy); }
|
||||
inline FMOD_RESULT File_GetDiskBusy (int *busy) { return FMOD_File_GetDiskBusy(busy); }
|
||||
inline FMOD_RESULT Thread_SetAttributes (FMOD_THREAD_TYPE type, FMOD_THREAD_AFFINITY affinity = FMOD_THREAD_AFFINITY_GROUP_DEFAULT, FMOD_THREAD_PRIORITY priority = FMOD_THREAD_PRIORITY_DEFAULT, FMOD_THREAD_STACK_SIZE stacksize = FMOD_THREAD_STACK_SIZE_DEFAULT) { return FMOD_Thread_SetAttributes(type, affinity, priority, stacksize); }
|
||||
|
||||
/*
|
||||
FMOD System factory functions.
|
||||
*/
|
||||
inline FMOD_RESULT System_Create (System **system, unsigned int headerversion = FMOD_VERSION) { return FMOD_System_Create((FMOD_SYSTEM **)system, headerversion); }
|
||||
|
||||
/*
|
||||
'System' API
|
||||
*/
|
||||
class System
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a System class. System_Create must be used.
|
||||
System();
|
||||
System(const System &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API release ();
|
||||
|
||||
// Setup functions.
|
||||
FMOD_RESULT F_API setOutput (FMOD_OUTPUTTYPE output);
|
||||
FMOD_RESULT F_API getOutput (FMOD_OUTPUTTYPE *output);
|
||||
FMOD_RESULT F_API getNumDrivers (int *numdrivers);
|
||||
FMOD_RESULT F_API getDriverInfo (int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels);
|
||||
FMOD_RESULT F_API setDriver (int driver);
|
||||
FMOD_RESULT F_API getDriver (int *driver);
|
||||
FMOD_RESULT F_API setSoftwareChannels (int numsoftwarechannels);
|
||||
FMOD_RESULT F_API getSoftwareChannels (int *numsoftwarechannels);
|
||||
FMOD_RESULT F_API setSoftwareFormat (int samplerate, FMOD_SPEAKERMODE speakermode, int numrawspeakers);
|
||||
FMOD_RESULT F_API getSoftwareFormat (int *samplerate, FMOD_SPEAKERMODE *speakermode, int *numrawspeakers);
|
||||
FMOD_RESULT F_API setDSPBufferSize (unsigned int bufferlength, int numbuffers);
|
||||
FMOD_RESULT F_API getDSPBufferSize (unsigned int *bufferlength, int *numbuffers);
|
||||
FMOD_RESULT F_API setFileSystem (FMOD_FILE_OPEN_CALLBACK useropen, FMOD_FILE_CLOSE_CALLBACK userclose, FMOD_FILE_READ_CALLBACK userread, FMOD_FILE_SEEK_CALLBACK userseek, FMOD_FILE_ASYNCREAD_CALLBACK userasyncread, FMOD_FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign);
|
||||
FMOD_RESULT F_API attachFileSystem (FMOD_FILE_OPEN_CALLBACK useropen, FMOD_FILE_CLOSE_CALLBACK userclose, FMOD_FILE_READ_CALLBACK userread, FMOD_FILE_SEEK_CALLBACK userseek);
|
||||
FMOD_RESULT F_API setAdvancedSettings (FMOD_ADVANCEDSETTINGS *settings);
|
||||
FMOD_RESULT F_API getAdvancedSettings (FMOD_ADVANCEDSETTINGS *settings);
|
||||
FMOD_RESULT F_API setCallback (FMOD_SYSTEM_CALLBACK callback, FMOD_SYSTEM_CALLBACK_TYPE callbackmask = FMOD_SYSTEM_CALLBACK_ALL);
|
||||
|
||||
// Plug-in support.
|
||||
FMOD_RESULT F_API setPluginPath (const char *path);
|
||||
FMOD_RESULT F_API loadPlugin (const char *filename, unsigned int *handle, unsigned int priority = 0);
|
||||
FMOD_RESULT F_API unloadPlugin (unsigned int handle);
|
||||
FMOD_RESULT F_API getNumNestedPlugins (unsigned int handle, int *count);
|
||||
FMOD_RESULT F_API getNestedPlugin (unsigned int handle, int index, unsigned int *nestedhandle);
|
||||
FMOD_RESULT F_API getNumPlugins (FMOD_PLUGINTYPE plugintype, int *numplugins);
|
||||
FMOD_RESULT F_API getPluginHandle (FMOD_PLUGINTYPE plugintype, int index, unsigned int *handle);
|
||||
FMOD_RESULT F_API getPluginInfo (unsigned int handle, FMOD_PLUGINTYPE *plugintype, char *name, int namelen, unsigned int *version);
|
||||
FMOD_RESULT F_API setOutputByPlugin (unsigned int handle);
|
||||
FMOD_RESULT F_API getOutputByPlugin (unsigned int *handle);
|
||||
FMOD_RESULT F_API createDSPByPlugin (unsigned int handle, DSP **dsp);
|
||||
FMOD_RESULT F_API getDSPInfoByPlugin (unsigned int handle, const FMOD_DSP_DESCRIPTION **description);
|
||||
FMOD_RESULT F_API registerCodec (FMOD_CODEC_DESCRIPTION *description, unsigned int *handle, unsigned int priority = 0);
|
||||
FMOD_RESULT F_API registerDSP (const FMOD_DSP_DESCRIPTION *description, unsigned int *handle);
|
||||
FMOD_RESULT F_API registerOutput (const FMOD_OUTPUT_DESCRIPTION *description, unsigned int *handle);
|
||||
|
||||
// Init/Close.
|
||||
FMOD_RESULT F_API init (int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata);
|
||||
FMOD_RESULT F_API close ();
|
||||
|
||||
// General post-init system functions.
|
||||
FMOD_RESULT F_API update (); /* IMPORTANT! CALL THIS ONCE PER FRAME! */
|
||||
|
||||
FMOD_RESULT F_API setSpeakerPosition (FMOD_SPEAKER speaker, float x, float y, bool active);
|
||||
FMOD_RESULT F_API getSpeakerPosition (FMOD_SPEAKER speaker, float *x, float *y, bool *active);
|
||||
FMOD_RESULT F_API setStreamBufferSize (unsigned int filebuffersize, FMOD_TIMEUNIT filebuffersizetype);
|
||||
FMOD_RESULT F_API getStreamBufferSize (unsigned int *filebuffersize, FMOD_TIMEUNIT *filebuffersizetype);
|
||||
FMOD_RESULT F_API set3DSettings (float dopplerscale, float distancefactor, float rolloffscale);
|
||||
FMOD_RESULT F_API get3DSettings (float *dopplerscale, float *distancefactor, float *rolloffscale);
|
||||
FMOD_RESULT F_API set3DNumListeners (int numlisteners);
|
||||
FMOD_RESULT F_API get3DNumListeners (int *numlisteners);
|
||||
FMOD_RESULT F_API set3DListenerAttributes (int listener, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel, const FMOD_VECTOR *forward, const FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API get3DListenerAttributes (int listener, FMOD_VECTOR *pos, FMOD_VECTOR *vel, FMOD_VECTOR *forward, FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API set3DRolloffCallback (FMOD_3D_ROLLOFF_CALLBACK callback);
|
||||
FMOD_RESULT F_API mixerSuspend ();
|
||||
FMOD_RESULT F_API mixerResume ();
|
||||
FMOD_RESULT F_API getDefaultMixMatrix (FMOD_SPEAKERMODE sourcespeakermode, FMOD_SPEAKERMODE targetspeakermode, float *matrix, int matrixhop);
|
||||
FMOD_RESULT F_API getSpeakerModeChannels (FMOD_SPEAKERMODE mode, int *channels);
|
||||
|
||||
// System information functions.
|
||||
FMOD_RESULT F_API getVersion (unsigned int *version);
|
||||
FMOD_RESULT F_API getOutputHandle (void **handle);
|
||||
FMOD_RESULT F_API getChannelsPlaying (int *channels, int *realchannels = 0);
|
||||
FMOD_RESULT F_API getCPUUsage (FMOD_CPU_USAGE *usage);
|
||||
FMOD_RESULT F_API getFileUsage (long long *sampleBytesRead, long long *streamBytesRead, long long *otherBytesRead);
|
||||
|
||||
// Sound/DSP/Channel/FX creation and retrieval.
|
||||
FMOD_RESULT F_API createSound (const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, Sound **sound);
|
||||
FMOD_RESULT F_API createStream (const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, Sound **sound);
|
||||
FMOD_RESULT F_API createDSP (const FMOD_DSP_DESCRIPTION *description, DSP **dsp);
|
||||
FMOD_RESULT F_API createDSPByType (FMOD_DSP_TYPE type, DSP **dsp);
|
||||
FMOD_RESULT F_API createChannelGroup (const char *name, ChannelGroup **channelgroup);
|
||||
FMOD_RESULT F_API createSoundGroup (const char *name, SoundGroup **soundgroup);
|
||||
FMOD_RESULT F_API createReverb3D (Reverb3D **reverb);
|
||||
|
||||
FMOD_RESULT F_API playSound (Sound *sound, ChannelGroup *channelgroup, bool paused, Channel **channel);
|
||||
FMOD_RESULT F_API playDSP (DSP *dsp, ChannelGroup *channelgroup, bool paused, Channel **channel);
|
||||
FMOD_RESULT F_API getChannel (int channelid, Channel **channel);
|
||||
FMOD_RESULT F_API getDSPInfoByType (FMOD_DSP_TYPE type, const FMOD_DSP_DESCRIPTION **description);
|
||||
FMOD_RESULT F_API getMasterChannelGroup (ChannelGroup **channelgroup);
|
||||
FMOD_RESULT F_API getMasterSoundGroup (SoundGroup **soundgroup);
|
||||
|
||||
// Routing to ports.
|
||||
FMOD_RESULT F_API attachChannelGroupToPort (FMOD_PORT_TYPE portType, FMOD_PORT_INDEX portIndex, ChannelGroup *channelgroup, bool passThru = false);
|
||||
FMOD_RESULT F_API detachChannelGroupFromPort (ChannelGroup *channelgroup);
|
||||
|
||||
// Reverb API.
|
||||
FMOD_RESULT F_API setReverbProperties (int instance, const FMOD_REVERB_PROPERTIES *prop);
|
||||
FMOD_RESULT F_API getReverbProperties (int instance, FMOD_REVERB_PROPERTIES *prop);
|
||||
|
||||
// System level DSP functionality.
|
||||
FMOD_RESULT F_API lockDSP ();
|
||||
FMOD_RESULT F_API unlockDSP ();
|
||||
|
||||
// Recording API.
|
||||
FMOD_RESULT F_API getRecordNumDrivers (int *numdrivers, int *numconnected);
|
||||
FMOD_RESULT F_API getRecordDriverInfo (int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels, FMOD_DRIVER_STATE *state);
|
||||
FMOD_RESULT F_API getRecordPosition (int id, unsigned int *position);
|
||||
FMOD_RESULT F_API recordStart (int id, Sound *sound, bool loop);
|
||||
FMOD_RESULT F_API recordStop (int id);
|
||||
FMOD_RESULT F_API isRecording (int id, bool *recording);
|
||||
|
||||
// Geometry API.
|
||||
FMOD_RESULT F_API createGeometry (int maxpolygons, int maxvertices, Geometry **geometry);
|
||||
FMOD_RESULT F_API setGeometrySettings (float maxworldsize);
|
||||
FMOD_RESULT F_API getGeometrySettings (float *maxworldsize);
|
||||
FMOD_RESULT F_API loadGeometry (const void *data, int datasize, Geometry **geometry);
|
||||
FMOD_RESULT F_API getGeometryOcclusion (const FMOD_VECTOR *listener, const FMOD_VECTOR *source, float *direct, float *reverb);
|
||||
|
||||
// Network functions.
|
||||
FMOD_RESULT F_API setNetworkProxy (const char *proxy);
|
||||
FMOD_RESULT F_API getNetworkProxy (char *proxy, int proxylen);
|
||||
FMOD_RESULT F_API setNetworkTimeout (int timeout);
|
||||
FMOD_RESULT F_API getNetworkTimeout (int *timeout);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
};
|
||||
|
||||
/*
|
||||
'Sound' API
|
||||
*/
|
||||
class Sound
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a Sound class. Appropriate Sound creation or retrieval function must be used.
|
||||
Sound();
|
||||
Sound(const Sound &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API release ();
|
||||
FMOD_RESULT F_API getSystemObject (System **system);
|
||||
|
||||
// Standard sound manipulation functions.
|
||||
FMOD_RESULT F_API lock (unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
|
||||
FMOD_RESULT F_API unlock (void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
|
||||
FMOD_RESULT F_API setDefaults (float frequency, int priority);
|
||||
FMOD_RESULT F_API getDefaults (float *frequency, int *priority);
|
||||
FMOD_RESULT F_API set3DMinMaxDistance (float min, float max);
|
||||
FMOD_RESULT F_API get3DMinMaxDistance (float *min, float *max);
|
||||
FMOD_RESULT F_API set3DConeSettings (float insideconeangle, float outsideconeangle, float outsidevolume);
|
||||
FMOD_RESULT F_API get3DConeSettings (float *insideconeangle, float *outsideconeangle, float *outsidevolume);
|
||||
FMOD_RESULT F_API set3DCustomRolloff (FMOD_VECTOR *points, int numpoints);
|
||||
FMOD_RESULT F_API get3DCustomRolloff (FMOD_VECTOR **points, int *numpoints);
|
||||
FMOD_RESULT F_API getSubSound (int index, Sound **subsound);
|
||||
FMOD_RESULT F_API getSubSoundParent (Sound **parentsound);
|
||||
FMOD_RESULT F_API getName (char *name, int namelen);
|
||||
FMOD_RESULT F_API getLength (unsigned int *length, FMOD_TIMEUNIT lengthtype);
|
||||
FMOD_RESULT F_API getFormat (FMOD_SOUND_TYPE *type, FMOD_SOUND_FORMAT *format, int *channels, int *bits);
|
||||
FMOD_RESULT F_API getNumSubSounds (int *numsubsounds);
|
||||
FMOD_RESULT F_API getNumTags (int *numtags, int *numtagsupdated);
|
||||
FMOD_RESULT F_API getTag (const char *name, int index, FMOD_TAG *tag);
|
||||
FMOD_RESULT F_API getOpenState (FMOD_OPENSTATE *openstate, unsigned int *percentbuffered, bool *starving, bool *diskbusy);
|
||||
FMOD_RESULT F_API readData (void *buffer, unsigned int length, unsigned int *read);
|
||||
FMOD_RESULT F_API seekData (unsigned int pcm);
|
||||
|
||||
FMOD_RESULT F_API setSoundGroup (SoundGroup *soundgroup);
|
||||
FMOD_RESULT F_API getSoundGroup (SoundGroup **soundgroup);
|
||||
|
||||
// Synchronization point API. These points can come from markers embedded in wav files, and can also generate channel callbacks.
|
||||
FMOD_RESULT F_API getNumSyncPoints (int *numsyncpoints);
|
||||
FMOD_RESULT F_API getSyncPoint (int index, FMOD_SYNCPOINT **point);
|
||||
FMOD_RESULT F_API getSyncPointInfo (FMOD_SYNCPOINT *point, char *name, int namelen, unsigned int *offset, FMOD_TIMEUNIT offsettype);
|
||||
FMOD_RESULT F_API addSyncPoint (unsigned int offset, FMOD_TIMEUNIT offsettype, const char *name, FMOD_SYNCPOINT **point);
|
||||
FMOD_RESULT F_API deleteSyncPoint (FMOD_SYNCPOINT *point);
|
||||
|
||||
// Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time.
|
||||
FMOD_RESULT F_API setMode (FMOD_MODE mode);
|
||||
FMOD_RESULT F_API getMode (FMOD_MODE *mode);
|
||||
FMOD_RESULT F_API setLoopCount (int loopcount);
|
||||
FMOD_RESULT F_API getLoopCount (int *loopcount);
|
||||
FMOD_RESULT F_API setLoopPoints (unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype);
|
||||
FMOD_RESULT F_API getLoopPoints (unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype);
|
||||
|
||||
// For MOD/S3M/XM/IT/MID sequenced formats only.
|
||||
FMOD_RESULT F_API getMusicNumChannels (int *numchannels);
|
||||
FMOD_RESULT F_API setMusicChannelVolume (int channel, float volume);
|
||||
FMOD_RESULT F_API getMusicChannelVolume (int channel, float *volume);
|
||||
FMOD_RESULT F_API setMusicSpeed (float speed);
|
||||
FMOD_RESULT F_API getMusicSpeed (float *speed);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
'ChannelControl API'. This is a base class for Channel and ChannelGroup so they can share the same functionality. This cannot be used or instansiated explicitly.
|
||||
*/
|
||||
class ChannelControl
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a Control class.
|
||||
ChannelControl();
|
||||
ChannelControl(const ChannelControl &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API getSystemObject (System **system);
|
||||
|
||||
// General control functionality for Channels and ChannelGroups.
|
||||
FMOD_RESULT F_API stop ();
|
||||
FMOD_RESULT F_API setPaused (bool paused);
|
||||
FMOD_RESULT F_API getPaused (bool *paused);
|
||||
FMOD_RESULT F_API setVolume (float volume);
|
||||
FMOD_RESULT F_API getVolume (float *volume);
|
||||
FMOD_RESULT F_API setVolumeRamp (bool ramp);
|
||||
FMOD_RESULT F_API getVolumeRamp (bool *ramp);
|
||||
FMOD_RESULT F_API getAudibility (float *audibility);
|
||||
FMOD_RESULT F_API setPitch (float pitch);
|
||||
FMOD_RESULT F_API getPitch (float *pitch);
|
||||
FMOD_RESULT F_API setMute (bool mute);
|
||||
FMOD_RESULT F_API getMute (bool *mute);
|
||||
FMOD_RESULT F_API setReverbProperties (int instance, float wet);
|
||||
FMOD_RESULT F_API getReverbProperties (int instance, float *wet);
|
||||
FMOD_RESULT F_API setLowPassGain (float gain);
|
||||
FMOD_RESULT F_API getLowPassGain (float *gain);
|
||||
FMOD_RESULT F_API setMode (FMOD_MODE mode);
|
||||
FMOD_RESULT F_API getMode (FMOD_MODE *mode);
|
||||
FMOD_RESULT F_API setCallback (FMOD_CHANNELCONTROL_CALLBACK callback);
|
||||
FMOD_RESULT F_API isPlaying (bool *isplaying);
|
||||
|
||||
// Panning and level adjustment.
|
||||
// Note all 'set' functions alter a final matrix, this is why the only get function is getMixMatrix, to avoid other get functions returning incorrect/obsolete values.
|
||||
FMOD_RESULT F_API setPan (float pan);
|
||||
FMOD_RESULT F_API setMixLevelsOutput (float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright);
|
||||
FMOD_RESULT F_API setMixLevelsInput (float *levels, int numlevels);
|
||||
FMOD_RESULT F_API setMixMatrix (float *matrix, int outchannels, int inchannels, int inchannel_hop = 0);
|
||||
FMOD_RESULT F_API getMixMatrix (float *matrix, int *outchannels, int *inchannels, int inchannel_hop = 0);
|
||||
|
||||
// Clock based functionality.
|
||||
FMOD_RESULT F_API getDSPClock (unsigned long long *dspclock, unsigned long long *parentclock);
|
||||
FMOD_RESULT F_API setDelay (unsigned long long dspclock_start, unsigned long long dspclock_end, bool stopchannels = true);
|
||||
FMOD_RESULT F_API getDelay (unsigned long long *dspclock_start, unsigned long long *dspclock_end, bool *stopchannels = 0);
|
||||
FMOD_RESULT F_API addFadePoint (unsigned long long dspclock, float volume);
|
||||
FMOD_RESULT F_API setFadePointRamp (unsigned long long dspclock, float volume);
|
||||
FMOD_RESULT F_API removeFadePoints (unsigned long long dspclock_start, unsigned long long dspclock_end);
|
||||
FMOD_RESULT F_API getFadePoints (unsigned int *numpoints, unsigned long long *point_dspclock, float *point_volume);
|
||||
|
||||
// DSP effects.
|
||||
FMOD_RESULT F_API getDSP (int index, DSP **dsp);
|
||||
FMOD_RESULT F_API addDSP (int index, DSP *dsp);
|
||||
FMOD_RESULT F_API removeDSP (DSP *dsp);
|
||||
FMOD_RESULT F_API getNumDSPs (int *numdsps);
|
||||
FMOD_RESULT F_API setDSPIndex (DSP *dsp, int index);
|
||||
FMOD_RESULT F_API getDSPIndex (DSP *dsp, int *index);
|
||||
|
||||
// 3D functionality.
|
||||
FMOD_RESULT F_API set3DAttributes (const FMOD_VECTOR *pos, const FMOD_VECTOR *vel);
|
||||
FMOD_RESULT F_API get3DAttributes (FMOD_VECTOR *pos, FMOD_VECTOR *vel);
|
||||
FMOD_RESULT F_API set3DMinMaxDistance (float mindistance, float maxdistance);
|
||||
FMOD_RESULT F_API get3DMinMaxDistance (float *mindistance, float *maxdistance);
|
||||
FMOD_RESULT F_API set3DConeSettings (float insideconeangle, float outsideconeangle, float outsidevolume);
|
||||
FMOD_RESULT F_API get3DConeSettings (float *insideconeangle, float *outsideconeangle, float *outsidevolume);
|
||||
FMOD_RESULT F_API set3DConeOrientation (FMOD_VECTOR *orientation);
|
||||
FMOD_RESULT F_API get3DConeOrientation (FMOD_VECTOR *orientation);
|
||||
FMOD_RESULT F_API set3DCustomRolloff (FMOD_VECTOR *points, int numpoints);
|
||||
FMOD_RESULT F_API get3DCustomRolloff (FMOD_VECTOR **points, int *numpoints);
|
||||
FMOD_RESULT F_API set3DOcclusion (float directocclusion, float reverbocclusion);
|
||||
FMOD_RESULT F_API get3DOcclusion (float *directocclusion, float *reverbocclusion);
|
||||
FMOD_RESULT F_API set3DSpread (float angle);
|
||||
FMOD_RESULT F_API get3DSpread (float *angle);
|
||||
FMOD_RESULT F_API set3DLevel (float level);
|
||||
FMOD_RESULT F_API get3DLevel (float *level);
|
||||
FMOD_RESULT F_API set3DDopplerLevel (float level);
|
||||
FMOD_RESULT F_API get3DDopplerLevel (float *level);
|
||||
FMOD_RESULT F_API set3DDistanceFilter (bool custom, float customLevel, float centerFreq);
|
||||
FMOD_RESULT F_API get3DDistanceFilter (bool *custom, float *customLevel, float *centerFreq);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
};
|
||||
|
||||
/*
|
||||
'Channel' API.
|
||||
*/
|
||||
class Channel : public ChannelControl
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a Channel class. Appropriate Channel creation or retrieval function must be used.
|
||||
Channel();
|
||||
Channel(const Channel &);
|
||||
|
||||
public:
|
||||
|
||||
// Channel specific control functionality.
|
||||
FMOD_RESULT F_API setFrequency (float frequency);
|
||||
FMOD_RESULT F_API getFrequency (float *frequency);
|
||||
FMOD_RESULT F_API setPriority (int priority);
|
||||
FMOD_RESULT F_API getPriority (int *priority);
|
||||
FMOD_RESULT F_API setPosition (unsigned int position, FMOD_TIMEUNIT postype);
|
||||
FMOD_RESULT F_API getPosition (unsigned int *position, FMOD_TIMEUNIT postype);
|
||||
FMOD_RESULT F_API setChannelGroup (ChannelGroup *channelgroup);
|
||||
FMOD_RESULT F_API getChannelGroup (ChannelGroup **channelgroup);
|
||||
FMOD_RESULT F_API setLoopCount (int loopcount);
|
||||
FMOD_RESULT F_API getLoopCount (int *loopcount);
|
||||
FMOD_RESULT F_API setLoopPoints (unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype);
|
||||
FMOD_RESULT F_API getLoopPoints (unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype);
|
||||
|
||||
// Information only functions.
|
||||
FMOD_RESULT F_API isVirtual (bool *isvirtual);
|
||||
FMOD_RESULT F_API getCurrentSound (Sound **sound);
|
||||
FMOD_RESULT F_API getIndex (int *index);
|
||||
};
|
||||
|
||||
/*
|
||||
'ChannelGroup' API
|
||||
*/
|
||||
class ChannelGroup : public ChannelControl
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a ChannelGroup class. Appropriate ChannelGroup creation or retrieval function must be used.
|
||||
ChannelGroup();
|
||||
ChannelGroup(const ChannelGroup &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API release ();
|
||||
|
||||
// Nested channel groups.
|
||||
FMOD_RESULT F_API addGroup (ChannelGroup *group, bool propagatedspclock = true, DSPConnection **connection = 0);
|
||||
FMOD_RESULT F_API getNumGroups (int *numgroups);
|
||||
FMOD_RESULT F_API getGroup (int index, ChannelGroup **group);
|
||||
FMOD_RESULT F_API getParentGroup (ChannelGroup **group);
|
||||
|
||||
// Information only functions.
|
||||
FMOD_RESULT F_API getName (char *name, int namelen);
|
||||
FMOD_RESULT F_API getNumChannels (int *numchannels);
|
||||
FMOD_RESULT F_API getChannel (int index, Channel **channel);
|
||||
};
|
||||
|
||||
/*
|
||||
'SoundGroup' API
|
||||
*/
|
||||
class SoundGroup
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a SoundGroup class. Appropriate SoundGroup creation or retrieval function must be used.
|
||||
SoundGroup();
|
||||
SoundGroup(const SoundGroup &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API release ();
|
||||
FMOD_RESULT F_API getSystemObject (System **system);
|
||||
|
||||
// SoundGroup control functions.
|
||||
FMOD_RESULT F_API setMaxAudible (int maxaudible);
|
||||
FMOD_RESULT F_API getMaxAudible (int *maxaudible);
|
||||
FMOD_RESULT F_API setMaxAudibleBehavior (FMOD_SOUNDGROUP_BEHAVIOR behavior);
|
||||
FMOD_RESULT F_API getMaxAudibleBehavior (FMOD_SOUNDGROUP_BEHAVIOR *behavior);
|
||||
FMOD_RESULT F_API setMuteFadeSpeed (float speed);
|
||||
FMOD_RESULT F_API getMuteFadeSpeed (float *speed);
|
||||
FMOD_RESULT F_API setVolume (float volume);
|
||||
FMOD_RESULT F_API getVolume (float *volume);
|
||||
FMOD_RESULT F_API stop ();
|
||||
|
||||
// Information only functions.
|
||||
FMOD_RESULT F_API getName (char *name, int namelen);
|
||||
FMOD_RESULT F_API getNumSounds (int *numsounds);
|
||||
FMOD_RESULT F_API getSound (int index, Sound **sound);
|
||||
FMOD_RESULT F_API getNumPlaying (int *numplaying);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
};
|
||||
|
||||
/*
|
||||
'DSP' API
|
||||
*/
|
||||
class DSP
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a DSP class. Appropriate DSP creation or retrieval function must be used.
|
||||
DSP();
|
||||
DSP(const DSP &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API release ();
|
||||
FMOD_RESULT F_API getSystemObject (System **system);
|
||||
|
||||
// Connection / disconnection / input and output enumeration.
|
||||
FMOD_RESULT F_API addInput (DSP *input, DSPConnection **connection = 0, FMOD_DSPCONNECTION_TYPE type = FMOD_DSPCONNECTION_TYPE_STANDARD);
|
||||
FMOD_RESULT F_API disconnectFrom (DSP *target, DSPConnection *connection = 0);
|
||||
FMOD_RESULT F_API disconnectAll (bool inputs, bool outputs);
|
||||
FMOD_RESULT F_API getNumInputs (int *numinputs);
|
||||
FMOD_RESULT F_API getNumOutputs (int *numoutputs);
|
||||
FMOD_RESULT F_API getInput (int index, DSP **input, DSPConnection **inputconnection);
|
||||
FMOD_RESULT F_API getOutput (int index, DSP **output, DSPConnection **outputconnection);
|
||||
|
||||
// DSP unit control.
|
||||
FMOD_RESULT F_API setActive (bool active);
|
||||
FMOD_RESULT F_API getActive (bool *active);
|
||||
FMOD_RESULT F_API setBypass (bool bypass);
|
||||
FMOD_RESULT F_API getBypass (bool *bypass);
|
||||
FMOD_RESULT F_API setWetDryMix (float prewet, float postwet, float dry);
|
||||
FMOD_RESULT F_API getWetDryMix (float *prewet, float *postwet, float *dry);
|
||||
FMOD_RESULT F_API setChannelFormat (FMOD_CHANNELMASK channelmask, int numchannels, FMOD_SPEAKERMODE source_speakermode);
|
||||
FMOD_RESULT F_API getChannelFormat (FMOD_CHANNELMASK *channelmask, int *numchannels, FMOD_SPEAKERMODE *source_speakermode);
|
||||
FMOD_RESULT F_API getOutputChannelFormat (FMOD_CHANNELMASK inmask, int inchannels, FMOD_SPEAKERMODE inspeakermode, FMOD_CHANNELMASK *outmask, int *outchannels, FMOD_SPEAKERMODE *outspeakermode);
|
||||
FMOD_RESULT F_API reset ();
|
||||
FMOD_RESULT F_API setCallback (FMOD_DSP_CALLBACK callback);
|
||||
|
||||
// DSP parameter control.
|
||||
FMOD_RESULT F_API setParameterFloat (int index, float value);
|
||||
FMOD_RESULT F_API setParameterInt (int index, int value);
|
||||
FMOD_RESULT F_API setParameterBool (int index, bool value);
|
||||
FMOD_RESULT F_API setParameterData (int index, void *data, unsigned int length);
|
||||
FMOD_RESULT F_API getParameterFloat (int index, float *value, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API getParameterInt (int index, int *value, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API getParameterBool (int index, bool *value, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API getParameterData (int index, void **data, unsigned int *length, char *valuestr, int valuestrlen);
|
||||
FMOD_RESULT F_API getNumParameters (int *numparams);
|
||||
FMOD_RESULT F_API getParameterInfo (int index, FMOD_DSP_PARAMETER_DESC **desc);
|
||||
FMOD_RESULT F_API getDataParameterIndex (int datatype, int *index);
|
||||
FMOD_RESULT F_API showConfigDialog (void *hwnd, bool show);
|
||||
|
||||
// DSP attributes.
|
||||
FMOD_RESULT F_API getInfo (char *name, unsigned int *version, int *channels, int *configwidth, int *configheight);
|
||||
FMOD_RESULT F_API getType (FMOD_DSP_TYPE *type);
|
||||
FMOD_RESULT F_API getIdle (bool *idle);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
|
||||
// Metering.
|
||||
FMOD_RESULT F_API setMeteringEnabled (bool inputEnabled, bool outputEnabled);
|
||||
FMOD_RESULT F_API getMeteringEnabled (bool *inputEnabled, bool *outputEnabled);
|
||||
FMOD_RESULT F_API getMeteringInfo (FMOD_DSP_METERING_INFO *inputInfo, FMOD_DSP_METERING_INFO *outputInfo);
|
||||
FMOD_RESULT F_API getCPUUsage (unsigned int *exclusive, unsigned int *inclusive);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
'DSPConnection' API
|
||||
*/
|
||||
class DSPConnection
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a DSPConnection class. Appropriate DSPConnection creation or retrieval function must be used.
|
||||
DSPConnection();
|
||||
DSPConnection(const DSPConnection &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API getInput (DSP **input);
|
||||
FMOD_RESULT F_API getOutput (DSP **output);
|
||||
FMOD_RESULT F_API setMix (float volume);
|
||||
FMOD_RESULT F_API getMix (float *volume);
|
||||
FMOD_RESULT F_API setMixMatrix (float *matrix, int outchannels, int inchannels, int inchannel_hop = 0);
|
||||
FMOD_RESULT F_API getMixMatrix (float *matrix, int *outchannels, int *inchannels, int inchannel_hop = 0);
|
||||
FMOD_RESULT F_API getType (FMOD_DSPCONNECTION_TYPE *type);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
'Geometry' API
|
||||
*/
|
||||
class Geometry
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a Geometry class. Appropriate Geometry creation or retrieval function must be used.
|
||||
Geometry();
|
||||
Geometry(const Geometry &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API release ();
|
||||
|
||||
// Polygon manipulation.
|
||||
FMOD_RESULT F_API addPolygon (float directocclusion, float reverbocclusion, bool doublesided, int numvertices, const FMOD_VECTOR *vertices, int *polygonindex);
|
||||
FMOD_RESULT F_API getNumPolygons (int *numpolygons);
|
||||
FMOD_RESULT F_API getMaxPolygons (int *maxpolygons, int *maxvertices);
|
||||
FMOD_RESULT F_API getPolygonNumVertices (int index, int *numvertices);
|
||||
FMOD_RESULT F_API setPolygonVertex (int index, int vertexindex, const FMOD_VECTOR *vertex);
|
||||
FMOD_RESULT F_API getPolygonVertex (int index, int vertexindex, FMOD_VECTOR *vertex);
|
||||
FMOD_RESULT F_API setPolygonAttributes (int index, float directocclusion, float reverbocclusion, bool doublesided);
|
||||
FMOD_RESULT F_API getPolygonAttributes (int index, float *directocclusion, float *reverbocclusion, bool *doublesided);
|
||||
|
||||
// Object manipulation.
|
||||
FMOD_RESULT F_API setActive (bool active);
|
||||
FMOD_RESULT F_API getActive (bool *active);
|
||||
FMOD_RESULT F_API setRotation (const FMOD_VECTOR *forward, const FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API getRotation (FMOD_VECTOR *forward, FMOD_VECTOR *up);
|
||||
FMOD_RESULT F_API setPosition (const FMOD_VECTOR *position);
|
||||
FMOD_RESULT F_API getPosition (FMOD_VECTOR *position);
|
||||
FMOD_RESULT F_API setScale (const FMOD_VECTOR *scale);
|
||||
FMOD_RESULT F_API getScale (FMOD_VECTOR *scale);
|
||||
FMOD_RESULT F_API save (void *data, int *datasize);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
'Reverb' API
|
||||
*/
|
||||
class Reverb3D
|
||||
{
|
||||
private:
|
||||
|
||||
// Constructor made private so user cannot statically instance a Reverb3D class. Appropriate Reverb creation or retrieval function must be used.
|
||||
Reverb3D();
|
||||
Reverb3D(const Reverb3D &);
|
||||
|
||||
public:
|
||||
|
||||
FMOD_RESULT F_API release ();
|
||||
|
||||
// Reverb manipulation.
|
||||
FMOD_RESULT F_API set3DAttributes (const FMOD_VECTOR *position, float mindistance, float maxdistance);
|
||||
FMOD_RESULT F_API get3DAttributes (FMOD_VECTOR *position, float *mindistance,float *maxdistance);
|
||||
FMOD_RESULT F_API setProperties (const FMOD_REVERB_PROPERTIES *properties);
|
||||
FMOD_RESULT F_API getProperties (FMOD_REVERB_PROPERTIES *properties);
|
||||
FMOD_RESULT F_API setActive (bool active);
|
||||
FMOD_RESULT F_API getActive (bool *active);
|
||||
|
||||
// Userdata set/get.
|
||||
FMOD_RESULT F_API setUserData (void *userdata);
|
||||
FMOD_RESULT F_API getUserData (void **userdata);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
136
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_codec.h
vendored
Normal file
136
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_codec.h
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
/* ======================================================================================== */
|
||||
/* FMOD Core API - Codec development header file. */
|
||||
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2023. */
|
||||
/* */
|
||||
/* Use this header if you are wanting to develop your own file format plugin to use with */
|
||||
/* FMOD's codec system. With this header you can make your own fileformat plugin that FMOD */
|
||||
/* can register and use. See the documentation and examples on how to make a working */
|
||||
/* plugin. */
|
||||
/* */
|
||||
/* For more detail visit: */
|
||||
/* https://fmod.com/docs/2.02/api/core-api.html */
|
||||
/* ======================================================================================== */
|
||||
#ifndef _FMOD_CODEC_H
|
||||
#define _FMOD_CODEC_H
|
||||
|
||||
/*
|
||||
Codec types
|
||||
*/
|
||||
typedef struct FMOD_CODEC_STATE FMOD_CODEC_STATE;
|
||||
typedef struct FMOD_CODEC_WAVEFORMAT FMOD_CODEC_WAVEFORMAT;
|
||||
|
||||
/*
|
||||
Codec constants
|
||||
*/
|
||||
#define FMOD_CODEC_PLUGIN_VERSION 1
|
||||
|
||||
typedef int FMOD_CODEC_SEEK_METHOD;
|
||||
#define FMOD_CODEC_SEEK_METHOD_SET 0
|
||||
#define FMOD_CODEC_SEEK_METHOD_CURRENT 1
|
||||
#define FMOD_CODEC_SEEK_METHOD_END 2
|
||||
|
||||
/*
|
||||
Codec callbacks
|
||||
*/
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_OPEN_CALLBACK) (FMOD_CODEC_STATE *codec_state, FMOD_MODE usermode, FMOD_CREATESOUNDEXINFO *userexinfo);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_CLOSE_CALLBACK) (FMOD_CODEC_STATE *codec_state);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_READ_CALLBACK) (FMOD_CODEC_STATE *codec_state, void *buffer, unsigned int samples_in, unsigned int *samples_out);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETLENGTH_CALLBACK) (FMOD_CODEC_STATE *codec_state, unsigned int *length, FMOD_TIMEUNIT lengthtype);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_SETPOSITION_CALLBACK) (FMOD_CODEC_STATE *codec_state, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETPOSITION_CALLBACK) (FMOD_CODEC_STATE *codec_state, unsigned int *position, FMOD_TIMEUNIT postype);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_SOUNDCREATE_CALLBACK) (FMOD_CODEC_STATE *codec_state, int subsound, FMOD_SOUND *sound);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_GETWAVEFORMAT_CALLBACK)(FMOD_CODEC_STATE *codec_state, int index, FMOD_CODEC_WAVEFORMAT *waveformat);
|
||||
|
||||
/*
|
||||
Codec functions
|
||||
*/
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_METADATA_FUNC) (FMOD_CODEC_STATE *codec_state, FMOD_TAGTYPE tagtype, char *name, void *data, unsigned int datalen, FMOD_TAGDATATYPE datatype, int unique);
|
||||
typedef void * (F_CALLBACK *FMOD_CODEC_ALLOC_FUNC) (unsigned int size, unsigned int align, const char *file, int line);
|
||||
typedef void (F_CALLBACK *FMOD_CODEC_FREE_FUNC) (void *ptr, const char *file, int line);
|
||||
typedef void (F_CALLBACK *FMOD_CODEC_LOG_FUNC) (FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *string, ...);
|
||||
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_READ_FUNC) (FMOD_CODEC_STATE *codec_state, void *buffer, unsigned int sizebytes, unsigned int *bytesread);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_SEEK_FUNC) (FMOD_CODEC_STATE *codec_state, unsigned int pos, FMOD_CODEC_SEEK_METHOD method);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_TELL_FUNC) (FMOD_CODEC_STATE *codec_state, unsigned int *pos);
|
||||
typedef FMOD_RESULT (F_CALLBACK *FMOD_CODEC_FILE_SIZE_FUNC) (FMOD_CODEC_STATE *codec_state, unsigned int *size);
|
||||
|
||||
/*
|
||||
Codec structures
|
||||
*/
|
||||
typedef struct FMOD_CODEC_DESCRIPTION
|
||||
{
|
||||
unsigned int apiversion;
|
||||
const char *name;
|
||||
unsigned int version;
|
||||
int defaultasstream;
|
||||
FMOD_TIMEUNIT timeunits;
|
||||
FMOD_CODEC_OPEN_CALLBACK open;
|
||||
FMOD_CODEC_CLOSE_CALLBACK close;
|
||||
FMOD_CODEC_READ_CALLBACK read;
|
||||
FMOD_CODEC_GETLENGTH_CALLBACK getlength;
|
||||
FMOD_CODEC_SETPOSITION_CALLBACK setposition;
|
||||
FMOD_CODEC_GETPOSITION_CALLBACK getposition;
|
||||
FMOD_CODEC_SOUNDCREATE_CALLBACK soundcreate;
|
||||
FMOD_CODEC_GETWAVEFORMAT_CALLBACK getwaveformat;
|
||||
} FMOD_CODEC_DESCRIPTION;
|
||||
|
||||
struct FMOD_CODEC_WAVEFORMAT
|
||||
{
|
||||
const char* name;
|
||||
FMOD_SOUND_FORMAT format;
|
||||
int channels;
|
||||
int frequency;
|
||||
unsigned int lengthbytes;
|
||||
unsigned int lengthpcm;
|
||||
unsigned int pcmblocksize;
|
||||
int loopstart;
|
||||
int loopend;
|
||||
FMOD_MODE mode;
|
||||
FMOD_CHANNELMASK channelmask;
|
||||
FMOD_CHANNELORDER channelorder;
|
||||
float peakvolume;
|
||||
};
|
||||
|
||||
typedef struct FMOD_CODEC_STATE_FUNCTIONS
|
||||
{
|
||||
FMOD_CODEC_METADATA_FUNC metadata;
|
||||
FMOD_CODEC_ALLOC_FUNC alloc;
|
||||
FMOD_CODEC_FREE_FUNC free;
|
||||
FMOD_CODEC_LOG_FUNC log;
|
||||
FMOD_CODEC_FILE_READ_FUNC read;
|
||||
FMOD_CODEC_FILE_SEEK_FUNC seek;
|
||||
FMOD_CODEC_FILE_TELL_FUNC tell;
|
||||
FMOD_CODEC_FILE_SIZE_FUNC size;
|
||||
} FMOD_CODEC_STATE_FUNCTIONS;
|
||||
|
||||
struct FMOD_CODEC_STATE
|
||||
{
|
||||
void *plugindata;
|
||||
FMOD_CODEC_WAVEFORMAT *waveformat;
|
||||
FMOD_CODEC_STATE_FUNCTIONS *functions;
|
||||
int numsubsounds;
|
||||
};
|
||||
|
||||
/*
|
||||
Codec macros
|
||||
*/
|
||||
#define FMOD_CODEC_METADATA(_state, _tagtype, _name, _data, _datalen, _datatype, _unique) \
|
||||
(_state)->functions->metadata(_state, _tagtype, _name, _data, _datalen, _datatype, _unique)
|
||||
#define FMOD_CODEC_ALLOC(_state, _size, _align) \
|
||||
(_state)->functions->alloc(_size, _align, __FILE__, __LINE__)
|
||||
#define FMOD_CODEC_FREE(_state, _ptr) \
|
||||
(_state)->functions->free(_ptr, __FILE__, __LINE__)
|
||||
#define FMOD_CODEC_LOG(_state, _level, _location, _format, ...) \
|
||||
(_state)->functions->log(_level, __FILE__, __LINE__, _location, _format, __VA_ARGS__)
|
||||
#define FMOD_CODEC_FILE_READ(_state, _buffer, _sizebytes, _bytesread) \
|
||||
(_state)->functions->read(_state, _buffer, _sizebytes, _bytesread)
|
||||
#define FMOD_CODEC_FILE_SEEK(_state, _pos, _method) \
|
||||
(_state)->functions->seek(_state, _pos, _method)
|
||||
#define FMOD_CODEC_FILE_TELL(_state, _pos) \
|
||||
(_state)->functions->tell(_state, _pos)
|
||||
#define FMOD_CODEC_FILE_SIZE(_state, _size) \
|
||||
(_state)->functions->size(_state, _size)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
899
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_common.h
vendored
Normal file
899
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_common.h
vendored
Normal file
@ -0,0 +1,899 @@
|
||||
/* ======================================================================================== */
|
||||
/* FMOD Core API - Common C/C++ header file. */
|
||||
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2023. */
|
||||
/* */
|
||||
/* This header is included by fmod.hpp (C++ interface) and fmod.h (C interface) */
|
||||
/* */
|
||||
/* For more detail visit: */
|
||||
/* https://fmod.com/docs/2.02/api/core-api-common.html */
|
||||
/* ======================================================================================== */
|
||||
#ifndef _FMOD_COMMON_H
|
||||
#define _FMOD_COMMON_H
|
||||
|
||||
/*
|
||||
Library import helpers
|
||||
*/
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#define F_CALL __stdcall
|
||||
#else
|
||||
#define F_CALL
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__ORBIS__) || defined(F_USE_DECLSPEC)
|
||||
#define F_EXPORT __declspec(dllexport)
|
||||
#elif defined(__APPLE__) || defined(__ANDROID__) || defined(__linux__) || defined(F_USE_ATTRIBUTE)
|
||||
#define F_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define F_EXPORT
|
||||
#endif
|
||||
|
||||
#ifdef DLL_EXPORTS
|
||||
#define F_API F_EXPORT F_CALL
|
||||
#else
|
||||
#define F_API F_CALL
|
||||
#endif
|
||||
|
||||
#define F_CALLBACK F_CALL
|
||||
|
||||
/*
|
||||
FMOD core types
|
||||
*/
|
||||
typedef int FMOD_BOOL;
|
||||
typedef struct FMOD_SYSTEM FMOD_SYSTEM;
|
||||
typedef struct FMOD_SOUND FMOD_SOUND;
|
||||
typedef struct FMOD_CHANNELCONTROL FMOD_CHANNELCONTROL;
|
||||
typedef struct FMOD_CHANNEL FMOD_CHANNEL;
|
||||
typedef struct FMOD_CHANNELGROUP FMOD_CHANNELGROUP;
|
||||
typedef struct FMOD_SOUNDGROUP FMOD_SOUNDGROUP;
|
||||
typedef struct FMOD_REVERB3D FMOD_REVERB3D;
|
||||
typedef struct FMOD_DSP FMOD_DSP;
|
||||
typedef struct FMOD_DSPCONNECTION FMOD_DSPCONNECTION;
|
||||
typedef struct FMOD_POLYGON FMOD_POLYGON;
|
||||
typedef struct FMOD_GEOMETRY FMOD_GEOMETRY;
|
||||
typedef struct FMOD_SYNCPOINT FMOD_SYNCPOINT;
|
||||
typedef struct FMOD_ASYNCREADINFO FMOD_ASYNCREADINFO;
|
||||
|
||||
/*
|
||||
FMOD constants
|
||||
*/
|
||||
#define FMOD_VERSION 0x00020218 /* 0xaaaabbcc -> aaaa = product version, bb = major version, cc = minor version.*/
|
||||
|
||||
typedef unsigned int FMOD_DEBUG_FLAGS;
|
||||
#define FMOD_DEBUG_LEVEL_NONE 0x00000000
|
||||
#define FMOD_DEBUG_LEVEL_ERROR 0x00000001
|
||||
#define FMOD_DEBUG_LEVEL_WARNING 0x00000002
|
||||
#define FMOD_DEBUG_LEVEL_LOG 0x00000004
|
||||
#define FMOD_DEBUG_TYPE_MEMORY 0x00000100
|
||||
#define FMOD_DEBUG_TYPE_FILE 0x00000200
|
||||
#define FMOD_DEBUG_TYPE_CODEC 0x00000400
|
||||
#define FMOD_DEBUG_TYPE_TRACE 0x00000800
|
||||
#define FMOD_DEBUG_DISPLAY_TIMESTAMPS 0x00010000
|
||||
#define FMOD_DEBUG_DISPLAY_LINENUMBERS 0x00020000
|
||||
#define FMOD_DEBUG_DISPLAY_THREAD 0x00040000
|
||||
|
||||
typedef unsigned int FMOD_MEMORY_TYPE;
|
||||
#define FMOD_MEMORY_NORMAL 0x00000000
|
||||
#define FMOD_MEMORY_STREAM_FILE 0x00000001
|
||||
#define FMOD_MEMORY_STREAM_DECODE 0x00000002
|
||||
#define FMOD_MEMORY_SAMPLEDATA 0x00000004
|
||||
#define FMOD_MEMORY_DSP_BUFFER 0x00000008
|
||||
#define FMOD_MEMORY_PLUGIN 0x00000010
|
||||
#define FMOD_MEMORY_PERSISTENT 0x00200000
|
||||
#define FMOD_MEMORY_ALL 0xFFFFFFFF
|
||||
|
||||
typedef unsigned int FMOD_INITFLAGS;
|
||||
#define FMOD_INIT_NORMAL 0x00000000
|
||||
#define FMOD_INIT_STREAM_FROM_UPDATE 0x00000001
|
||||
#define FMOD_INIT_MIX_FROM_UPDATE 0x00000002
|
||||
#define FMOD_INIT_3D_RIGHTHANDED 0x00000004
|
||||
#define FMOD_INIT_CLIP_OUTPUT 0x00000008
|
||||
#define FMOD_INIT_CHANNEL_LOWPASS 0x00000100
|
||||
#define FMOD_INIT_CHANNEL_DISTANCEFILTER 0x00000200
|
||||
#define FMOD_INIT_PROFILE_ENABLE 0x00010000
|
||||
#define FMOD_INIT_VOL0_BECOMES_VIRTUAL 0x00020000
|
||||
#define FMOD_INIT_GEOMETRY_USECLOSEST 0x00040000
|
||||
#define FMOD_INIT_PREFER_DOLBY_DOWNMIX 0x00080000
|
||||
#define FMOD_INIT_THREAD_UNSAFE 0x00100000
|
||||
#define FMOD_INIT_PROFILE_METER_ALL 0x00200000
|
||||
#define FMOD_INIT_MEMORY_TRACKING 0x00400000
|
||||
|
||||
typedef unsigned int FMOD_DRIVER_STATE;
|
||||
#define FMOD_DRIVER_STATE_CONNECTED 0x00000001
|
||||
#define FMOD_DRIVER_STATE_DEFAULT 0x00000002
|
||||
|
||||
typedef unsigned int FMOD_TIMEUNIT;
|
||||
#define FMOD_TIMEUNIT_MS 0x00000001
|
||||
#define FMOD_TIMEUNIT_PCM 0x00000002
|
||||
#define FMOD_TIMEUNIT_PCMBYTES 0x00000004
|
||||
#define FMOD_TIMEUNIT_RAWBYTES 0x00000008
|
||||
#define FMOD_TIMEUNIT_PCMFRACTION 0x00000010
|
||||
#define FMOD_TIMEUNIT_MODORDER 0x00000100
|
||||
#define FMOD_TIMEUNIT_MODROW 0x00000200
|
||||
#define FMOD_TIMEUNIT_MODPATTERN 0x00000400
|
||||
|
||||
typedef unsigned int FMOD_SYSTEM_CALLBACK_TYPE;
|
||||
#define FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED 0x00000001
|
||||
#define FMOD_SYSTEM_CALLBACK_DEVICELOST 0x00000002
|
||||
#define FMOD_SYSTEM_CALLBACK_MEMORYALLOCATIONFAILED 0x00000004
|
||||
#define FMOD_SYSTEM_CALLBACK_THREADCREATED 0x00000008
|
||||
#define FMOD_SYSTEM_CALLBACK_BADDSPCONNECTION 0x00000010
|
||||
#define FMOD_SYSTEM_CALLBACK_PREMIX 0x00000020
|
||||
#define FMOD_SYSTEM_CALLBACK_POSTMIX 0x00000040
|
||||
#define FMOD_SYSTEM_CALLBACK_ERROR 0x00000080
|
||||
#define FMOD_SYSTEM_CALLBACK_MIDMIX 0x00000100
|
||||
#define FMOD_SYSTEM_CALLBACK_THREADDESTROYED 0x00000200
|
||||
#define FMOD_SYSTEM_CALLBACK_PREUPDATE 0x00000400
|
||||
#define FMOD_SYSTEM_CALLBACK_POSTUPDATE 0x00000800
|
||||
#define FMOD_SYSTEM_CALLBACK_RECORDLISTCHANGED 0x00001000
|
||||
#define FMOD_SYSTEM_CALLBACK_BUFFEREDNOMIX 0x00002000
|
||||
#define FMOD_SYSTEM_CALLBACK_DEVICEREINITIALIZE 0x00004000
|
||||
#define FMOD_SYSTEM_CALLBACK_OUTPUTUNDERRUN 0x00008000
|
||||
#define FMOD_SYSTEM_CALLBACK_RECORDPOSITIONCHANGED 0x00010000
|
||||
#define FMOD_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
|
||||
|
||||
typedef unsigned int FMOD_MODE;
|
||||
#define FMOD_DEFAULT 0x00000000
|
||||
#define FMOD_LOOP_OFF 0x00000001
|
||||
#define FMOD_LOOP_NORMAL 0x00000002
|
||||
#define FMOD_LOOP_BIDI 0x00000004
|
||||
#define FMOD_2D 0x00000008
|
||||
#define FMOD_3D 0x00000010
|
||||
#define FMOD_CREATESTREAM 0x00000080
|
||||
#define FMOD_CREATESAMPLE 0x00000100
|
||||
#define FMOD_CREATECOMPRESSEDSAMPLE 0x00000200
|
||||
#define FMOD_OPENUSER 0x00000400
|
||||
#define FMOD_OPENMEMORY 0x00000800
|
||||
#define FMOD_OPENMEMORY_POINT 0x10000000
|
||||
#define FMOD_OPENRAW 0x00001000
|
||||
#define FMOD_OPENONLY 0x00002000
|
||||
#define FMOD_ACCURATETIME 0x00004000
|
||||
#define FMOD_MPEGSEARCH 0x00008000
|
||||
#define FMOD_NONBLOCKING 0x00010000
|
||||
#define FMOD_UNIQUE 0x00020000
|
||||
#define FMOD_3D_HEADRELATIVE 0x00040000
|
||||
#define FMOD_3D_WORLDRELATIVE 0x00080000
|
||||
#define FMOD_3D_INVERSEROLLOFF 0x00100000
|
||||
#define FMOD_3D_LINEARROLLOFF 0x00200000
|
||||
#define FMOD_3D_LINEARSQUAREROLLOFF 0x00400000
|
||||
#define FMOD_3D_INVERSETAPEREDROLLOFF 0x00800000
|
||||
#define FMOD_3D_CUSTOMROLLOFF 0x04000000
|
||||
#define FMOD_3D_IGNOREGEOMETRY 0x40000000
|
||||
#define FMOD_IGNORETAGS 0x02000000
|
||||
#define FMOD_LOWMEM 0x08000000
|
||||
#define FMOD_VIRTUAL_PLAYFROMSTART 0x80000000
|
||||
|
||||
typedef unsigned int FMOD_CHANNELMASK;
|
||||
#define FMOD_CHANNELMASK_FRONT_LEFT 0x00000001
|
||||
#define FMOD_CHANNELMASK_FRONT_RIGHT 0x00000002
|
||||
#define FMOD_CHANNELMASK_FRONT_CENTER 0x00000004
|
||||
#define FMOD_CHANNELMASK_LOW_FREQUENCY 0x00000008
|
||||
#define FMOD_CHANNELMASK_SURROUND_LEFT 0x00000010
|
||||
#define FMOD_CHANNELMASK_SURROUND_RIGHT 0x00000020
|
||||
#define FMOD_CHANNELMASK_BACK_LEFT 0x00000040
|
||||
#define FMOD_CHANNELMASK_BACK_RIGHT 0x00000080
|
||||
#define FMOD_CHANNELMASK_BACK_CENTER 0x00000100
|
||||
#define FMOD_CHANNELMASK_MONO (FMOD_CHANNELMASK_FRONT_LEFT)
|
||||
#define FMOD_CHANNELMASK_STEREO (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT)
|
||||
#define FMOD_CHANNELMASK_LRC (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER)
|
||||
#define FMOD_CHANNELMASK_QUAD (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
|
||||
#define FMOD_CHANNELMASK_SURROUND (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
|
||||
#define FMOD_CHANNELMASK_5POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
|
||||
#define FMOD_CHANNELMASK_5POINT1_REARS (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
|
||||
#define FMOD_CHANNELMASK_7POINT0 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
|
||||
#define FMOD_CHANNELMASK_7POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
|
||||
|
||||
typedef unsigned long long FMOD_PORT_INDEX;
|
||||
#define FMOD_PORT_INDEX_NONE 0xFFFFFFFFFFFFFFFF
|
||||
#define FMOD_PORT_INDEX_FLAG_VR_CONTROLLER 0x1000000000000000
|
||||
|
||||
typedef int FMOD_THREAD_PRIORITY;
|
||||
/* Platform specific priority range */
|
||||
#define FMOD_THREAD_PRIORITY_PLATFORM_MIN (-32 * 1024)
|
||||
#define FMOD_THREAD_PRIORITY_PLATFORM_MAX ( 32 * 1024)
|
||||
/* Platform agnostic priorities, maps internally to platform specific value */
|
||||
#define FMOD_THREAD_PRIORITY_DEFAULT (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 1)
|
||||
#define FMOD_THREAD_PRIORITY_LOW (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 2)
|
||||
#define FMOD_THREAD_PRIORITY_MEDIUM (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 3)
|
||||
#define FMOD_THREAD_PRIORITY_HIGH (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 4)
|
||||
#define FMOD_THREAD_PRIORITY_VERY_HIGH (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 5)
|
||||
#define FMOD_THREAD_PRIORITY_EXTREME (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 6)
|
||||
#define FMOD_THREAD_PRIORITY_CRITICAL (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 7)
|
||||
/* Thread defaults */
|
||||
#define FMOD_THREAD_PRIORITY_MIXER FMOD_THREAD_PRIORITY_EXTREME
|
||||
#define FMOD_THREAD_PRIORITY_FEEDER FMOD_THREAD_PRIORITY_CRITICAL
|
||||
#define FMOD_THREAD_PRIORITY_STREAM FMOD_THREAD_PRIORITY_VERY_HIGH
|
||||
#define FMOD_THREAD_PRIORITY_FILE FMOD_THREAD_PRIORITY_HIGH
|
||||
#define FMOD_THREAD_PRIORITY_NONBLOCKING FMOD_THREAD_PRIORITY_HIGH
|
||||
#define FMOD_THREAD_PRIORITY_RECORD FMOD_THREAD_PRIORITY_HIGH
|
||||
#define FMOD_THREAD_PRIORITY_GEOMETRY FMOD_THREAD_PRIORITY_LOW
|
||||
#define FMOD_THREAD_PRIORITY_PROFILER FMOD_THREAD_PRIORITY_MEDIUM
|
||||
#define FMOD_THREAD_PRIORITY_STUDIO_UPDATE FMOD_THREAD_PRIORITY_MEDIUM
|
||||
#define FMOD_THREAD_PRIORITY_STUDIO_LOAD_BANK FMOD_THREAD_PRIORITY_MEDIUM
|
||||
#define FMOD_THREAD_PRIORITY_STUDIO_LOAD_SAMPLE FMOD_THREAD_PRIORITY_MEDIUM
|
||||
#define FMOD_THREAD_PRIORITY_CONVOLUTION1 FMOD_THREAD_PRIORITY_VERY_HIGH
|
||||
#define FMOD_THREAD_PRIORITY_CONVOLUTION2 FMOD_THREAD_PRIORITY_VERY_HIGH
|
||||
|
||||
typedef unsigned int FMOD_THREAD_STACK_SIZE;
|
||||
#define FMOD_THREAD_STACK_SIZE_DEFAULT 0
|
||||
#define FMOD_THREAD_STACK_SIZE_MIXER (80 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_FEEDER (16 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_STREAM (96 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_FILE (64 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_NONBLOCKING (112 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_RECORD (16 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_GEOMETRY (48 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_PROFILER (128 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_STUDIO_UPDATE (96 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_BANK (96 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_SAMPLE (96 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_CONVOLUTION1 (16 * 1024)
|
||||
#define FMOD_THREAD_STACK_SIZE_CONVOLUTION2 (16 * 1024)
|
||||
|
||||
typedef long long FMOD_THREAD_AFFINITY;
|
||||
/* Platform agnostic thread groupings */
|
||||
#define FMOD_THREAD_AFFINITY_GROUP_DEFAULT 0x4000000000000000
|
||||
#define FMOD_THREAD_AFFINITY_GROUP_A 0x4000000000000001
|
||||
#define FMOD_THREAD_AFFINITY_GROUP_B 0x4000000000000002
|
||||
#define FMOD_THREAD_AFFINITY_GROUP_C 0x4000000000000003
|
||||
/* Thread defaults */
|
||||
#define FMOD_THREAD_AFFINITY_MIXER FMOD_THREAD_AFFINITY_GROUP_A
|
||||
#define FMOD_THREAD_AFFINITY_FEEDER FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_STREAM FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_FILE FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_NONBLOCKING FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_RECORD FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_GEOMETRY FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_PROFILER FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_STUDIO_UPDATE FMOD_THREAD_AFFINITY_GROUP_B
|
||||
#define FMOD_THREAD_AFFINITY_STUDIO_LOAD_BANK FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_STUDIO_LOAD_SAMPLE FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_CONVOLUTION1 FMOD_THREAD_AFFINITY_GROUP_C
|
||||
#define FMOD_THREAD_AFFINITY_CONVOLUTION2 FMOD_THREAD_AFFINITY_GROUP_C
|
||||
/* Core mask, valid up to 1 << 62 */
|
||||
#define FMOD_THREAD_AFFINITY_CORE_ALL 0
|
||||
#define FMOD_THREAD_AFFINITY_CORE_0 (1 << 0)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_1 (1 << 1)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_2 (1 << 2)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_3 (1 << 3)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_4 (1 << 4)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_5 (1 << 5)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_6 (1 << 6)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_7 (1 << 7)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_8 (1 << 8)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_9 (1 << 9)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_10 (1 << 10)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_11 (1 << 11)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_12 (1 << 12)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_13 (1 << 13)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_14 (1 << 14)
|
||||
#define FMOD_THREAD_AFFINITY_CORE_15 (1 << 15)
|
||||
|
||||
/* Preset for FMOD_REVERB_PROPERTIES */
|
||||
#define FMOD_PRESET_OFF { 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f }
|
||||
#define FMOD_PRESET_GENERIC { 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f }
|
||||
#define FMOD_PRESET_PADDEDCELL { 170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f }
|
||||
#define FMOD_PRESET_ROOM { 400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4f }
|
||||
#define FMOD_PRESET_BATHROOM { 1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5f }
|
||||
#define FMOD_PRESET_LIVINGROOM { 500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0f }
|
||||
#define FMOD_PRESET_STONEROOM { 2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5f }
|
||||
#define FMOD_PRESET_AUDITORIUM { 4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7f }
|
||||
#define FMOD_PRESET_CONCERTHALL { 3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8f }
|
||||
#define FMOD_PRESET_CAVE { 2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3f }
|
||||
#define FMOD_PRESET_ARENA { 7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6f }
|
||||
#define FMOD_PRESET_HANGAR { 10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4f }
|
||||
#define FMOD_PRESET_CARPETTEDHALLWAY { 300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0f }
|
||||
#define FMOD_PRESET_HALLWAY { 1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5f }
|
||||
#define FMOD_PRESET_STONECORRIDOR { 270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0f }
|
||||
#define FMOD_PRESET_ALLEY { 1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8f }
|
||||
#define FMOD_PRESET_FOREST { 1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3f }
|
||||
#define FMOD_PRESET_CITY { 1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0f }
|
||||
#define FMOD_PRESET_MOUNTAINS { 1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0f }
|
||||
#define FMOD_PRESET_QUARRY { 1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0f }
|
||||
#define FMOD_PRESET_PLAIN { 1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0f }
|
||||
#define FMOD_PRESET_PARKINGLOT { 1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5f }
|
||||
#define FMOD_PRESET_SEWERPIPE { 2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2f }
|
||||
#define FMOD_PRESET_UNDERWATER { 1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0f }
|
||||
|
||||
#define FMOD_MAX_CHANNEL_WIDTH 32
|
||||
#define FMOD_MAX_SYSTEMS 8
|
||||
#define FMOD_MAX_LISTENERS 8
|
||||
#define FMOD_REVERB_MAXINSTANCES 4
|
||||
|
||||
typedef enum FMOD_THREAD_TYPE
|
||||
{
|
||||
FMOD_THREAD_TYPE_MIXER,
|
||||
FMOD_THREAD_TYPE_FEEDER,
|
||||
FMOD_THREAD_TYPE_STREAM,
|
||||
FMOD_THREAD_TYPE_FILE,
|
||||
FMOD_THREAD_TYPE_NONBLOCKING,
|
||||
FMOD_THREAD_TYPE_RECORD,
|
||||
FMOD_THREAD_TYPE_GEOMETRY,
|
||||
FMOD_THREAD_TYPE_PROFILER,
|
||||
FMOD_THREAD_TYPE_STUDIO_UPDATE,
|
||||
FMOD_THREAD_TYPE_STUDIO_LOAD_BANK,
|
||||
FMOD_THREAD_TYPE_STUDIO_LOAD_SAMPLE,
|
||||
FMOD_THREAD_TYPE_CONVOLUTION1,
|
||||
FMOD_THREAD_TYPE_CONVOLUTION2,
|
||||
|
||||
FMOD_THREAD_TYPE_MAX,
|
||||
FMOD_THREAD_TYPE_FORCEINT = 65536
|
||||
} FMOD_THREAD_TYPE;
|
||||
|
||||
typedef enum FMOD_RESULT
|
||||
{
|
||||
FMOD_OK,
|
||||
FMOD_ERR_BADCOMMAND,
|
||||
FMOD_ERR_CHANNEL_ALLOC,
|
||||
FMOD_ERR_CHANNEL_STOLEN,
|
||||
FMOD_ERR_DMA,
|
||||
FMOD_ERR_DSP_CONNECTION,
|
||||
FMOD_ERR_DSP_DONTPROCESS,
|
||||
FMOD_ERR_DSP_FORMAT,
|
||||
FMOD_ERR_DSP_INUSE,
|
||||
FMOD_ERR_DSP_NOTFOUND,
|
||||
FMOD_ERR_DSP_RESERVED,
|
||||
FMOD_ERR_DSP_SILENCE,
|
||||
FMOD_ERR_DSP_TYPE,
|
||||
FMOD_ERR_FILE_BAD,
|
||||
FMOD_ERR_FILE_COULDNOTSEEK,
|
||||
FMOD_ERR_FILE_DISKEJECTED,
|
||||
FMOD_ERR_FILE_EOF,
|
||||
FMOD_ERR_FILE_ENDOFDATA,
|
||||
FMOD_ERR_FILE_NOTFOUND,
|
||||
FMOD_ERR_FORMAT,
|
||||
FMOD_ERR_HEADER_MISMATCH,
|
||||
FMOD_ERR_HTTP,
|
||||
FMOD_ERR_HTTP_ACCESS,
|
||||
FMOD_ERR_HTTP_PROXY_AUTH,
|
||||
FMOD_ERR_HTTP_SERVER_ERROR,
|
||||
FMOD_ERR_HTTP_TIMEOUT,
|
||||
FMOD_ERR_INITIALIZATION,
|
||||
FMOD_ERR_INITIALIZED,
|
||||
FMOD_ERR_INTERNAL,
|
||||
FMOD_ERR_INVALID_FLOAT,
|
||||
FMOD_ERR_INVALID_HANDLE,
|
||||
FMOD_ERR_INVALID_PARAM,
|
||||
FMOD_ERR_INVALID_POSITION,
|
||||
FMOD_ERR_INVALID_SPEAKER,
|
||||
FMOD_ERR_INVALID_SYNCPOINT,
|
||||
FMOD_ERR_INVALID_THREAD,
|
||||
FMOD_ERR_INVALID_VECTOR,
|
||||
FMOD_ERR_MAXAUDIBLE,
|
||||
FMOD_ERR_MEMORY,
|
||||
FMOD_ERR_MEMORY_CANTPOINT,
|
||||
FMOD_ERR_NEEDS3D,
|
||||
FMOD_ERR_NEEDSHARDWARE,
|
||||
FMOD_ERR_NET_CONNECT,
|
||||
FMOD_ERR_NET_SOCKET_ERROR,
|
||||
FMOD_ERR_NET_URL,
|
||||
FMOD_ERR_NET_WOULD_BLOCK,
|
||||
FMOD_ERR_NOTREADY,
|
||||
FMOD_ERR_OUTPUT_ALLOCATED,
|
||||
FMOD_ERR_OUTPUT_CREATEBUFFER,
|
||||
FMOD_ERR_OUTPUT_DRIVERCALL,
|
||||
FMOD_ERR_OUTPUT_FORMAT,
|
||||
FMOD_ERR_OUTPUT_INIT,
|
||||
FMOD_ERR_OUTPUT_NODRIVERS,
|
||||
FMOD_ERR_PLUGIN,
|
||||
FMOD_ERR_PLUGIN_MISSING,
|
||||
FMOD_ERR_PLUGIN_RESOURCE,
|
||||
FMOD_ERR_PLUGIN_VERSION,
|
||||
FMOD_ERR_RECORD,
|
||||
FMOD_ERR_REVERB_CHANNELGROUP,
|
||||
FMOD_ERR_REVERB_INSTANCE,
|
||||
FMOD_ERR_SUBSOUNDS,
|
||||
FMOD_ERR_SUBSOUND_ALLOCATED,
|
||||
FMOD_ERR_SUBSOUND_CANTMOVE,
|
||||
FMOD_ERR_TAGNOTFOUND,
|
||||
FMOD_ERR_TOOMANYCHANNELS,
|
||||
FMOD_ERR_TRUNCATED,
|
||||
FMOD_ERR_UNIMPLEMENTED,
|
||||
FMOD_ERR_UNINITIALIZED,
|
||||
FMOD_ERR_UNSUPPORTED,
|
||||
FMOD_ERR_VERSION,
|
||||
FMOD_ERR_EVENT_ALREADY_LOADED,
|
||||
FMOD_ERR_EVENT_LIVEUPDATE_BUSY,
|
||||
FMOD_ERR_EVENT_LIVEUPDATE_MISMATCH,
|
||||
FMOD_ERR_EVENT_LIVEUPDATE_TIMEOUT,
|
||||
FMOD_ERR_EVENT_NOTFOUND,
|
||||
FMOD_ERR_STUDIO_UNINITIALIZED,
|
||||
FMOD_ERR_STUDIO_NOT_LOADED,
|
||||
FMOD_ERR_INVALID_STRING,
|
||||
FMOD_ERR_ALREADY_LOCKED,
|
||||
FMOD_ERR_NOT_LOCKED,
|
||||
FMOD_ERR_RECORD_DISCONNECTED,
|
||||
FMOD_ERR_TOOMANYSAMPLES,
|
||||
|
||||
FMOD_RESULT_FORCEINT = 65536
|
||||
} FMOD_RESULT;
|
||||
|
||||
typedef enum FMOD_CHANNELCONTROL_TYPE
|
||||
{
|
||||
FMOD_CHANNELCONTROL_CHANNEL,
|
||||
FMOD_CHANNELCONTROL_CHANNELGROUP,
|
||||
|
||||
FMOD_CHANNELCONTROL_MAX,
|
||||
FMOD_CHANNELCONTROL_FORCEINT = 65536
|
||||
} FMOD_CHANNELCONTROL_TYPE;
|
||||
|
||||
typedef enum FMOD_OUTPUTTYPE
|
||||
{
|
||||
FMOD_OUTPUTTYPE_AUTODETECT,
|
||||
FMOD_OUTPUTTYPE_UNKNOWN,
|
||||
FMOD_OUTPUTTYPE_NOSOUND,
|
||||
FMOD_OUTPUTTYPE_WAVWRITER,
|
||||
FMOD_OUTPUTTYPE_NOSOUND_NRT,
|
||||
FMOD_OUTPUTTYPE_WAVWRITER_NRT,
|
||||
FMOD_OUTPUTTYPE_WASAPI,
|
||||
FMOD_OUTPUTTYPE_ASIO,
|
||||
FMOD_OUTPUTTYPE_PULSEAUDIO,
|
||||
FMOD_OUTPUTTYPE_ALSA,
|
||||
FMOD_OUTPUTTYPE_COREAUDIO,
|
||||
FMOD_OUTPUTTYPE_AUDIOTRACK,
|
||||
FMOD_OUTPUTTYPE_OPENSL,
|
||||
FMOD_OUTPUTTYPE_AUDIOOUT,
|
||||
FMOD_OUTPUTTYPE_AUDIO3D,
|
||||
FMOD_OUTPUTTYPE_WEBAUDIO,
|
||||
FMOD_OUTPUTTYPE_NNAUDIO,
|
||||
FMOD_OUTPUTTYPE_WINSONIC,
|
||||
FMOD_OUTPUTTYPE_AAUDIO,
|
||||
FMOD_OUTPUTTYPE_AUDIOWORKLET,
|
||||
FMOD_OUTPUTTYPE_PHASE,
|
||||
|
||||
FMOD_OUTPUTTYPE_MAX,
|
||||
FMOD_OUTPUTTYPE_FORCEINT = 65536
|
||||
} FMOD_OUTPUTTYPE;
|
||||
|
||||
typedef enum FMOD_DEBUG_MODE
|
||||
{
|
||||
FMOD_DEBUG_MODE_TTY,
|
||||
FMOD_DEBUG_MODE_FILE,
|
||||
FMOD_DEBUG_MODE_CALLBACK,
|
||||
|
||||
FMOD_DEBUG_MODE_FORCEINT = 65536
|
||||
} FMOD_DEBUG_MODE;
|
||||
|
||||
typedef enum FMOD_SPEAKERMODE
|
||||
{
|
||||
FMOD_SPEAKERMODE_DEFAULT,
|
||||
FMOD_SPEAKERMODE_RAW,
|
||||
FMOD_SPEAKERMODE_MONO,
|
||||
FMOD_SPEAKERMODE_STEREO,
|
||||
FMOD_SPEAKERMODE_QUAD,
|
||||
FMOD_SPEAKERMODE_SURROUND,
|
||||
FMOD_SPEAKERMODE_5POINT1,
|
||||
FMOD_SPEAKERMODE_7POINT1,
|
||||
FMOD_SPEAKERMODE_7POINT1POINT4,
|
||||
|
||||
FMOD_SPEAKERMODE_MAX,
|
||||
FMOD_SPEAKERMODE_FORCEINT = 65536
|
||||
} FMOD_SPEAKERMODE;
|
||||
|
||||
typedef enum FMOD_SPEAKER
|
||||
{
|
||||
FMOD_SPEAKER_NONE = -1,
|
||||
FMOD_SPEAKER_FRONT_LEFT = 0,
|
||||
FMOD_SPEAKER_FRONT_RIGHT,
|
||||
FMOD_SPEAKER_FRONT_CENTER,
|
||||
FMOD_SPEAKER_LOW_FREQUENCY,
|
||||
FMOD_SPEAKER_SURROUND_LEFT,
|
||||
FMOD_SPEAKER_SURROUND_RIGHT,
|
||||
FMOD_SPEAKER_BACK_LEFT,
|
||||
FMOD_SPEAKER_BACK_RIGHT,
|
||||
FMOD_SPEAKER_TOP_FRONT_LEFT,
|
||||
FMOD_SPEAKER_TOP_FRONT_RIGHT,
|
||||
FMOD_SPEAKER_TOP_BACK_LEFT,
|
||||
FMOD_SPEAKER_TOP_BACK_RIGHT,
|
||||
|
||||
FMOD_SPEAKER_MAX,
|
||||
FMOD_SPEAKER_FORCEINT = 65536
|
||||
} FMOD_SPEAKER;
|
||||
|
||||
typedef enum FMOD_CHANNELORDER
|
||||
{
|
||||
FMOD_CHANNELORDER_DEFAULT,
|
||||
FMOD_CHANNELORDER_WAVEFORMAT,
|
||||
FMOD_CHANNELORDER_PROTOOLS,
|
||||
FMOD_CHANNELORDER_ALLMONO,
|
||||
FMOD_CHANNELORDER_ALLSTEREO,
|
||||
FMOD_CHANNELORDER_ALSA,
|
||||
|
||||
FMOD_CHANNELORDER_MAX,
|
||||
FMOD_CHANNELORDER_FORCEINT = 65536
|
||||
} FMOD_CHANNELORDER;
|
||||
|
||||
typedef enum FMOD_PLUGINTYPE
|
||||
{
|
||||
FMOD_PLUGINTYPE_OUTPUT,
|
||||
FMOD_PLUGINTYPE_CODEC,
|
||||
FMOD_PLUGINTYPE_DSP,
|
||||
|
||||
FMOD_PLUGINTYPE_MAX,
|
||||
FMOD_PLUGINTYPE_FORCEINT = 65536
|
||||
} FMOD_PLUGINTYPE;
|
||||
|
||||
typedef enum FMOD_SOUND_TYPE
|
||||
{
|
||||
FMOD_SOUND_TYPE_UNKNOWN,
|
||||
FMOD_SOUND_TYPE_AIFF,
|
||||
FMOD_SOUND_TYPE_ASF,
|
||||
FMOD_SOUND_TYPE_DLS,
|
||||
FMOD_SOUND_TYPE_FLAC,
|
||||
FMOD_SOUND_TYPE_FSB,
|
||||
FMOD_SOUND_TYPE_IT,
|
||||
FMOD_SOUND_TYPE_MIDI,
|
||||
FMOD_SOUND_TYPE_MOD,
|
||||
FMOD_SOUND_TYPE_MPEG,
|
||||
FMOD_SOUND_TYPE_OGGVORBIS,
|
||||
FMOD_SOUND_TYPE_PLAYLIST,
|
||||
FMOD_SOUND_TYPE_RAW,
|
||||
FMOD_SOUND_TYPE_S3M,
|
||||
FMOD_SOUND_TYPE_USER,
|
||||
FMOD_SOUND_TYPE_WAV,
|
||||
FMOD_SOUND_TYPE_XM,
|
||||
FMOD_SOUND_TYPE_XMA,
|
||||
FMOD_SOUND_TYPE_AUDIOQUEUE,
|
||||
FMOD_SOUND_TYPE_AT9,
|
||||
FMOD_SOUND_TYPE_VORBIS,
|
||||
FMOD_SOUND_TYPE_MEDIA_FOUNDATION,
|
||||
FMOD_SOUND_TYPE_MEDIACODEC,
|
||||
FMOD_SOUND_TYPE_FADPCM,
|
||||
FMOD_SOUND_TYPE_OPUS,
|
||||
|
||||
FMOD_SOUND_TYPE_MAX,
|
||||
FMOD_SOUND_TYPE_FORCEINT = 65536
|
||||
} FMOD_SOUND_TYPE;
|
||||
|
||||
typedef enum FMOD_SOUND_FORMAT
|
||||
{
|
||||
FMOD_SOUND_FORMAT_NONE,
|
||||
FMOD_SOUND_FORMAT_PCM8,
|
||||
FMOD_SOUND_FORMAT_PCM16,
|
||||
FMOD_SOUND_FORMAT_PCM24,
|
||||
FMOD_SOUND_FORMAT_PCM32,
|
||||
FMOD_SOUND_FORMAT_PCMFLOAT,
|
||||
FMOD_SOUND_FORMAT_BITSTREAM,
|
||||
|
||||
FMOD_SOUND_FORMAT_MAX,
|
||||
FMOD_SOUND_FORMAT_FORCEINT = 65536
|
||||
} FMOD_SOUND_FORMAT;
|
||||
|
||||
typedef enum FMOD_OPENSTATE
|
||||
{
|
||||
FMOD_OPENSTATE_READY,
|
||||
FMOD_OPENSTATE_LOADING,
|
||||
FMOD_OPENSTATE_ERROR,
|
||||
FMOD_OPENSTATE_CONNECTING,
|
||||
FMOD_OPENSTATE_BUFFERING,
|
||||
FMOD_OPENSTATE_SEEKING,
|
||||
FMOD_OPENSTATE_PLAYING,
|
||||
FMOD_OPENSTATE_SETPOSITION,
|
||||
|
||||
FMOD_OPENSTATE_MAX,
|
||||
FMOD_OPENSTATE_FORCEINT = 65536
|
||||
} FMOD_OPENSTATE;
|
||||
|
||||
typedef enum FMOD_SOUNDGROUP_BEHAVIOR
|
||||
{
|
||||
FMOD_SOUNDGROUP_BEHAVIOR_FAIL,
|
||||
FMOD_SOUNDGROUP_BEHAVIOR_MUTE,
|
||||
FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST,
|
||||
|
||||
FMOD_SOUNDGROUP_BEHAVIOR_MAX,
|
||||
FMOD_SOUNDGROUP_BEHAVIOR_FORCEINT = 65536
|
||||
} FMOD_SOUNDGROUP_BEHAVIOR;
|
||||
|
||||
typedef enum FMOD_CHANNELCONTROL_CALLBACK_TYPE
|
||||
{
|
||||
FMOD_CHANNELCONTROL_CALLBACK_END,
|
||||
FMOD_CHANNELCONTROL_CALLBACK_VIRTUALVOICE,
|
||||
FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT,
|
||||
FMOD_CHANNELCONTROL_CALLBACK_OCCLUSION,
|
||||
|
||||
FMOD_CHANNELCONTROL_CALLBACK_MAX,
|
||||
FMOD_CHANNELCONTROL_CALLBACK_FORCEINT = 65536
|
||||
} FMOD_CHANNELCONTROL_CALLBACK_TYPE;
|
||||
|
||||
typedef enum FMOD_CHANNELCONTROL_DSP_INDEX
|
||||
{
|
||||
FMOD_CHANNELCONTROL_DSP_HEAD = -1,
|
||||
FMOD_CHANNELCONTROL_DSP_FADER = -2,
|
||||
FMOD_CHANNELCONTROL_DSP_TAIL = -3,
|
||||
|
||||
FMOD_CHANNELCONTROL_DSP_FORCEINT = 65536
|
||||
} FMOD_CHANNELCONTROL_DSP_INDEX;
|
||||
|
||||
typedef enum FMOD_ERRORCALLBACK_INSTANCETYPE
|
||||
{
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_NONE,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_SYSTEM,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNEL,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELGROUP,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELCONTROL,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_SOUND,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_SOUNDGROUP,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_DSP,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_DSPCONNECTION,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_GEOMETRY,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_REVERB3D,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_SYSTEM,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTDESCRIPTION,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTINSTANCE,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_PARAMETERINSTANCE,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BUS,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_VCA,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BANK,
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_COMMANDREPLAY,
|
||||
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE_FORCEINT = 65536
|
||||
} FMOD_ERRORCALLBACK_INSTANCETYPE;
|
||||
|
||||
typedef enum FMOD_DSP_RESAMPLER
|
||||
{
|
||||
FMOD_DSP_RESAMPLER_DEFAULT,
|
||||
FMOD_DSP_RESAMPLER_NOINTERP,
|
||||
FMOD_DSP_RESAMPLER_LINEAR,
|
||||
FMOD_DSP_RESAMPLER_CUBIC,
|
||||
FMOD_DSP_RESAMPLER_SPLINE,
|
||||
|
||||
FMOD_DSP_RESAMPLER_MAX,
|
||||
FMOD_DSP_RESAMPLER_FORCEINT = 65536
|
||||
} FMOD_DSP_RESAMPLER;
|
||||
|
||||
typedef enum FMOD_DSP_CALLBACK_TYPE
|
||||
{
|
||||
FMOD_DSP_CALLBACK_DATAPARAMETERRELEASE,
|
||||
|
||||
FMOD_DSP_CALLBACK_MAX,
|
||||
FMOD_DSP_CALLBACK_FORCEINT = 65536
|
||||
} FMOD_DSP_CALLBACK_TYPE;
|
||||
|
||||
typedef enum FMOD_DSPCONNECTION_TYPE
|
||||
{
|
||||
FMOD_DSPCONNECTION_TYPE_STANDARD,
|
||||
FMOD_DSPCONNECTION_TYPE_SIDECHAIN,
|
||||
FMOD_DSPCONNECTION_TYPE_SEND,
|
||||
FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN,
|
||||
|
||||
FMOD_DSPCONNECTION_TYPE_MAX,
|
||||
FMOD_DSPCONNECTION_TYPE_FORCEINT = 65536
|
||||
} FMOD_DSPCONNECTION_TYPE;
|
||||
|
||||
typedef enum FMOD_TAGTYPE
|
||||
{
|
||||
FMOD_TAGTYPE_UNKNOWN,
|
||||
FMOD_TAGTYPE_ID3V1,
|
||||
FMOD_TAGTYPE_ID3V2,
|
||||
FMOD_TAGTYPE_VORBISCOMMENT,
|
||||
FMOD_TAGTYPE_SHOUTCAST,
|
||||
FMOD_TAGTYPE_ICECAST,
|
||||
FMOD_TAGTYPE_ASF,
|
||||
FMOD_TAGTYPE_MIDI,
|
||||
FMOD_TAGTYPE_PLAYLIST,
|
||||
FMOD_TAGTYPE_FMOD,
|
||||
FMOD_TAGTYPE_USER,
|
||||
|
||||
FMOD_TAGTYPE_MAX,
|
||||
FMOD_TAGTYPE_FORCEINT = 65536
|
||||
} FMOD_TAGTYPE;
|
||||
|
||||
typedef enum FMOD_TAGDATATYPE
|
||||
{
|
||||
FMOD_TAGDATATYPE_BINARY,
|
||||
FMOD_TAGDATATYPE_INT,
|
||||
FMOD_TAGDATATYPE_FLOAT,
|
||||
FMOD_TAGDATATYPE_STRING,
|
||||
FMOD_TAGDATATYPE_STRING_UTF16,
|
||||
FMOD_TAGDATATYPE_STRING_UTF16BE,
|
||||
FMOD_TAGDATATYPE_STRING_UTF8,
|
||||
|
||||
FMOD_TAGDATATYPE_MAX,
|
||||
FMOD_TAGDATATYPE_FORCEINT = 65536
|
||||
} FMOD_TAGDATATYPE;
|
||||
|
||||
typedef enum FMOD_PORT_TYPE
|
||||
{
|
||||
FMOD_PORT_TYPE_MUSIC,
|
||||
FMOD_PORT_TYPE_COPYRIGHT_MUSIC,
|
||||
FMOD_PORT_TYPE_VOICE,
|
||||
FMOD_PORT_TYPE_CONTROLLER,
|
||||
FMOD_PORT_TYPE_PERSONAL,
|
||||
FMOD_PORT_TYPE_VIBRATION,
|
||||
FMOD_PORT_TYPE_AUX,
|
||||
|
||||
FMOD_PORT_TYPE_MAX,
|
||||
FMOD_PORT_TYPE_FORCEINT = 65536
|
||||
} FMOD_PORT_TYPE;
|
||||
|
||||
/*
|
||||
FMOD callbacks
|
||||
*/
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DEBUG_CALLBACK) (FMOD_DEBUG_FLAGS flags, const char *file, int line, const char* func, const char* message);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_SYSTEM_CALLBACK) (FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK_TYPE type, void *commanddata1, void* commanddata2, void *userdata);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_CHANNELCONTROL_CALLBACK) (FMOD_CHANNELCONTROL *channelcontrol, FMOD_CHANNELCONTROL_TYPE controltype, FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype, void *commanddata1, void *commanddata2);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_CALLBACK) (FMOD_DSP *dsp, FMOD_DSP_CALLBACK_TYPE type, void *data);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_SOUND_NONBLOCK_CALLBACK) (FMOD_SOUND *sound, FMOD_RESULT result);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_SOUND_PCMREAD_CALLBACK) (FMOD_SOUND *sound, void *data, unsigned int datalen);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_SOUND_PCMSETPOS_CALLBACK) (FMOD_SOUND *sound, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_FILE_OPEN_CALLBACK) (const char *name, unsigned int *filesize, void **handle, void *userdata);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_FILE_CLOSE_CALLBACK) (void *handle, void *userdata);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_FILE_READ_CALLBACK) (void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_FILE_SEEK_CALLBACK) (void *handle, unsigned int pos, void *userdata);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_FILE_ASYNCREAD_CALLBACK) (FMOD_ASYNCREADINFO *info, void *userdata);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_FILE_ASYNCCANCEL_CALLBACK)(FMOD_ASYNCREADINFO *info, void *userdata);
|
||||
typedef void (F_CALL *FMOD_FILE_ASYNCDONE_FUNC) (FMOD_ASYNCREADINFO *info, FMOD_RESULT result);
|
||||
typedef void* (F_CALL *FMOD_MEMORY_ALLOC_CALLBACK) (unsigned int size, FMOD_MEMORY_TYPE type, const char *sourcestr);
|
||||
typedef void* (F_CALL *FMOD_MEMORY_REALLOC_CALLBACK) (void *ptr, unsigned int size, FMOD_MEMORY_TYPE type, const char *sourcestr);
|
||||
typedef void (F_CALL *FMOD_MEMORY_FREE_CALLBACK) (void *ptr, FMOD_MEMORY_TYPE type, const char *sourcestr);
|
||||
typedef float (F_CALL *FMOD_3D_ROLLOFF_CALLBACK) (FMOD_CHANNELCONTROL *channelcontrol, float distance);
|
||||
|
||||
/*
|
||||
FMOD structs
|
||||
*/
|
||||
struct FMOD_ASYNCREADINFO
|
||||
{
|
||||
void *handle;
|
||||
unsigned int offset;
|
||||
unsigned int sizebytes;
|
||||
int priority;
|
||||
void *userdata;
|
||||
void *buffer;
|
||||
unsigned int bytesread;
|
||||
FMOD_FILE_ASYNCDONE_FUNC done;
|
||||
};
|
||||
|
||||
typedef struct FMOD_VECTOR
|
||||
{
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
} FMOD_VECTOR;
|
||||
|
||||
typedef struct FMOD_3D_ATTRIBUTES
|
||||
{
|
||||
FMOD_VECTOR position;
|
||||
FMOD_VECTOR velocity;
|
||||
FMOD_VECTOR forward;
|
||||
FMOD_VECTOR up;
|
||||
} FMOD_3D_ATTRIBUTES;
|
||||
|
||||
typedef struct FMOD_GUID
|
||||
{
|
||||
unsigned int Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
unsigned char Data4[8];
|
||||
} FMOD_GUID;
|
||||
|
||||
typedef struct FMOD_PLUGINLIST
|
||||
{
|
||||
FMOD_PLUGINTYPE type;
|
||||
void *description;
|
||||
} FMOD_PLUGINLIST;
|
||||
|
||||
typedef struct FMOD_ADVANCEDSETTINGS
|
||||
{
|
||||
int cbSize;
|
||||
int maxMPEGCodecs;
|
||||
int maxADPCMCodecs;
|
||||
int maxXMACodecs;
|
||||
int maxVorbisCodecs;
|
||||
int maxAT9Codecs;
|
||||
int maxFADPCMCodecs;
|
||||
int maxPCMCodecs;
|
||||
int ASIONumChannels;
|
||||
char **ASIOChannelList;
|
||||
FMOD_SPEAKER *ASIOSpeakerList;
|
||||
float vol0virtualvol;
|
||||
unsigned int defaultDecodeBufferSize;
|
||||
unsigned short profilePort;
|
||||
unsigned int geometryMaxFadeTime;
|
||||
float distanceFilterCenterFreq;
|
||||
int reverb3Dinstance;
|
||||
int DSPBufferPoolSize;
|
||||
FMOD_DSP_RESAMPLER resamplerMethod;
|
||||
unsigned int randomSeed;
|
||||
int maxConvolutionThreads;
|
||||
int maxOpusCodecs;
|
||||
} FMOD_ADVANCEDSETTINGS;
|
||||
|
||||
typedef struct FMOD_TAG
|
||||
{
|
||||
FMOD_TAGTYPE type;
|
||||
FMOD_TAGDATATYPE datatype;
|
||||
char *name;
|
||||
void *data;
|
||||
unsigned int datalen;
|
||||
FMOD_BOOL updated;
|
||||
} FMOD_TAG;
|
||||
|
||||
typedef struct FMOD_CREATESOUNDEXINFO
|
||||
{
|
||||
int cbsize;
|
||||
unsigned int length;
|
||||
unsigned int fileoffset;
|
||||
int numchannels;
|
||||
int defaultfrequency;
|
||||
FMOD_SOUND_FORMAT format;
|
||||
unsigned int decodebuffersize;
|
||||
int initialsubsound;
|
||||
int numsubsounds;
|
||||
int *inclusionlist;
|
||||
int inclusionlistnum;
|
||||
FMOD_SOUND_PCMREAD_CALLBACK pcmreadcallback;
|
||||
FMOD_SOUND_PCMSETPOS_CALLBACK pcmsetposcallback;
|
||||
FMOD_SOUND_NONBLOCK_CALLBACK nonblockcallback;
|
||||
const char *dlsname;
|
||||
const char *encryptionkey;
|
||||
int maxpolyphony;
|
||||
void *userdata;
|
||||
FMOD_SOUND_TYPE suggestedsoundtype;
|
||||
FMOD_FILE_OPEN_CALLBACK fileuseropen;
|
||||
FMOD_FILE_CLOSE_CALLBACK fileuserclose;
|
||||
FMOD_FILE_READ_CALLBACK fileuserread;
|
||||
FMOD_FILE_SEEK_CALLBACK fileuserseek;
|
||||
FMOD_FILE_ASYNCREAD_CALLBACK fileuserasyncread;
|
||||
FMOD_FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel;
|
||||
void *fileuserdata;
|
||||
int filebuffersize;
|
||||
FMOD_CHANNELORDER channelorder;
|
||||
FMOD_SOUNDGROUP *initialsoundgroup;
|
||||
unsigned int initialseekposition;
|
||||
FMOD_TIMEUNIT initialseekpostype;
|
||||
int ignoresetfilesystem;
|
||||
unsigned int audioqueuepolicy;
|
||||
unsigned int minmidigranularity;
|
||||
int nonblockthreadid;
|
||||
FMOD_GUID *fsbguid;
|
||||
} FMOD_CREATESOUNDEXINFO;
|
||||
|
||||
typedef struct FMOD_REVERB_PROPERTIES
|
||||
{
|
||||
float DecayTime;
|
||||
float EarlyDelay;
|
||||
float LateDelay;
|
||||
float HFReference;
|
||||
float HFDecayRatio;
|
||||
float Diffusion;
|
||||
float Density;
|
||||
float LowShelfFrequency;
|
||||
float LowShelfGain;
|
||||
float HighCut;
|
||||
float EarlyLateMix;
|
||||
float WetLevel;
|
||||
} FMOD_REVERB_PROPERTIES;
|
||||
|
||||
typedef struct FMOD_ERRORCALLBACK_INFO
|
||||
{
|
||||
FMOD_RESULT result;
|
||||
FMOD_ERRORCALLBACK_INSTANCETYPE instancetype;
|
||||
void *instance;
|
||||
const char *functionname;
|
||||
const char *functionparams;
|
||||
} FMOD_ERRORCALLBACK_INFO;
|
||||
|
||||
typedef struct FMOD_CPU_USAGE
|
||||
{
|
||||
float dsp;
|
||||
float stream;
|
||||
float geometry;
|
||||
float update;
|
||||
float convolution1;
|
||||
float convolution2;
|
||||
} FMOD_CPU_USAGE;
|
||||
|
||||
typedef struct FMOD_DSP_DATA_PARAMETER_INFO
|
||||
{
|
||||
void *data;
|
||||
unsigned int length;
|
||||
int index;
|
||||
} FMOD_DSP_DATA_PARAMETER_INFO;
|
||||
|
||||
/*
|
||||
FMOD optional headers for plugin development
|
||||
*/
|
||||
#include "fmod_codec.h"
|
||||
#include "fmod_dsp.h"
|
||||
#include "fmod_output.h"
|
||||
|
||||
#endif
|
||||
897
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_dsp.cs
vendored
Normal file
897
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_dsp.cs
vendored
Normal file
@ -0,0 +1,897 @@
|
||||
/* ======================================================================================== */
|
||||
/* FMOD Core API - DSP header file. */
|
||||
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2023. */
|
||||
/* */
|
||||
/* Use this header if you are wanting to develop your own DSP plugin to use with FMODs */
|
||||
/* dsp system. With this header you can make your own DSP plugin that FMOD can */
|
||||
/* register and use. See the documentation and examples on how to make a working plugin. */
|
||||
/* */
|
||||
/* For more detail visit: */
|
||||
/* https://fmod.com/docs/2.02/api/plugin-api-dsp.html */
|
||||
/* =========================================================================================*/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FMOD
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_BUFFER_ARRAY
|
||||
{
|
||||
public int numbuffers;
|
||||
public int[] buffernumchannels;
|
||||
public CHANNELMASK[] bufferchannelmask;
|
||||
public IntPtr[] buffers;
|
||||
public SPEAKERMODE speakermode;
|
||||
}
|
||||
|
||||
public enum DSP_PROCESS_OPERATION
|
||||
{
|
||||
PROCESS_PERFORM = 0,
|
||||
PROCESS_QUERY
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct COMPLEX
|
||||
{
|
||||
public float real;
|
||||
public float imag;
|
||||
}
|
||||
|
||||
public enum DSP_PAN_SURROUND_FLAGS
|
||||
{
|
||||
DEFAULT = 0,
|
||||
ROTATION_NOT_BIASED = 1,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
DSP callbacks
|
||||
*/
|
||||
public delegate RESULT DSP_CREATE_CALLBACK (ref DSP_STATE dsp_state);
|
||||
public delegate RESULT DSP_RELEASE_CALLBACK (ref DSP_STATE dsp_state);
|
||||
public delegate RESULT DSP_RESET_CALLBACK (ref DSP_STATE dsp_state);
|
||||
public delegate RESULT DSP_SETPOSITION_CALLBACK (ref DSP_STATE dsp_state, uint pos);
|
||||
public delegate RESULT DSP_READ_CALLBACK (ref DSP_STATE dsp_state, IntPtr inbuffer, IntPtr outbuffer, uint length, int inchannels, ref int outchannels);
|
||||
public delegate RESULT DSP_SHOULDIPROCESS_CALLBACK (ref DSP_STATE dsp_state, bool inputsidle, uint length, CHANNELMASK inmask, int inchannels, SPEAKERMODE speakermode);
|
||||
public delegate RESULT DSP_PROCESS_CALLBACK (ref DSP_STATE dsp_state, uint length, ref DSP_BUFFER_ARRAY inbufferarray, ref DSP_BUFFER_ARRAY outbufferarray, bool inputsidle, DSP_PROCESS_OPERATION op);
|
||||
public delegate RESULT DSP_SETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, float value);
|
||||
public delegate RESULT DSP_SETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, int value);
|
||||
public delegate RESULT DSP_SETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, bool value);
|
||||
public delegate RESULT DSP_SETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, IntPtr data, uint length);
|
||||
public delegate RESULT DSP_GETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, ref float value, IntPtr valuestr);
|
||||
public delegate RESULT DSP_GETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, ref int value, IntPtr valuestr);
|
||||
public delegate RESULT DSP_GETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, ref bool value, IntPtr valuestr);
|
||||
public delegate RESULT DSP_GETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, ref IntPtr data, ref uint length, IntPtr valuestr);
|
||||
public delegate RESULT DSP_SYSTEM_REGISTER_CALLBACK (ref DSP_STATE dsp_state);
|
||||
public delegate RESULT DSP_SYSTEM_DEREGISTER_CALLBACK (ref DSP_STATE dsp_state);
|
||||
public delegate RESULT DSP_SYSTEM_MIX_CALLBACK (ref DSP_STATE dsp_state, int stage);
|
||||
|
||||
|
||||
/*
|
||||
DSP functions
|
||||
*/
|
||||
public delegate IntPtr DSP_ALLOC_FUNC (uint size, MEMORY_TYPE type, IntPtr sourcestr);
|
||||
public delegate IntPtr DSP_REALLOC_FUNC (IntPtr ptr, uint size, MEMORY_TYPE type, IntPtr sourcestr);
|
||||
public delegate void DSP_FREE_FUNC (IntPtr ptr, MEMORY_TYPE type, IntPtr sourcestr);
|
||||
public delegate void DSP_LOG_FUNC (DEBUG_FLAGS level, IntPtr file, int line, IntPtr function, IntPtr str);
|
||||
public delegate RESULT DSP_GETSAMPLERATE_FUNC (ref DSP_STATE dsp_state, ref int rate);
|
||||
public delegate RESULT DSP_GETBLOCKSIZE_FUNC (ref DSP_STATE dsp_state, ref uint blocksize);
|
||||
public delegate RESULT DSP_GETSPEAKERMODE_FUNC (ref DSP_STATE dsp_state, ref int speakermode_mixer, ref int speakermode_output);
|
||||
public delegate RESULT DSP_GETCLOCK_FUNC (ref DSP_STATE dsp_state, out ulong clock, out uint offset, out uint length);
|
||||
public delegate RESULT DSP_GETLISTENERATTRIBUTES_FUNC (ref DSP_STATE dsp_state, ref int numlisteners, IntPtr attributes);
|
||||
public delegate RESULT DSP_GETUSERDATA_FUNC (ref DSP_STATE dsp_state, out IntPtr userdata);
|
||||
public delegate RESULT DSP_DFT_FFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr signal, IntPtr dft, IntPtr window, int signalhop);
|
||||
public delegate RESULT DSP_DFT_IFFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr dft, IntPtr signal, IntPtr window, int signalhop);
|
||||
public delegate RESULT DSP_PAN_SUMMONOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float lowFrequencyGain, float overallGain, IntPtr matrix);
|
||||
public delegate RESULT DSP_PAN_SUMSTEREOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float pan, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix);
|
||||
public delegate RESULT DSP_PAN_SUMSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix, DSP_PAN_SURROUND_FLAGS flags);
|
||||
public delegate RESULT DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix);
|
||||
public delegate RESULT DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix);
|
||||
public delegate RESULT DSP_PAN_GETROLLOFFGAIN_FUNC (ref DSP_STATE dsp_state, DSP_PAN_3D_ROLLOFF_TYPE rolloff, float distance, float mindistance, float maxdistance, out float gain);
|
||||
|
||||
|
||||
public enum DSP_TYPE : int
|
||||
{
|
||||
UNKNOWN,
|
||||
MIXER,
|
||||
OSCILLATOR,
|
||||
LOWPASS,
|
||||
ITLOWPASS,
|
||||
HIGHPASS,
|
||||
ECHO,
|
||||
FADER,
|
||||
FLANGE,
|
||||
DISTORTION,
|
||||
NORMALIZE,
|
||||
LIMITER,
|
||||
PARAMEQ,
|
||||
PITCHSHIFT,
|
||||
CHORUS,
|
||||
VSTPLUGIN,
|
||||
WINAMPPLUGIN,
|
||||
ITECHO,
|
||||
COMPRESSOR,
|
||||
SFXREVERB,
|
||||
LOWPASS_SIMPLE,
|
||||
DELAY,
|
||||
TREMOLO,
|
||||
LADSPAPLUGIN,
|
||||
SEND,
|
||||
RETURN,
|
||||
HIGHPASS_SIMPLE,
|
||||
PAN,
|
||||
THREE_EQ,
|
||||
FFT,
|
||||
LOUDNESS_METER,
|
||||
ENVELOPEFOLLOWER,
|
||||
CONVOLUTIONREVERB,
|
||||
CHANNELMIX,
|
||||
TRANSCEIVER,
|
||||
OBJECTPAN,
|
||||
MULTIBAND_EQ,
|
||||
MAX
|
||||
}
|
||||
|
||||
public enum DSP_PARAMETER_TYPE
|
||||
{
|
||||
FLOAT = 0,
|
||||
INT,
|
||||
BOOL,
|
||||
DATA,
|
||||
MAX
|
||||
}
|
||||
|
||||
public enum DSP_PARAMETER_FLOAT_MAPPING_TYPE
|
||||
{
|
||||
DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR = 0,
|
||||
DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO,
|
||||
DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR,
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR
|
||||
{
|
||||
public int numpoints;
|
||||
public IntPtr pointparamvalues;
|
||||
public IntPtr pointpositions;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_FLOAT_MAPPING
|
||||
{
|
||||
public DSP_PARAMETER_FLOAT_MAPPING_TYPE type;
|
||||
public DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR piecewiselinearmapping;
|
||||
}
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_DESC_FLOAT
|
||||
{
|
||||
public float min;
|
||||
public float max;
|
||||
public float defaultval;
|
||||
public DSP_PARAMETER_FLOAT_MAPPING mapping;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_DESC_INT
|
||||
{
|
||||
public int min;
|
||||
public int max;
|
||||
public int defaultval;
|
||||
public bool goestoinf;
|
||||
public IntPtr valuenames;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_DESC_BOOL
|
||||
{
|
||||
public bool defaultval;
|
||||
public IntPtr valuenames;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_DESC_DATA
|
||||
{
|
||||
public int datatype;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct DSP_PARAMETER_DESC_UNION
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
public DSP_PARAMETER_DESC_FLOAT floatdesc;
|
||||
[FieldOffset(0)]
|
||||
public DSP_PARAMETER_DESC_INT intdesc;
|
||||
[FieldOffset(0)]
|
||||
public DSP_PARAMETER_DESC_BOOL booldesc;
|
||||
[FieldOffset(0)]
|
||||
public DSP_PARAMETER_DESC_DATA datadesc;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_DESC
|
||||
{
|
||||
public DSP_PARAMETER_TYPE type;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[] name;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[] label;
|
||||
public string description;
|
||||
|
||||
public DSP_PARAMETER_DESC_UNION desc;
|
||||
}
|
||||
|
||||
public enum DSP_PARAMETER_DATA_TYPE
|
||||
{
|
||||
DSP_PARAMETER_DATA_TYPE_USER = 0,
|
||||
DSP_PARAMETER_DATA_TYPE_OVERALLGAIN = -1,
|
||||
DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2,
|
||||
DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3,
|
||||
DSP_PARAMETER_DATA_TYPE_FFT = -4,
|
||||
DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5,
|
||||
DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_OVERALLGAIN
|
||||
{
|
||||
public float linear_gain;
|
||||
public float linear_gain_additive;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_3DATTRIBUTES
|
||||
{
|
||||
public ATTRIBUTES_3D relative;
|
||||
public ATTRIBUTES_3D absolute;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_3DATTRIBUTES_MULTI
|
||||
{
|
||||
public int numlisteners;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public ATTRIBUTES_3D[] relative;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public float[] weight;
|
||||
public ATTRIBUTES_3D absolute;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_SIDECHAIN
|
||||
{
|
||||
public int sidechainenable;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_FFT
|
||||
{
|
||||
public int length;
|
||||
public int numchannels;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray,SizeConst=32)]
|
||||
private IntPtr[] spectrum_internal;
|
||||
|
||||
public float[][] spectrum
|
||||
{
|
||||
get
|
||||
{
|
||||
var buffer = new float[numchannels][];
|
||||
|
||||
for (int i = 0; i < numchannels; ++i)
|
||||
{
|
||||
buffer[i] = new float[length];
|
||||
Marshal.Copy(spectrum_internal[i], buffer[i], 0, length);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
public void getSpectrum(ref float[][] buffer)
|
||||
{
|
||||
int bufferLength = Math.Min(buffer.Length, numchannels);
|
||||
for (int i = 0; i < bufferLength; ++i)
|
||||
{
|
||||
getSpectrum(i, ref buffer[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void getSpectrum(int channel, ref float[] buffer)
|
||||
{
|
||||
int bufferLength = Math.Min(buffer.Length, length);
|
||||
Marshal.Copy(spectrum_internal[channel], buffer, 0, bufferLength);
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_LOUDNESS_METER_INFO_TYPE
|
||||
{
|
||||
public float momentaryloudness;
|
||||
public float shorttermloudness;
|
||||
public float integratedloudness;
|
||||
public float loudness10thpercentile;
|
||||
public float loudness95thpercentile;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 66)]
|
||||
public float[] loudnesshistogram;
|
||||
public float maxtruepeak;
|
||||
public float maxmomentaryloudness;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_LOUDNESS_METER_WEIGHTING_TYPE
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public float[] channelweight;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_PARAMETER_ATTENUATION_RANGE
|
||||
{
|
||||
public float min;
|
||||
public float max;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_DESCRIPTION
|
||||
{
|
||||
public uint pluginsdkversion;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public byte[] name;
|
||||
public uint version;
|
||||
public int numinputbuffers;
|
||||
public int numoutputbuffers;
|
||||
public DSP_CREATE_CALLBACK create;
|
||||
public DSP_RELEASE_CALLBACK release;
|
||||
public DSP_RESET_CALLBACK reset;
|
||||
public DSP_READ_CALLBACK read;
|
||||
public DSP_PROCESS_CALLBACK process;
|
||||
public DSP_SETPOSITION_CALLBACK setposition;
|
||||
|
||||
public int numparameters;
|
||||
public IntPtr paramdesc;
|
||||
public DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat;
|
||||
public DSP_SETPARAM_INT_CALLBACK setparameterint;
|
||||
public DSP_SETPARAM_BOOL_CALLBACK setparameterbool;
|
||||
public DSP_SETPARAM_DATA_CALLBACK setparameterdata;
|
||||
public DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat;
|
||||
public DSP_GETPARAM_INT_CALLBACK getparameterint;
|
||||
public DSP_GETPARAM_BOOL_CALLBACK getparameterbool;
|
||||
public DSP_GETPARAM_DATA_CALLBACK getparameterdata;
|
||||
public DSP_SHOULDIPROCESS_CALLBACK shouldiprocess;
|
||||
public IntPtr userdata;
|
||||
|
||||
public DSP_SYSTEM_REGISTER_CALLBACK sys_register;
|
||||
public DSP_SYSTEM_DEREGISTER_CALLBACK sys_deregister;
|
||||
public DSP_SYSTEM_MIX_CALLBACK sys_mix;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_STATE_DFT_FUNCTIONS
|
||||
{
|
||||
public DSP_DFT_FFTREAL_FUNC fftreal;
|
||||
public DSP_DFT_IFFTREAL_FUNC inversefftreal;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_STATE_PAN_FUNCTIONS
|
||||
{
|
||||
public DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix;
|
||||
public DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix;
|
||||
public DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix;
|
||||
public DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix;
|
||||
public DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC sumstereotosurroundmatrix;
|
||||
public DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_STATE_FUNCTIONS
|
||||
{
|
||||
public DSP_ALLOC_FUNC alloc;
|
||||
public DSP_REALLOC_FUNC realloc;
|
||||
public DSP_FREE_FUNC free;
|
||||
public DSP_GETSAMPLERATE_FUNC getsamplerate;
|
||||
public DSP_GETBLOCKSIZE_FUNC getblocksize;
|
||||
public IntPtr dft;
|
||||
public IntPtr pan;
|
||||
public DSP_GETSPEAKERMODE_FUNC getspeakermode;
|
||||
public DSP_GETCLOCK_FUNC getclock;
|
||||
public DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes;
|
||||
public DSP_LOG_FUNC log;
|
||||
public DSP_GETUSERDATA_FUNC getuserdata;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_STATE
|
||||
{
|
||||
public IntPtr instance;
|
||||
public IntPtr plugindata;
|
||||
public uint channelmask;
|
||||
public int source_speakermode;
|
||||
public IntPtr sidechaindata;
|
||||
public int sidechainchannels;
|
||||
public IntPtr functions;
|
||||
public int systemobject;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DSP_METERING_INFO
|
||||
{
|
||||
public int numsamples;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst=32)]
|
||||
public float[] peaklevel;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst=32)]
|
||||
public float[] rmslevel;
|
||||
public short numchannels;
|
||||
}
|
||||
|
||||
/*
|
||||
==============================================================================================================
|
||||
|
||||
FMOD built in effect parameters.
|
||||
Use DSP::setParameter with these enums for the 'index' parameter.
|
||||
|
||||
==============================================================================================================
|
||||
*/
|
||||
|
||||
public enum DSP_OSCILLATOR : int
|
||||
{
|
||||
TYPE,
|
||||
RATE
|
||||
}
|
||||
|
||||
public enum DSP_LOWPASS : int
|
||||
{
|
||||
CUTOFF,
|
||||
RESONANCE
|
||||
}
|
||||
|
||||
public enum DSP_ITLOWPASS : int
|
||||
{
|
||||
CUTOFF,
|
||||
RESONANCE
|
||||
}
|
||||
|
||||
public enum DSP_HIGHPASS : int
|
||||
{
|
||||
CUTOFF,
|
||||
RESONANCE
|
||||
}
|
||||
|
||||
public enum DSP_ECHO : int
|
||||
{
|
||||
DELAY,
|
||||
FEEDBACK,
|
||||
DRYLEVEL,
|
||||
WETLEVEL
|
||||
}
|
||||
|
||||
public enum DSP_FADER : int
|
||||
{
|
||||
GAIN,
|
||||
OVERALL_GAIN,
|
||||
}
|
||||
|
||||
public enum DSP_DELAY : int
|
||||
{
|
||||
CH0,
|
||||
CH1,
|
||||
CH2,
|
||||
CH3,
|
||||
CH4,
|
||||
CH5,
|
||||
CH6,
|
||||
CH7,
|
||||
CH8,
|
||||
CH9,
|
||||
CH10,
|
||||
CH11,
|
||||
CH12,
|
||||
CH13,
|
||||
CH14,
|
||||
CH15,
|
||||
MAXDELAY,
|
||||
}
|
||||
|
||||
public enum DSP_FLANGE : int
|
||||
{
|
||||
MIX,
|
||||
DEPTH,
|
||||
RATE
|
||||
}
|
||||
|
||||
public enum DSP_TREMOLO : int
|
||||
{
|
||||
FREQUENCY,
|
||||
DEPTH,
|
||||
SHAPE,
|
||||
SKEW,
|
||||
DUTY,
|
||||
SQUARE,
|
||||
PHASE,
|
||||
SPREAD
|
||||
}
|
||||
|
||||
public enum DSP_DISTORTION : int
|
||||
{
|
||||
LEVEL
|
||||
}
|
||||
|
||||
public enum DSP_NORMALIZE : int
|
||||
{
|
||||
FADETIME,
|
||||
THRESHOLD,
|
||||
MAXAMP
|
||||
}
|
||||
|
||||
public enum DSP_LIMITER : int
|
||||
{
|
||||
RELEASETIME,
|
||||
CEILING,
|
||||
MAXIMIZERGAIN,
|
||||
MODE,
|
||||
}
|
||||
|
||||
public enum DSP_PARAMEQ : int
|
||||
{
|
||||
CENTER,
|
||||
BANDWIDTH,
|
||||
GAIN
|
||||
}
|
||||
|
||||
public enum DSP_MULTIBAND_EQ : int
|
||||
{
|
||||
A_FILTER,
|
||||
A_FREQUENCY,
|
||||
A_Q,
|
||||
A_GAIN,
|
||||
B_FILTER,
|
||||
B_FREQUENCY,
|
||||
B_Q,
|
||||
B_GAIN,
|
||||
C_FILTER,
|
||||
C_FREQUENCY,
|
||||
C_Q,
|
||||
C_GAIN,
|
||||
D_FILTER,
|
||||
D_FREQUENCY,
|
||||
D_Q,
|
||||
D_GAIN,
|
||||
E_FILTER,
|
||||
E_FREQUENCY,
|
||||
E_Q,
|
||||
E_GAIN,
|
||||
}
|
||||
|
||||
public enum DSP_MULTIBAND_EQ_FILTER_TYPE : int
|
||||
{
|
||||
DISABLED,
|
||||
LOWPASS_12DB,
|
||||
LOWPASS_24DB,
|
||||
LOWPASS_48DB,
|
||||
HIGHPASS_12DB,
|
||||
HIGHPASS_24DB,
|
||||
HIGHPASS_48DB,
|
||||
LOWSHELF,
|
||||
HIGHSHELF,
|
||||
PEAKING,
|
||||
BANDPASS,
|
||||
NOTCH,
|
||||
ALLPASS,
|
||||
}
|
||||
|
||||
public enum DSP_PITCHSHIFT : int
|
||||
{
|
||||
PITCH,
|
||||
FFTSIZE,
|
||||
OVERLAP,
|
||||
MAXCHANNELS
|
||||
}
|
||||
|
||||
public enum DSP_CHORUS : int
|
||||
{
|
||||
MIX,
|
||||
RATE,
|
||||
DEPTH,
|
||||
}
|
||||
|
||||
public enum DSP_ITECHO : int
|
||||
{
|
||||
WETDRYMIX,
|
||||
FEEDBACK,
|
||||
LEFTDELAY,
|
||||
RIGHTDELAY,
|
||||
PANDELAY
|
||||
}
|
||||
|
||||
public enum DSP_COMPRESSOR : int
|
||||
{
|
||||
THRESHOLD,
|
||||
RATIO,
|
||||
ATTACK,
|
||||
RELEASE,
|
||||
GAINMAKEUP,
|
||||
USESIDECHAIN,
|
||||
LINKED
|
||||
}
|
||||
|
||||
public enum DSP_SFXREVERB : int
|
||||
{
|
||||
DECAYTIME,
|
||||
EARLYDELAY,
|
||||
LATEDELAY,
|
||||
HFREFERENCE,
|
||||
HFDECAYRATIO,
|
||||
DIFFUSION,
|
||||
DENSITY,
|
||||
LOWSHELFFREQUENCY,
|
||||
LOWSHELFGAIN,
|
||||
HIGHCUT,
|
||||
EARLYLATEMIX,
|
||||
WETLEVEL,
|
||||
DRYLEVEL
|
||||
}
|
||||
|
||||
public enum DSP_LOWPASS_SIMPLE : int
|
||||
{
|
||||
CUTOFF
|
||||
}
|
||||
|
||||
public enum DSP_SEND : int
|
||||
{
|
||||
RETURNID,
|
||||
LEVEL,
|
||||
}
|
||||
|
||||
public enum DSP_RETURN : int
|
||||
{
|
||||
ID,
|
||||
INPUT_SPEAKER_MODE
|
||||
}
|
||||
|
||||
public enum DSP_HIGHPASS_SIMPLE : int
|
||||
{
|
||||
CUTOFF
|
||||
}
|
||||
|
||||
public enum DSP_PAN_2D_STEREO_MODE_TYPE : int
|
||||
{
|
||||
DISTRIBUTED,
|
||||
DISCRETE
|
||||
}
|
||||
|
||||
public enum DSP_PAN_MODE_TYPE : int
|
||||
{
|
||||
MONO,
|
||||
STEREO,
|
||||
SURROUND
|
||||
}
|
||||
|
||||
public enum DSP_PAN_3D_ROLLOFF_TYPE : int
|
||||
{
|
||||
LINEARSQUARED,
|
||||
LINEAR,
|
||||
INVERSE,
|
||||
INVERSETAPERED,
|
||||
CUSTOM
|
||||
}
|
||||
|
||||
public enum DSP_PAN_3D_EXTENT_MODE_TYPE : int
|
||||
{
|
||||
AUTO,
|
||||
USER,
|
||||
OFF
|
||||
}
|
||||
|
||||
public enum DSP_PAN : int
|
||||
{
|
||||
MODE,
|
||||
_2D_STEREO_POSITION,
|
||||
_2D_DIRECTION,
|
||||
_2D_EXTENT,
|
||||
_2D_ROTATION,
|
||||
_2D_LFE_LEVEL,
|
||||
_2D_STEREO_MODE,
|
||||
_2D_STEREO_SEPARATION,
|
||||
_2D_STEREO_AXIS,
|
||||
ENABLED_SPEAKERS,
|
||||
_3D_POSITION,
|
||||
_3D_ROLLOFF,
|
||||
_3D_MIN_DISTANCE,
|
||||
_3D_MAX_DISTANCE,
|
||||
_3D_EXTENT_MODE,
|
||||
_3D_SOUND_SIZE,
|
||||
_3D_MIN_EXTENT,
|
||||
_3D_PAN_BLEND,
|
||||
LFE_UPMIX_ENABLED,
|
||||
OVERALL_GAIN,
|
||||
SURROUND_SPEAKER_MODE,
|
||||
_2D_HEIGHT_BLEND,
|
||||
ATTENUATION_RANGE,
|
||||
OVERRIDE_RANGE
|
||||
}
|
||||
|
||||
public enum DSP_THREE_EQ_CROSSOVERSLOPE_TYPE : int
|
||||
{
|
||||
_12DB,
|
||||
_24DB,
|
||||
_48DB
|
||||
}
|
||||
|
||||
public enum DSP_THREE_EQ : int
|
||||
{
|
||||
LOWGAIN,
|
||||
MIDGAIN,
|
||||
HIGHGAIN,
|
||||
LOWCROSSOVER,
|
||||
HIGHCROSSOVER,
|
||||
CROSSOVERSLOPE
|
||||
}
|
||||
|
||||
public enum DSP_FFT_WINDOW : int
|
||||
{
|
||||
RECT,
|
||||
TRIANGLE,
|
||||
HAMMING,
|
||||
HANNING,
|
||||
BLACKMAN,
|
||||
BLACKMANHARRIS
|
||||
}
|
||||
|
||||
public enum DSP_FFT : int
|
||||
{
|
||||
WINDOWSIZE,
|
||||
WINDOWTYPE,
|
||||
SPECTRUMDATA,
|
||||
DOMINANT_FREQ
|
||||
}
|
||||
|
||||
|
||||
public enum DSP_LOUDNESS_METER : int
|
||||
{
|
||||
STATE,
|
||||
WEIGHTING,
|
||||
INFO
|
||||
}
|
||||
|
||||
|
||||
public enum DSP_LOUDNESS_METER_STATE_TYPE : int
|
||||
{
|
||||
RESET_INTEGRATED = -3,
|
||||
RESET_MAXPEAK = -2,
|
||||
RESET_ALL = -1,
|
||||
PAUSED = 0,
|
||||
ANALYZING = 1
|
||||
}
|
||||
|
||||
public enum DSP_ENVELOPEFOLLOWER : int
|
||||
{
|
||||
ATTACK,
|
||||
RELEASE,
|
||||
ENVELOPE,
|
||||
USESIDECHAIN
|
||||
}
|
||||
|
||||
public enum DSP_CONVOLUTION_REVERB : int
|
||||
{
|
||||
IR,
|
||||
WET,
|
||||
DRY,
|
||||
LINKED
|
||||
}
|
||||
|
||||
public enum DSP_CHANNELMIX_OUTPUT : int
|
||||
{
|
||||
DEFAULT,
|
||||
ALLMONO,
|
||||
ALLSTEREO,
|
||||
ALLQUAD,
|
||||
ALL5POINT1,
|
||||
ALL7POINT1,
|
||||
ALLLFE,
|
||||
ALL7POINT1POINT4
|
||||
}
|
||||
|
||||
public enum DSP_CHANNELMIX : int
|
||||
{
|
||||
OUTPUTGROUPING,
|
||||
GAIN_CH0,
|
||||
GAIN_CH1,
|
||||
GAIN_CH2,
|
||||
GAIN_CH3,
|
||||
GAIN_CH4,
|
||||
GAIN_CH5,
|
||||
GAIN_CH6,
|
||||
GAIN_CH7,
|
||||
GAIN_CH8,
|
||||
GAIN_CH9,
|
||||
GAIN_CH10,
|
||||
GAIN_CH11,
|
||||
GAIN_CH12,
|
||||
GAIN_CH13,
|
||||
GAIN_CH14,
|
||||
GAIN_CH15,
|
||||
GAIN_CH16,
|
||||
GAIN_CH17,
|
||||
GAIN_CH18,
|
||||
GAIN_CH19,
|
||||
GAIN_CH20,
|
||||
GAIN_CH21,
|
||||
GAIN_CH22,
|
||||
GAIN_CH23,
|
||||
GAIN_CH24,
|
||||
GAIN_CH25,
|
||||
GAIN_CH26,
|
||||
GAIN_CH27,
|
||||
GAIN_CH28,
|
||||
GAIN_CH29,
|
||||
GAIN_CH30,
|
||||
GAIN_CH31,
|
||||
OUTPUT_CH0,
|
||||
OUTPUT_CH1,
|
||||
OUTPUT_CH2,
|
||||
OUTPUT_CH3,
|
||||
OUTPUT_CH4,
|
||||
OUTPUT_CH5,
|
||||
OUTPUT_CH6,
|
||||
OUTPUT_CH7,
|
||||
OUTPUT_CH8,
|
||||
OUTPUT_CH9,
|
||||
OUTPUT_CH10,
|
||||
OUTPUT_CH11,
|
||||
OUTPUT_CH12,
|
||||
OUTPUT_CH13,
|
||||
OUTPUT_CH14,
|
||||
OUTPUT_CH15,
|
||||
OUTPUT_CH16,
|
||||
OUTPUT_CH17,
|
||||
OUTPUT_CH18,
|
||||
OUTPUT_CH19,
|
||||
OUTPUT_CH20,
|
||||
OUTPUT_CH21,
|
||||
OUTPUT_CH22,
|
||||
OUTPUT_CH23,
|
||||
OUTPUT_CH24,
|
||||
OUTPUT_CH25,
|
||||
OUTPUT_CH26,
|
||||
OUTPUT_CH27,
|
||||
OUTPUT_CH28,
|
||||
OUTPUT_CH29,
|
||||
OUTPUT_CH30,
|
||||
OUTPUT_CH31,
|
||||
}
|
||||
|
||||
public enum DSP_TRANSCEIVER_SPEAKERMODE : int
|
||||
{
|
||||
AUTO = -1,
|
||||
MONO = 0,
|
||||
STEREO,
|
||||
SURROUND,
|
||||
}
|
||||
|
||||
public enum DSP_TRANSCEIVER : int
|
||||
{
|
||||
TRANSMIT,
|
||||
GAIN,
|
||||
CHANNEL,
|
||||
TRANSMITSPEAKERMODE
|
||||
}
|
||||
|
||||
public enum DSP_OBJECTPAN : int
|
||||
{
|
||||
_3D_POSITION,
|
||||
_3D_ROLLOFF,
|
||||
_3D_MIN_DISTANCE,
|
||||
_3D_MAX_DISTANCE,
|
||||
_3D_EXTENT_MODE,
|
||||
_3D_SOUND_SIZE,
|
||||
_3D_MIN_EXTENT,
|
||||
OVERALL_GAIN,
|
||||
OUTPUTGAIN,
|
||||
ATTENUATION_RANGE,
|
||||
OVERRIDE_RANGE
|
||||
}
|
||||
}
|
||||
421
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_dsp.h
vendored
Normal file
421
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_dsp.h
vendored
Normal file
@ -0,0 +1,421 @@
|
||||
/* ======================================================================================== */
|
||||
/* FMOD Core API - DSP header file. */
|
||||
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2023. */
|
||||
/* */
|
||||
/* Use this header if you are wanting to develop your own DSP plugin to use with FMODs */
|
||||
/* dsp system. With this header you can make your own DSP plugin that FMOD can */
|
||||
/* register and use. See the documentation and examples on how to make a working plugin. */
|
||||
/* */
|
||||
/* For more detail visit: */
|
||||
/* https://fmod.com/docs/2.02/api/plugin-api-dsp.html */
|
||||
/* =========================================================================================*/
|
||||
#ifndef _FMOD_DSP_H
|
||||
#define _FMOD_DSP_H
|
||||
|
||||
#include "fmod_dsp_effects.h"
|
||||
|
||||
typedef struct FMOD_DSP_STATE FMOD_DSP_STATE;
|
||||
typedef struct FMOD_DSP_BUFFER_ARRAY FMOD_DSP_BUFFER_ARRAY;
|
||||
typedef struct FMOD_COMPLEX FMOD_COMPLEX;
|
||||
|
||||
/*
|
||||
DSP Constants
|
||||
*/
|
||||
#define FMOD_PLUGIN_SDK_VERSION 110
|
||||
#define FMOD_DSP_GETPARAM_VALUESTR_LENGTH 32
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PROCESS_PERFORM,
|
||||
FMOD_DSP_PROCESS_QUERY
|
||||
} FMOD_DSP_PROCESS_OPERATION;
|
||||
|
||||
typedef enum FMOD_DSP_PAN_SURROUND_FLAGS
|
||||
{
|
||||
FMOD_DSP_PAN_SURROUND_DEFAULT = 0,
|
||||
FMOD_DSP_PAN_SURROUND_ROTATION_NOT_BIASED = 1,
|
||||
|
||||
FMOD_DSP_PAN_SURROUND_FLAGS_FORCEINT = 65536
|
||||
} FMOD_DSP_PAN_SURROUND_FLAGS;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PARAMETER_TYPE_FLOAT,
|
||||
FMOD_DSP_PARAMETER_TYPE_INT,
|
||||
FMOD_DSP_PARAMETER_TYPE_BOOL,
|
||||
FMOD_DSP_PARAMETER_TYPE_DATA,
|
||||
|
||||
FMOD_DSP_PARAMETER_TYPE_MAX,
|
||||
FMOD_DSP_PARAMETER_TYPE_FORCEINT = 65536
|
||||
} FMOD_DSP_PARAMETER_TYPE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR,
|
||||
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO,
|
||||
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR,
|
||||
|
||||
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_FORCEINT = 65536
|
||||
} FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PARAMETER_DATA_TYPE_USER = 0,
|
||||
FMOD_DSP_PARAMETER_DATA_TYPE_OVERALLGAIN = -1,
|
||||
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2,
|
||||
FMOD_DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3,
|
||||
FMOD_DSP_PARAMETER_DATA_TYPE_FFT = -4,
|
||||
FMOD_DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5,
|
||||
FMOD_DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6,
|
||||
} FMOD_DSP_PARAMETER_DATA_TYPE;
|
||||
|
||||
/*
|
||||
DSP Callbacks
|
||||
*/
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_CREATE_CALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_RELEASE_CALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_RESET_CALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_READ_CALLBACK) (FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_PROCESS_CALLBACK) (FMOD_DSP_STATE *dsp_state, unsigned int length, const FMOD_DSP_BUFFER_ARRAY *inbufferarray, FMOD_DSP_BUFFER_ARRAY *outbufferarray, FMOD_BOOL inputsidle, FMOD_DSP_PROCESS_OPERATION op);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SETPOSITION_CALLBACK) (FMOD_DSP_STATE *dsp_state, unsigned int pos);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SHOULDIPROCESS_CALLBACK) (FMOD_DSP_STATE *dsp_state, FMOD_BOOL inputsidle, unsigned int length, FMOD_CHANNELMASK inmask, int inchannels, FMOD_SPEAKERMODE speakermode);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SETPARAM_FLOAT_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, float value);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SETPARAM_INT_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, int value);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SETPARAM_BOOL_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, FMOD_BOOL value);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SETPARAM_DATA_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, void *data, unsigned int length);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETPARAM_FLOAT_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, float *value, char *valuestr);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETPARAM_INT_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, int *value, char *valuestr);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETPARAM_BOOL_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, FMOD_BOOL *value, char *valuestr);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETPARAM_DATA_CALLBACK) (FMOD_DSP_STATE *dsp_state, int index, void **data, unsigned int *length, char *valuestr);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SYSTEM_REGISTER_CALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK) (FMOD_DSP_STATE *dsp_state);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_SYSTEM_MIX_CALLBACK) (FMOD_DSP_STATE *dsp_state, int stage);
|
||||
|
||||
/*
|
||||
DSP Functions
|
||||
*/
|
||||
typedef void * (F_CALL *FMOD_DSP_ALLOC_FUNC) (unsigned int size, FMOD_MEMORY_TYPE type, const char *sourcestr);
|
||||
typedef void * (F_CALL *FMOD_DSP_REALLOC_FUNC) (void *ptr, unsigned int size, FMOD_MEMORY_TYPE type, const char *sourcestr);
|
||||
typedef void (F_CALL *FMOD_DSP_FREE_FUNC) (void *ptr, FMOD_MEMORY_TYPE type, const char *sourcestr);
|
||||
typedef void (F_CALL *FMOD_DSP_LOG_FUNC) (FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *str, ...);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETSAMPLERATE_FUNC) (FMOD_DSP_STATE *dsp_state, int *rate);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETBLOCKSIZE_FUNC) (FMOD_DSP_STATE *dsp_state, unsigned int *blocksize);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETSPEAKERMODE_FUNC) (FMOD_DSP_STATE *dsp_state, FMOD_SPEAKERMODE *speakermode_mixer, FMOD_SPEAKERMODE *speakermode_output);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETCLOCK_FUNC) (FMOD_DSP_STATE *dsp_state, unsigned long long *clock, unsigned int *offset, unsigned int *length);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETLISTENERATTRIBUTES_FUNC) (FMOD_DSP_STATE *dsp_state, int *numlisteners, FMOD_3D_ATTRIBUTES *attributes);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_GETUSERDATA_FUNC) (FMOD_DSP_STATE *dsp_state, void **userdata);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_DFT_FFTREAL_FUNC) (FMOD_DSP_STATE *dsp_state, int size, const float *signal, FMOD_COMPLEX* dft, const float *window, int signalhop);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_DFT_IFFTREAL_FUNC) (FMOD_DSP_STATE *dsp_state, int size, const FMOD_COMPLEX *dft, float* signal, const float *window, int signalhop);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_PAN_SUMMONOMATRIX_FUNC) (FMOD_DSP_STATE *dsp_state, FMOD_SPEAKERMODE sourceSpeakerMode, float lowFrequencyGain, float overallGain, float *matrix);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_PAN_SUMSTEREOMATRIX_FUNC) (FMOD_DSP_STATE *dsp_state, FMOD_SPEAKERMODE sourceSpeakerMode, float pan, float lowFrequencyGain, float overallGain, int matrixHop, float *matrix);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC) (FMOD_DSP_STATE *dsp_state, FMOD_SPEAKERMODE sourceSpeakerMode, FMOD_SPEAKERMODE targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, float *matrix, FMOD_DSP_PAN_SURROUND_FLAGS flags);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC) (FMOD_DSP_STATE *dsp_state, FMOD_SPEAKERMODE targetSpeakerMode, float direction, float extent, float lowFrequencyGain, float overallGain, int matrixHop, float *matrix);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC) (FMOD_DSP_STATE *dsp_state, FMOD_SPEAKERMODE targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, float *matrix);
|
||||
typedef FMOD_RESULT (F_CALL *FMOD_DSP_PAN_GETROLLOFFGAIN_FUNC) (FMOD_DSP_STATE *dsp_state, FMOD_DSP_PAN_3D_ROLLOFF_TYPE rolloff, float distance, float mindistance, float maxdistance, float *gain);
|
||||
|
||||
/*
|
||||
DSP Structures
|
||||
*/
|
||||
struct FMOD_DSP_BUFFER_ARRAY
|
||||
{
|
||||
int numbuffers;
|
||||
int *buffernumchannels;
|
||||
FMOD_CHANNELMASK *bufferchannelmask;
|
||||
float **buffers;
|
||||
FMOD_SPEAKERMODE speakermode;
|
||||
};
|
||||
|
||||
struct FMOD_COMPLEX
|
||||
{
|
||||
float real;
|
||||
float imag;
|
||||
};
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR
|
||||
{
|
||||
int numpoints;
|
||||
float *pointparamvalues;
|
||||
float *pointpositions;
|
||||
} FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_FLOAT_MAPPING
|
||||
{
|
||||
FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE type;
|
||||
FMOD_DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR piecewiselinearmapping;
|
||||
} FMOD_DSP_PARAMETER_FLOAT_MAPPING;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_DESC_FLOAT
|
||||
{
|
||||
float min;
|
||||
float max;
|
||||
float defaultval;
|
||||
FMOD_DSP_PARAMETER_FLOAT_MAPPING mapping;
|
||||
} FMOD_DSP_PARAMETER_DESC_FLOAT;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_DESC_INT
|
||||
{
|
||||
int min;
|
||||
int max;
|
||||
int defaultval;
|
||||
FMOD_BOOL goestoinf;
|
||||
const char* const* valuenames;
|
||||
} FMOD_DSP_PARAMETER_DESC_INT;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_DESC_BOOL
|
||||
{
|
||||
FMOD_BOOL defaultval;
|
||||
const char* const* valuenames;
|
||||
} FMOD_DSP_PARAMETER_DESC_BOOL;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_DESC_DATA
|
||||
{
|
||||
int datatype;
|
||||
} FMOD_DSP_PARAMETER_DESC_DATA;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_DESC
|
||||
{
|
||||
FMOD_DSP_PARAMETER_TYPE type;
|
||||
char name[16];
|
||||
char label[16];
|
||||
const char *description;
|
||||
|
||||
union
|
||||
{
|
||||
FMOD_DSP_PARAMETER_DESC_FLOAT floatdesc;
|
||||
FMOD_DSP_PARAMETER_DESC_INT intdesc;
|
||||
FMOD_DSP_PARAMETER_DESC_BOOL booldesc;
|
||||
FMOD_DSP_PARAMETER_DESC_DATA datadesc;
|
||||
};
|
||||
} FMOD_DSP_PARAMETER_DESC;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_OVERALLGAIN
|
||||
{
|
||||
float linear_gain;
|
||||
float linear_gain_additive;
|
||||
} FMOD_DSP_PARAMETER_OVERALLGAIN;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_3DATTRIBUTES
|
||||
{
|
||||
FMOD_3D_ATTRIBUTES relative;
|
||||
FMOD_3D_ATTRIBUTES absolute;
|
||||
} FMOD_DSP_PARAMETER_3DATTRIBUTES;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI
|
||||
{
|
||||
int numlisteners;
|
||||
FMOD_3D_ATTRIBUTES relative[FMOD_MAX_LISTENERS];
|
||||
float weight[FMOD_MAX_LISTENERS];
|
||||
FMOD_3D_ATTRIBUTES absolute;
|
||||
} FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_ATTENUATION_RANGE
|
||||
{
|
||||
float min;
|
||||
float max;
|
||||
} FMOD_DSP_PARAMETER_ATTENUATION_RANGE;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_SIDECHAIN
|
||||
{
|
||||
FMOD_BOOL sidechainenable;
|
||||
} FMOD_DSP_PARAMETER_SIDECHAIN;
|
||||
|
||||
typedef struct FMOD_DSP_PARAMETER_FFT
|
||||
{
|
||||
int length;
|
||||
int numchannels;
|
||||
float *spectrum[32];
|
||||
} FMOD_DSP_PARAMETER_FFT;
|
||||
|
||||
typedef struct FMOD_DSP_DESCRIPTION
|
||||
{
|
||||
unsigned int pluginsdkversion;
|
||||
char name[32];
|
||||
unsigned int version;
|
||||
int numinputbuffers;
|
||||
int numoutputbuffers;
|
||||
FMOD_DSP_CREATE_CALLBACK create;
|
||||
FMOD_DSP_RELEASE_CALLBACK release;
|
||||
FMOD_DSP_RESET_CALLBACK reset;
|
||||
FMOD_DSP_READ_CALLBACK read;
|
||||
FMOD_DSP_PROCESS_CALLBACK process;
|
||||
FMOD_DSP_SETPOSITION_CALLBACK setposition;
|
||||
|
||||
int numparameters;
|
||||
FMOD_DSP_PARAMETER_DESC **paramdesc;
|
||||
FMOD_DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat;
|
||||
FMOD_DSP_SETPARAM_INT_CALLBACK setparameterint;
|
||||
FMOD_DSP_SETPARAM_BOOL_CALLBACK setparameterbool;
|
||||
FMOD_DSP_SETPARAM_DATA_CALLBACK setparameterdata;
|
||||
FMOD_DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat;
|
||||
FMOD_DSP_GETPARAM_INT_CALLBACK getparameterint;
|
||||
FMOD_DSP_GETPARAM_BOOL_CALLBACK getparameterbool;
|
||||
FMOD_DSP_GETPARAM_DATA_CALLBACK getparameterdata;
|
||||
FMOD_DSP_SHOULDIPROCESS_CALLBACK shouldiprocess;
|
||||
void *userdata;
|
||||
|
||||
FMOD_DSP_SYSTEM_REGISTER_CALLBACK sys_register;
|
||||
FMOD_DSP_SYSTEM_DEREGISTER_CALLBACK sys_deregister;
|
||||
FMOD_DSP_SYSTEM_MIX_CALLBACK sys_mix;
|
||||
|
||||
} FMOD_DSP_DESCRIPTION;
|
||||
|
||||
typedef struct FMOD_DSP_STATE_DFT_FUNCTIONS
|
||||
{
|
||||
FMOD_DSP_DFT_FFTREAL_FUNC fftreal;
|
||||
FMOD_DSP_DFT_IFFTREAL_FUNC inversefftreal;
|
||||
} FMOD_DSP_STATE_DFT_FUNCTIONS;
|
||||
|
||||
typedef struct FMOD_DSP_STATE_PAN_FUNCTIONS
|
||||
{
|
||||
FMOD_DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix;
|
||||
FMOD_DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix;
|
||||
FMOD_DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix;
|
||||
FMOD_DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix;
|
||||
FMOD_DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC sumstereotosurroundmatrix;
|
||||
FMOD_DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain;
|
||||
} FMOD_DSP_STATE_PAN_FUNCTIONS;
|
||||
|
||||
typedef struct FMOD_DSP_STATE_FUNCTIONS
|
||||
{
|
||||
FMOD_DSP_ALLOC_FUNC alloc;
|
||||
FMOD_DSP_REALLOC_FUNC realloc;
|
||||
FMOD_DSP_FREE_FUNC free;
|
||||
FMOD_DSP_GETSAMPLERATE_FUNC getsamplerate;
|
||||
FMOD_DSP_GETBLOCKSIZE_FUNC getblocksize;
|
||||
FMOD_DSP_STATE_DFT_FUNCTIONS *dft;
|
||||
FMOD_DSP_STATE_PAN_FUNCTIONS *pan;
|
||||
FMOD_DSP_GETSPEAKERMODE_FUNC getspeakermode;
|
||||
FMOD_DSP_GETCLOCK_FUNC getclock;
|
||||
FMOD_DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes;
|
||||
FMOD_DSP_LOG_FUNC log;
|
||||
FMOD_DSP_GETUSERDATA_FUNC getuserdata;
|
||||
} FMOD_DSP_STATE_FUNCTIONS;
|
||||
|
||||
struct FMOD_DSP_STATE
|
||||
{
|
||||
void *instance;
|
||||
void *plugindata;
|
||||
FMOD_CHANNELMASK channelmask;
|
||||
FMOD_SPEAKERMODE source_speakermode;
|
||||
float *sidechaindata;
|
||||
int sidechainchannels;
|
||||
FMOD_DSP_STATE_FUNCTIONS *functions;
|
||||
int systemobject;
|
||||
};
|
||||
|
||||
typedef struct FMOD_DSP_METERING_INFO
|
||||
{
|
||||
int numsamples;
|
||||
float peaklevel[32];
|
||||
float rmslevel[32];
|
||||
short numchannels;
|
||||
} FMOD_DSP_METERING_INFO;
|
||||
|
||||
/*
|
||||
DSP Macros
|
||||
*/
|
||||
#define FMOD_DSP_INIT_PARAMDESC_FLOAT(_paramstruct, _name, _label, _description, _min, _max, _defaultval) \
|
||||
memset(&(_paramstruct), 0, sizeof(_paramstruct)); \
|
||||
(_paramstruct).type = FMOD_DSP_PARAMETER_TYPE_FLOAT; \
|
||||
strncpy((_paramstruct).name, _name, 15); \
|
||||
strncpy((_paramstruct).label, _label, 15); \
|
||||
(_paramstruct).description = _description; \
|
||||
(_paramstruct).floatdesc.min = _min; \
|
||||
(_paramstruct).floatdesc.max = _max; \
|
||||
(_paramstruct).floatdesc.defaultval = _defaultval; \
|
||||
(_paramstruct).floatdesc.mapping.type = FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO;
|
||||
|
||||
#define FMOD_DSP_INIT_PARAMDESC_FLOAT_WITH_MAPPING(_paramstruct, _name, _label, _description, _defaultval, _values, _positions); \
|
||||
memset(&(_paramstruct), 0, sizeof(_paramstruct)); \
|
||||
(_paramstruct).type = FMOD_DSP_PARAMETER_TYPE_FLOAT; \
|
||||
strncpy((_paramstruct).name, _name , 15); \
|
||||
strncpy((_paramstruct).label, _label, 15); \
|
||||
(_paramstruct).description = _description; \
|
||||
(_paramstruct).floatdesc.min = _values[0]; \
|
||||
(_paramstruct).floatdesc.max = _values[sizeof(_values) / sizeof(float) - 1]; \
|
||||
(_paramstruct).floatdesc.defaultval = _defaultval; \
|
||||
(_paramstruct).floatdesc.mapping.type = FMOD_DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR; \
|
||||
(_paramstruct).floatdesc.mapping.piecewiselinearmapping.numpoints = sizeof(_values) / sizeof(float); \
|
||||
(_paramstruct).floatdesc.mapping.piecewiselinearmapping.pointparamvalues = _values; \
|
||||
(_paramstruct).floatdesc.mapping.piecewiselinearmapping.pointpositions = _positions;
|
||||
|
||||
#define FMOD_DSP_INIT_PARAMDESC_INT(_paramstruct, _name, _label, _description, _min, _max, _defaultval, _goestoinf, _valuenames) \
|
||||
memset(&(_paramstruct), 0, sizeof(_paramstruct)); \
|
||||
(_paramstruct).type = FMOD_DSP_PARAMETER_TYPE_INT; \
|
||||
strncpy((_paramstruct).name, _name , 15); \
|
||||
strncpy((_paramstruct).label, _label, 15); \
|
||||
(_paramstruct).description = _description; \
|
||||
(_paramstruct).intdesc.min = _min; \
|
||||
(_paramstruct).intdesc.max = _max; \
|
||||
(_paramstruct).intdesc.defaultval = _defaultval; \
|
||||
(_paramstruct).intdesc.goestoinf = _goestoinf; \
|
||||
(_paramstruct).intdesc.valuenames = _valuenames;
|
||||
|
||||
#define FMOD_DSP_INIT_PARAMDESC_INT_ENUMERATED(_paramstruct, _name, _label, _description, _defaultval, _valuenames) \
|
||||
memset(&(_paramstruct), 0, sizeof(_paramstruct)); \
|
||||
(_paramstruct).type = FMOD_DSP_PARAMETER_TYPE_INT; \
|
||||
strncpy((_paramstruct).name, _name , 15); \
|
||||
strncpy((_paramstruct).label, _label, 15); \
|
||||
(_paramstruct).description = _description; \
|
||||
(_paramstruct).intdesc.min = 0; \
|
||||
(_paramstruct).intdesc.max = sizeof(_valuenames) / sizeof(char*) - 1; \
|
||||
(_paramstruct).intdesc.defaultval = _defaultval; \
|
||||
(_paramstruct).intdesc.goestoinf = false; \
|
||||
(_paramstruct).intdesc.valuenames = _valuenames;
|
||||
|
||||
#define FMOD_DSP_INIT_PARAMDESC_BOOL(_paramstruct, _name, _label, _description, _defaultval, _valuenames) \
|
||||
memset(&(_paramstruct), 0, sizeof(_paramstruct)); \
|
||||
(_paramstruct).type = FMOD_DSP_PARAMETER_TYPE_BOOL; \
|
||||
strncpy((_paramstruct).name, _name , 15); \
|
||||
strncpy((_paramstruct).label, _label, 15); \
|
||||
(_paramstruct).description = _description; \
|
||||
(_paramstruct).booldesc.defaultval = _defaultval; \
|
||||
(_paramstruct).booldesc.valuenames = _valuenames;
|
||||
|
||||
#define FMOD_DSP_INIT_PARAMDESC_DATA(_paramstruct, _name, _label, _description, _datatype) \
|
||||
memset(&(_paramstruct), 0, sizeof(_paramstruct)); \
|
||||
(_paramstruct).type = FMOD_DSP_PARAMETER_TYPE_DATA; \
|
||||
strncpy((_paramstruct).name, _name , 15); \
|
||||
strncpy((_paramstruct).label, _label, 15); \
|
||||
(_paramstruct).description = _description; \
|
||||
(_paramstruct).datadesc.datatype = _datatype;
|
||||
|
||||
#define FMOD_DSP_ALLOC(_state, _size) \
|
||||
(_state)->functions->alloc(_size, FMOD_MEMORY_NORMAL, __FILE__)
|
||||
#define FMOD_DSP_REALLOC(_state, _ptr, _size) \
|
||||
(_state)->functions->realloc(_ptr, _size, FMOD_MEMORY_NORMAL, __FILE__)
|
||||
#define FMOD_DSP_FREE(_state, _ptr) \
|
||||
(_state)->functions->free(_ptr, FMOD_MEMORY_NORMAL, __FILE__)
|
||||
#define FMOD_DSP_LOG(_state, _level, _location, _format, ...) \
|
||||
(_state)->functions->log(_level, __FILE__, __LINE__, _location, _format, __VA_ARGS__)
|
||||
#define FMOD_DSP_GETSAMPLERATE(_state, _rate) \
|
||||
(_state)->functions->getsamplerate(_state, _rate)
|
||||
#define FMOD_DSP_GETBLOCKSIZE(_state, _blocksize) \
|
||||
(_state)->functions->getblocksize(_state, _blocksize)
|
||||
#define FMOD_DSP_GETSPEAKERMODE(_state, _speakermodemix, _speakermodeout) \
|
||||
(_state)->functions->getspeakermode(_state, _speakermodemix, _speakermodeout)
|
||||
#define FMOD_DSP_GETCLOCK(_state, _clock, _offset, _length) \
|
||||
(_state)->functions->getclock(_state, _clock, _offset, _length)
|
||||
#define FMOD_DSP_GETLISTENERATTRIBUTES(_state, _numlisteners, _attributes) \
|
||||
(_state)->functions->getlistenerattributes(_state, _numlisteners, _attributes)
|
||||
#define FMOD_DSP_GETUSERDATA(_state, _userdata) \
|
||||
(_state)->functions->getuserdata(_state, _userdata)
|
||||
#define FMOD_DSP_DFT_FFTREAL(_state, _size, _signal, _dft, _window, _signalhop) \
|
||||
(_state)->functions->dft->fftreal(_state, _size, _signal, _dft, _window, _signalhop)
|
||||
#define FMOD_DSP_DFT_IFFTREAL(_state, _size, _dft, _signal, _window, _signalhop) \
|
||||
(_state)->functions->dft->inversefftreal(_state, _size, _dft, _signal, _window, _signalhop)
|
||||
#define FMOD_DSP_PAN_SUMMONOMATRIX(_state, _sourcespeakermode, _lowfrequencygain, _overallgain, _matrix) \
|
||||
(_state)->functions->pan->summonomatrix(_state, _sourcespeakermode, _lowfrequencygain, _overallgain, _matrix)
|
||||
#define FMOD_DSP_PAN_SUMSTEREOMATRIX(_state, _sourcespeakermode, _pan, _lowfrequencygain, _overallgain, _matrixhop, _matrix) \
|
||||
(_state)->functions->pan->sumstereomatrix(_state, _sourcespeakermode, _pan, _lowfrequencygain, _overallgain, _matrixhop, _matrix)
|
||||
#define FMOD_DSP_PAN_SUMSURROUNDMATRIX(_state, _sourcespeakermode, _targetspeakermode, _direction, _extent, _rotation, _lowfrequencygain, _overallgain, _matrixhop, _matrix, _flags) \
|
||||
(_state)->functions->pan->sumsurroundmatrix(_state, _sourcespeakermode, _targetspeakermode, _direction, _extent, _rotation, _lowfrequencygain, _overallgain, _matrixhop, _matrix, _flags)
|
||||
#define FMOD_DSP_PAN_SUMMONOTOSURROUNDMATRIX(_state, _targetspeakermode, _direction, _extent, _lowfrequencygain, _overallgain, _matrixhop, _matrix) \
|
||||
(_state)->functions->pan->summonotosurroundmatrix(_state, _targetspeakermode, _direction, _extent, _lowfrequencygain, _overallgain, _matrixhop, _matrix)
|
||||
#define FMOD_DSP_PAN_SUMSTEREOTOSURROUNDMATRIX(_state, _targetspeakermode, _direction, _extent, _rotation, _lowfrequencygain, _overallgain, matrixhop, _matrix) \
|
||||
(_state)->functions->pan->sumstereotosurroundmatrix(_state, _targetspeakermode, _direction, _extent, _rotation, _lowfrequencygain, _overallgain, matrixhop, _matrix)
|
||||
#define FMOD_DSP_PAN_GETROLLOFFGAIN(_state, _rolloff, _distance, _mindistance, _maxdistance, _gain) \
|
||||
(_state)->functions->pan->getrolloffgain(_state, _rolloff, _distance, _mindistance, _maxdistance, _gain)
|
||||
|
||||
#endif
|
||||
|
||||
577
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_dsp_effects.h
vendored
Normal file
577
vendor/fmodcore-2.02.18/linux-arm32/inc/fmod_dsp_effects.h
vendored
Normal file
@ -0,0 +1,577 @@
|
||||
/* ============================================================================================================= */
|
||||
/* FMOD Core API - Built-in effects header file. */
|
||||
/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2023. */
|
||||
/* */
|
||||
/* In this header you can find parameter structures for FMOD system registered DSP effects */
|
||||
/* and generators. */
|
||||
/* */
|
||||
/* For more detail visit: */
|
||||
/* https://fmod.com/docs/2.02/api/core-api-common-dsp-effects.html#fmod_dsp_type */
|
||||
/* ============================================================================================================= */
|
||||
|
||||
#ifndef _FMOD_DSP_EFFECTS_H
|
||||
#define _FMOD_DSP_EFFECTS_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_TYPE_UNKNOWN,
|
||||
FMOD_DSP_TYPE_MIXER,
|
||||
FMOD_DSP_TYPE_OSCILLATOR,
|
||||
FMOD_DSP_TYPE_LOWPASS,
|
||||
FMOD_DSP_TYPE_ITLOWPASS,
|
||||
FMOD_DSP_TYPE_HIGHPASS,
|
||||
FMOD_DSP_TYPE_ECHO,
|
||||
FMOD_DSP_TYPE_FADER,
|
||||
FMOD_DSP_TYPE_FLANGE,
|
||||
FMOD_DSP_TYPE_DISTORTION,
|
||||
FMOD_DSP_TYPE_NORMALIZE,
|
||||
FMOD_DSP_TYPE_LIMITER,
|
||||
FMOD_DSP_TYPE_PARAMEQ,
|
||||
FMOD_DSP_TYPE_PITCHSHIFT,
|
||||
FMOD_DSP_TYPE_CHORUS,
|
||||
FMOD_DSP_TYPE_VSTPLUGIN,
|
||||
FMOD_DSP_TYPE_WINAMPPLUGIN,
|
||||
FMOD_DSP_TYPE_ITECHO,
|
||||
FMOD_DSP_TYPE_COMPRESSOR,
|
||||
FMOD_DSP_TYPE_SFXREVERB,
|
||||
FMOD_DSP_TYPE_LOWPASS_SIMPLE,
|
||||
FMOD_DSP_TYPE_DELAY,
|
||||
FMOD_DSP_TYPE_TREMOLO,
|
||||
FMOD_DSP_TYPE_LADSPAPLUGIN,
|
||||
FMOD_DSP_TYPE_SEND,
|
||||
FMOD_DSP_TYPE_RETURN,
|
||||
FMOD_DSP_TYPE_HIGHPASS_SIMPLE,
|
||||
FMOD_DSP_TYPE_PAN,
|
||||
FMOD_DSP_TYPE_THREE_EQ,
|
||||
FMOD_DSP_TYPE_FFT,
|
||||
FMOD_DSP_TYPE_LOUDNESS_METER,
|
||||
FMOD_DSP_TYPE_ENVELOPEFOLLOWER,
|
||||
FMOD_DSP_TYPE_CONVOLUTIONREVERB,
|
||||
FMOD_DSP_TYPE_CHANNELMIX,
|
||||
FMOD_DSP_TYPE_TRANSCEIVER,
|
||||
FMOD_DSP_TYPE_OBJECTPAN,
|
||||
FMOD_DSP_TYPE_MULTIBAND_EQ,
|
||||
|
||||
FMOD_DSP_TYPE_MAX,
|
||||
FMOD_DSP_TYPE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
|
||||
} FMOD_DSP_TYPE;
|
||||
|
||||
/*
|
||||
===================================================================================================
|
||||
|
||||
FMOD built in effect parameters.
|
||||
Use DSP::setParameter with these enums for the 'index' parameter.
|
||||
|
||||
===================================================================================================
|
||||
*/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_OSCILLATOR_TYPE,
|
||||
FMOD_DSP_OSCILLATOR_RATE
|
||||
} FMOD_DSP_OSCILLATOR;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_LOWPASS_CUTOFF,
|
||||
FMOD_DSP_LOWPASS_RESONANCE
|
||||
} FMOD_DSP_LOWPASS;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_ITLOWPASS_CUTOFF,
|
||||
FMOD_DSP_ITLOWPASS_RESONANCE
|
||||
} FMOD_DSP_ITLOWPASS;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_HIGHPASS_CUTOFF,
|
||||
FMOD_DSP_HIGHPASS_RESONANCE
|
||||
} FMOD_DSP_HIGHPASS;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_ECHO_DELAY,
|
||||
FMOD_DSP_ECHO_FEEDBACK,
|
||||
FMOD_DSP_ECHO_DRYLEVEL,
|
||||
FMOD_DSP_ECHO_WETLEVEL
|
||||
} FMOD_DSP_ECHO;
|
||||
|
||||
|
||||
typedef enum FMOD_DSP_FADER
|
||||
{
|
||||
FMOD_DSP_FADER_GAIN,
|
||||
FMOD_DSP_FADER_OVERALL_GAIN,
|
||||
} FMOD_DSP_FADER;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_FLANGE_MIX,
|
||||
FMOD_DSP_FLANGE_DEPTH,
|
||||
FMOD_DSP_FLANGE_RATE
|
||||
} FMOD_DSP_FLANGE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_DISTORTION_LEVEL
|
||||
} FMOD_DSP_DISTORTION;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_NORMALIZE_FADETIME,
|
||||
FMOD_DSP_NORMALIZE_THRESHOLD,
|
||||
FMOD_DSP_NORMALIZE_MAXAMP
|
||||
} FMOD_DSP_NORMALIZE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_LIMITER_RELEASETIME,
|
||||
FMOD_DSP_LIMITER_CEILING,
|
||||
FMOD_DSP_LIMITER_MAXIMIZERGAIN,
|
||||
FMOD_DSP_LIMITER_MODE,
|
||||
} FMOD_DSP_LIMITER;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PARAMEQ_CENTER,
|
||||
FMOD_DSP_PARAMEQ_BANDWIDTH,
|
||||
FMOD_DSP_PARAMEQ_GAIN
|
||||
} FMOD_DSP_PARAMEQ;
|
||||
|
||||
|
||||
typedef enum FMOD_DSP_MULTIBAND_EQ
|
||||
{
|
||||
FMOD_DSP_MULTIBAND_EQ_A_FILTER,
|
||||
FMOD_DSP_MULTIBAND_EQ_A_FREQUENCY,
|
||||
FMOD_DSP_MULTIBAND_EQ_A_Q,
|
||||
FMOD_DSP_MULTIBAND_EQ_A_GAIN,
|
||||
FMOD_DSP_MULTIBAND_EQ_B_FILTER,
|
||||
FMOD_DSP_MULTIBAND_EQ_B_FREQUENCY,
|
||||
FMOD_DSP_MULTIBAND_EQ_B_Q,
|
||||
FMOD_DSP_MULTIBAND_EQ_B_GAIN,
|
||||
FMOD_DSP_MULTIBAND_EQ_C_FILTER,
|
||||
FMOD_DSP_MULTIBAND_EQ_C_FREQUENCY,
|
||||
FMOD_DSP_MULTIBAND_EQ_C_Q,
|
||||
FMOD_DSP_MULTIBAND_EQ_C_GAIN,
|
||||
FMOD_DSP_MULTIBAND_EQ_D_FILTER,
|
||||
FMOD_DSP_MULTIBAND_EQ_D_FREQUENCY,
|
||||
FMOD_DSP_MULTIBAND_EQ_D_Q,
|
||||
FMOD_DSP_MULTIBAND_EQ_D_GAIN,
|
||||
FMOD_DSP_MULTIBAND_EQ_E_FILTER,
|
||||
FMOD_DSP_MULTIBAND_EQ_E_FREQUENCY,
|
||||
FMOD_DSP_MULTIBAND_EQ_E_Q,
|
||||
FMOD_DSP_MULTIBAND_EQ_E_GAIN,
|
||||
} FMOD_DSP_MULTIBAND_EQ;
|
||||
|
||||
|
||||
typedef enum FMOD_DSP_MULTIBAND_EQ_FILTER_TYPE
|
||||
{
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_DISABLED,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_12DB,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_24DB,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWPASS_48DB,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_12DB,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_24DB,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHPASS_48DB,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_LOWSHELF,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_HIGHSHELF,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_PEAKING,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_BANDPASS,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_NOTCH,
|
||||
FMOD_DSP_MULTIBAND_EQ_FILTER_ALLPASS,
|
||||
} FMOD_DSP_MULTIBAND_EQ_FILTER_TYPE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PITCHSHIFT_PITCH,
|
||||
FMOD_DSP_PITCHSHIFT_FFTSIZE,
|
||||
FMOD_DSP_PITCHSHIFT_OVERLAP,
|
||||
FMOD_DSP_PITCHSHIFT_MAXCHANNELS
|
||||
} FMOD_DSP_PITCHSHIFT;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_CHORUS_MIX,
|
||||
FMOD_DSP_CHORUS_RATE,
|
||||
FMOD_DSP_CHORUS_DEPTH,
|
||||
} FMOD_DSP_CHORUS;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_ITECHO_WETDRYMIX,
|
||||
FMOD_DSP_ITECHO_FEEDBACK,
|
||||
FMOD_DSP_ITECHO_LEFTDELAY,
|
||||
FMOD_DSP_ITECHO_RIGHTDELAY,
|
||||
FMOD_DSP_ITECHO_PANDELAY
|
||||
} FMOD_DSP_ITECHO;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_COMPRESSOR_THRESHOLD,
|
||||
FMOD_DSP_COMPRESSOR_RATIO,
|
||||
FMOD_DSP_COMPRESSOR_ATTACK,
|
||||
FMOD_DSP_COMPRESSOR_RELEASE,
|
||||
FMOD_DSP_COMPRESSOR_GAINMAKEUP,
|
||||
FMOD_DSP_COMPRESSOR_USESIDECHAIN,
|
||||
FMOD_DSP_COMPRESSOR_LINKED
|
||||
} FMOD_DSP_COMPRESSOR;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_SFXREVERB_DECAYTIME,
|
||||
FMOD_DSP_SFXREVERB_EARLYDELAY,
|
||||
FMOD_DSP_SFXREVERB_LATEDELAY,
|
||||
FMOD_DSP_SFXREVERB_HFREFERENCE,
|
||||
FMOD_DSP_SFXREVERB_HFDECAYRATIO,
|
||||
FMOD_DSP_SFXREVERB_DIFFUSION,
|
||||
FMOD_DSP_SFXREVERB_DENSITY,
|
||||
FMOD_DSP_SFXREVERB_LOWSHELFFREQUENCY,
|
||||
FMOD_DSP_SFXREVERB_LOWSHELFGAIN,
|
||||
FMOD_DSP_SFXREVERB_HIGHCUT,
|
||||
FMOD_DSP_SFXREVERB_EARLYLATEMIX,
|
||||
FMOD_DSP_SFXREVERB_WETLEVEL,
|
||||
FMOD_DSP_SFXREVERB_DRYLEVEL
|
||||
} FMOD_DSP_SFXREVERB;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_LOWPASS_SIMPLE_CUTOFF
|
||||
} FMOD_DSP_LOWPASS_SIMPLE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_DELAY_CH0,
|
||||
FMOD_DSP_DELAY_CH1,
|
||||
FMOD_DSP_DELAY_CH2,
|
||||
FMOD_DSP_DELAY_CH3,
|
||||
FMOD_DSP_DELAY_CH4,
|
||||
FMOD_DSP_DELAY_CH5,
|
||||
FMOD_DSP_DELAY_CH6,
|
||||
FMOD_DSP_DELAY_CH7,
|
||||
FMOD_DSP_DELAY_CH8,
|
||||
FMOD_DSP_DELAY_CH9,
|
||||
FMOD_DSP_DELAY_CH10,
|
||||
FMOD_DSP_DELAY_CH11,
|
||||
FMOD_DSP_DELAY_CH12,
|
||||
FMOD_DSP_DELAY_CH13,
|
||||
FMOD_DSP_DELAY_CH14,
|
||||
FMOD_DSP_DELAY_CH15,
|
||||
FMOD_DSP_DELAY_MAXDELAY
|
||||
} FMOD_DSP_DELAY;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_TREMOLO_FREQUENCY,
|
||||
FMOD_DSP_TREMOLO_DEPTH,
|
||||
FMOD_DSP_TREMOLO_SHAPE,
|
||||
FMOD_DSP_TREMOLO_SKEW,
|
||||
FMOD_DSP_TREMOLO_DUTY,
|
||||
FMOD_DSP_TREMOLO_SQUARE,
|
||||
FMOD_DSP_TREMOLO_PHASE,
|
||||
FMOD_DSP_TREMOLO_SPREAD
|
||||
} FMOD_DSP_TREMOLO;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_SEND_RETURNID,
|
||||
FMOD_DSP_SEND_LEVEL,
|
||||
} FMOD_DSP_SEND;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_RETURN_ID,
|
||||
FMOD_DSP_RETURN_INPUT_SPEAKER_MODE
|
||||
} FMOD_DSP_RETURN;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_HIGHPASS_SIMPLE_CUTOFF
|
||||
} FMOD_DSP_HIGHPASS_SIMPLE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PAN_2D_STEREO_MODE_DISTRIBUTED,
|
||||
FMOD_DSP_PAN_2D_STEREO_MODE_DISCRETE
|
||||
} FMOD_DSP_PAN_2D_STEREO_MODE_TYPE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PAN_MODE_MONO,
|
||||
FMOD_DSP_PAN_MODE_STEREO,
|
||||
FMOD_DSP_PAN_MODE_SURROUND
|
||||
} FMOD_DSP_PAN_MODE_TYPE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PAN_3D_ROLLOFF_LINEARSQUARED,
|
||||
FMOD_DSP_PAN_3D_ROLLOFF_LINEAR,
|
||||
FMOD_DSP_PAN_3D_ROLLOFF_INVERSE,
|
||||
FMOD_DSP_PAN_3D_ROLLOFF_INVERSETAPERED,
|
||||
FMOD_DSP_PAN_3D_ROLLOFF_CUSTOM
|
||||
} FMOD_DSP_PAN_3D_ROLLOFF_TYPE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PAN_3D_EXTENT_MODE_AUTO,
|
||||
FMOD_DSP_PAN_3D_EXTENT_MODE_USER,
|
||||
FMOD_DSP_PAN_3D_EXTENT_MODE_OFF
|
||||
} FMOD_DSP_PAN_3D_EXTENT_MODE_TYPE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_PAN_MODE,
|
||||
FMOD_DSP_PAN_2D_STEREO_POSITION,
|
||||
FMOD_DSP_PAN_2D_DIRECTION,
|
||||
FMOD_DSP_PAN_2D_EXTENT,
|
||||
FMOD_DSP_PAN_2D_ROTATION,
|
||||
FMOD_DSP_PAN_2D_LFE_LEVEL,
|
||||
FMOD_DSP_PAN_2D_STEREO_MODE,
|
||||
FMOD_DSP_PAN_2D_STEREO_SEPARATION,
|
||||
FMOD_DSP_PAN_2D_STEREO_AXIS,
|
||||
FMOD_DSP_PAN_ENABLED_SPEAKERS,
|
||||
FMOD_DSP_PAN_3D_POSITION,
|
||||
FMOD_DSP_PAN_3D_ROLLOFF,
|
||||
FMOD_DSP_PAN_3D_MIN_DISTANCE,
|
||||
FMOD_DSP_PAN_3D_MAX_DISTANCE,
|
||||
FMOD_DSP_PAN_3D_EXTENT_MODE,
|
||||
FMOD_DSP_PAN_3D_SOUND_SIZE,
|
||||
FMOD_DSP_PAN_3D_MIN_EXTENT,
|
||||
FMOD_DSP_PAN_3D_PAN_BLEND,
|
||||
FMOD_DSP_PAN_LFE_UPMIX_ENABLED,
|
||||
FMOD_DSP_PAN_OVERALL_GAIN,
|
||||
FMOD_DSP_PAN_SURROUND_SPEAKER_MODE,
|
||||
FMOD_DSP_PAN_2D_HEIGHT_BLEND,
|
||||
FMOD_DSP_PAN_ATTENUATION_RANGE,
|
||||
FMOD_DSP_PAN_OVERRIDE_RANGE
|
||||
} FMOD_DSP_PAN;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_12DB,
|
||||
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_24DB,
|
||||
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_48DB
|
||||
} FMOD_DSP_THREE_EQ_CROSSOVERSLOPE_TYPE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_THREE_EQ_LOWGAIN,
|
||||
FMOD_DSP_THREE_EQ_MIDGAIN,
|
||||
FMOD_DSP_THREE_EQ_HIGHGAIN,
|
||||
FMOD_DSP_THREE_EQ_LOWCROSSOVER,
|
||||
FMOD_DSP_THREE_EQ_HIGHCROSSOVER,
|
||||
FMOD_DSP_THREE_EQ_CROSSOVERSLOPE
|
||||
} FMOD_DSP_THREE_EQ;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_FFT_WINDOW_RECT,
|
||||
FMOD_DSP_FFT_WINDOW_TRIANGLE,
|
||||
FMOD_DSP_FFT_WINDOW_HAMMING,
|
||||
FMOD_DSP_FFT_WINDOW_HANNING,
|
||||
FMOD_DSP_FFT_WINDOW_BLACKMAN,
|
||||
FMOD_DSP_FFT_WINDOW_BLACKMANHARRIS
|
||||
} FMOD_DSP_FFT_WINDOW;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_FFT_WINDOWSIZE,
|
||||
FMOD_DSP_FFT_WINDOWTYPE,
|
||||
FMOD_DSP_FFT_SPECTRUMDATA,
|
||||
FMOD_DSP_FFT_DOMINANT_FREQ
|
||||
} FMOD_DSP_FFT;
|
||||
|
||||
#define FMOD_DSP_LOUDNESS_METER_HISTOGRAM_SAMPLES 66
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_LOUDNESS_METER_STATE,
|
||||
FMOD_DSP_LOUDNESS_METER_WEIGHTING,
|
||||
FMOD_DSP_LOUDNESS_METER_INFO
|
||||
} FMOD_DSP_LOUDNESS_METER;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_LOUDNESS_METER_STATE_RESET_INTEGRATED = -3,
|
||||
FMOD_DSP_LOUDNESS_METER_STATE_RESET_MAXPEAK = -2,
|
||||
FMOD_DSP_LOUDNESS_METER_STATE_RESET_ALL = -1,
|
||||
FMOD_DSP_LOUDNESS_METER_STATE_PAUSED = 0,
|
||||
FMOD_DSP_LOUDNESS_METER_STATE_ANALYZING = 1
|
||||
} FMOD_DSP_LOUDNESS_METER_STATE_TYPE;
|
||||
|
||||
typedef struct FMOD_DSP_LOUDNESS_METER_INFO_TYPE
|
||||
{
|
||||
float momentaryloudness;
|
||||
float shorttermloudness;
|
||||
float integratedloudness;
|
||||
float loudness10thpercentile;
|
||||
float loudness95thpercentile;
|
||||
float loudnesshistogram[FMOD_DSP_LOUDNESS_METER_HISTOGRAM_SAMPLES];
|
||||
float maxtruepeak;
|
||||
float maxmomentaryloudness;
|
||||
} FMOD_DSP_LOUDNESS_METER_INFO_TYPE;
|
||||
|
||||
typedef struct FMOD_DSP_LOUDNESS_METER_WEIGHTING_TYPE
|
||||
{
|
||||
float channelweight[32];
|
||||
} FMOD_DSP_LOUDNESS_METER_WEIGHTING_TYPE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_ENVELOPEFOLLOWER_ATTACK,
|
||||
FMOD_DSP_ENVELOPEFOLLOWER_RELEASE,
|
||||
FMOD_DSP_ENVELOPEFOLLOWER_ENVELOPE,
|
||||
FMOD_DSP_ENVELOPEFOLLOWER_USESIDECHAIN
|
||||
} FMOD_DSP_ENVELOPEFOLLOWER;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_CONVOLUTION_REVERB_PARAM_IR,
|
||||
FMOD_DSP_CONVOLUTION_REVERB_PARAM_WET,
|
||||
FMOD_DSP_CONVOLUTION_REVERB_PARAM_DRY,
|
||||
FMOD_DSP_CONVOLUTION_REVERB_PARAM_LINKED
|
||||
} FMOD_DSP_CONVOLUTION_REVERB;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_DEFAULT,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_ALLMONO,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_ALLSTEREO,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_ALLQUAD,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_ALL5POINT1,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_ALL7POINT1,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_ALLLFE,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_ALL7POINT1POINT4
|
||||
} FMOD_DSP_CHANNELMIX_OUTPUT;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_CHANNELMIX_OUTPUTGROUPING,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH0,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH1,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH2,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH3,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH4,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH5,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH6,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH7,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH8,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH9,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH10,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH11,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH12,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH13,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH14,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH15,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH16,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH17,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH18,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH19,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH20,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH21,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH22,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH23,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH24,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH25,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH26,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH27,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH28,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH29,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH30,
|
||||
FMOD_DSP_CHANNELMIX_GAIN_CH31,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH0,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH1,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH2,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH3,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH4,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH5,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH6,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH7,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH8,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH9,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH10,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH11,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH12,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH13,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH14,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH15,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH16,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH17,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH18,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH19,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH20,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH21,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH22,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH23,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH24,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH25,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH26,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH27,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH28,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH29,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH30,
|
||||
FMOD_DSP_CHANNELMIX_OUTPUT_CH31
|
||||
} FMOD_DSP_CHANNELMIX;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_AUTO = -1,
|
||||
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_MONO = 0,
|
||||
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_STEREO,
|
||||
FMOD_DSP_TRANSCEIVER_SPEAKERMODE_SURROUND,
|
||||
} FMOD_DSP_TRANSCEIVER_SPEAKERMODE;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_TRANSCEIVER_TRANSMIT,
|
||||
FMOD_DSP_TRANSCEIVER_GAIN,
|
||||
FMOD_DSP_TRANSCEIVER_CHANNEL,
|
||||
FMOD_DSP_TRANSCEIVER_TRANSMITSPEAKERMODE
|
||||
} FMOD_DSP_TRANSCEIVER;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FMOD_DSP_OBJECTPAN_3D_POSITION,
|
||||
FMOD_DSP_OBJECTPAN_3D_ROLLOFF,
|
||||
FMOD_DSP_OBJECTPAN_3D_MIN_DISTANCE,
|
||||
FMOD_DSP_OBJECTPAN_3D_MAX_DISTANCE,
|
||||
FMOD_DSP_OBJECTPAN_3D_EXTENT_MODE,
|
||||
FMOD_DSP_OBJECTPAN_3D_SOUND_SIZE,
|
||||
FMOD_DSP_OBJECTPAN_3D_MIN_EXTENT,
|
||||
FMOD_DSP_OBJECTPAN_OVERALL_GAIN,
|
||||
FMOD_DSP_OBJECTPAN_OUTPUTGAIN,
|
||||
FMOD_DSP_OBJECTPAN_ATTENUATION_RANGE,
|
||||
FMOD_DSP_OBJECTPAN_OVERRIDE_RANGE
|
||||
} FMOD_DSP_OBJECTPAN;
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user