coastline 0.0.4
Loading...
Searching...
No Matches
environment.h File Reference
#include <cstdint>
Include dependency graph for environment.h:

Go to the source code of this file.

Classes

class  EarEnvironment
 Default-registration marker, set after a registration attempt even when registration fails. More...
class  EarEnvironmentRegistration
 Packed 0x40-byte environment registration copied by EAR_DLL_RegisterEnvironment(). More...

Functions

void RegisterDefaultEnvironment (void)
 Attempt to register default environment 1 and set the default-registration marker.
void __stdcall OnDefaultEnvironmentRegistered (EarEnvironment *environment)
 Do nothing with the default environment once it is registered.
uint16_t __stdcall EarRegisterEnvironmentExportWrapper (const EarEnvironmentRegistration *registration)
 Forward an environment registration to EAR_DLL_RegisterEnvironment().
uint16_t __stdcall EAR_DLL_RegisterEnvironment (const EarEnvironmentRegistration *registration)
 Register an environment under the requested handle, truncated to 16 bits, or generate a new handle for 0xffffffff.
int __stdcall EarShutDownEnvironmentExportWrapper (uint32_t environment)
 Forward an environment shutdown to EAR_DLL_ShutDownEnvironment().
int __stdcall EAR_DLL_ShutDownEnvironment (uint32_t environment)
 Release one environment or every environment after waiting for playback updates.

Function Documentation

◆ RegisterDefaultEnvironment()

void RegisterDefaultEnvironment ( void )

Attempt to register default environment 1 and set the default-registration marker.

Registration failures remain available through the EAR error API.

Ghidra address:
EAR: 0x100046bd

◆ OnDefaultEnvironmentRegistered()

void __stdcall OnDefaultEnvironmentRegistered ( EarEnvironment * environment)

Do nothing with the default environment once it is registered.

Parameters
environmentThe borrowed registered default environment, unused by this callback.
Ghidra address:
EAR: 0x100100f6

◆ EarRegisterEnvironmentExportWrapper()

uint16_t __stdcall EarRegisterEnvironmentExportWrapper ( const EarEnvironmentRegistration * registration)

Forward an environment registration to EAR_DLL_RegisterEnvironment().

Parameters
registrationA non-null readable registration of 0x40 bytes, borrowed during the call.
Returns
The requested or generated handle, including an existing handle on duplicate error; zero for an unavailable engine, incorrect size, or zero requested handle.
Ghidra address:
EAR: 0x1000e6c0

◆ EAR_DLL_RegisterEnvironment()

uint16_t __stdcall EAR_DLL_RegisterEnvironment ( const EarEnvironmentRegistration * registration)

Register an environment under the requested handle, truncated to 16 bits, or generate a new handle for 0xffffffff.

Handle 1 replaces the registered default environment. Other duplicate handles are refused with error 0x1e and returned unchanged.

Parameters
registrationA non-null readable registration of 0x40 bytes, copied during the call. Its size field must be 0x40. Pitch variation is clamped to a minimum of 100 during registration.
Returns
The requested or generated handle, including an existing handle on duplicate error; zero for an unavailable engine, incorrect size, or zero requested handle.
Ghidra address:
EAR: 0x1000e6d0

◆ EarShutDownEnvironmentExportWrapper()

int __stdcall EarShutDownEnvironmentExportWrapper ( uint32_t environment)

Forward an environment shutdown to EAR_DLL_ShutDownEnvironment().

Parameters
environmentThe handle, truncated to 16 bits for lookup, or zero for every environment.
Returns
One on successful removal; zero for an unavailable engine, empty registry, or missing handle, with error 0x1f recorded for registry lookup failures.
Ghidra address:
EAR: 0x1000f310

◆ EAR_DLL_ShutDownEnvironment()

int __stdcall EAR_DLL_ShutDownEnvironment ( uint32_t environment)

Release one environment or every environment after waiting for playback updates.

Requests for handle 1 or all environments repeat default registration when the call acquired the registry mutation lock, even if lookup of handle 1 fails.

Parameters
environmentThe handle, truncated to 16 bits for lookup, or zero for every environment.
Returns
One on successful removal; zero for an unavailable engine, empty registry, or missing handle, with error 0x1f recorded for registry lookup failures.
Ghidra address:
EAR: 0x1000f320