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

Go to the source code of this file.

Functions

int __stdcall EarRegisterChannelExportWrapper (uint32_t channel, uint32_t flags, uint32_t gainPercent, uint32_t playbackLimits)
int __stdcall EAR_DLL_RegisterChannel (uint32_t channel, uint32_t flags, uint32_t gainPercent, uint32_t playbackLimits)
 Register a channel.
int __stdcall EarShutDownChannelExportWrapper (uint32_t channel)
int __stdcall EAR_DLL_ShutDownChannel (uint32_t channel)
 Shut down a channel and its events.
int __stdcall EarClearChannelExportWrapper (uint32_t channel, int keepActive)
int __stdcall EAR_DLL_ClearChannel (uint32_t channel, int keepActive)
 Delete the events of a channel, or stop the active ones.
uint32_t __stdcall EarChangeChannelControlExportWrapper (uint32_t channel, uint32_t control)
uint32_t __stdcall EAR_DLL_ChangeChannelControl (uint32_t channel, uint32_t control)
 Change or query a channel.
void __stdcall EarSetAttenuationLevelExportWrapper (uint32_t channel, uint32_t level)
 Forward channel or master gain adjustment to EAR_DLL_SetAttenuationLevel().
void __stdcall EAR_DLL_SetAttenuationLevel (uint32_t channel, uint32_t level)
 Set the gain a channel moves towards, or the master attenuation of every channel.

Function Documentation

◆ EarRegisterChannelExportWrapper()

int __stdcall EarRegisterChannelExportWrapper ( uint32_t channel,
uint32_t flags,
uint32_t gainPercent,
uint32_t playbackLimits )
Parameters
channelThe channel.
flagsThe flags of the channel.
gainPercentThe gain of the channel, in percent.
playbackLimitsThe events the channel holds in the low word, and the events it starts in the high word.
Returns
Whether the channel was registered.
Ghidra address:
EAR: 0x1000de80

◆ EAR_DLL_RegisterChannel()

int __stdcall EAR_DLL_RegisterChannel ( uint32_t channel,
uint32_t flags,
uint32_t gainPercent,
uint32_t playbackLimits )

Register a channel.

Flag 0x1 sets EarChannel::flag01 and flag 0x2 makes the channel sequential, with 0x6 for the CD audio and 0xa for the MIDI music. Flags 0x10, 0x30, and 0x70 give the priority level, and flags 0x700 the smoothing of the gain.

Parameters
channelThe channel, not 0.
flagsThe flags of the channel.
gainPercentThe gain of the channel, in percent, at most 100.
playbackLimitsThe events the channel holds in the low word, and the events it starts in the high word, 0 for any number.
Returns
Whether the channel was registered.
Ghidra address:
EAR: 0x1000de9c

◆ EarShutDownChannelExportWrapper()

int __stdcall EarShutDownChannelExportWrapper ( uint32_t channel)
Parameters
channelThe channel, 0 for every channel, with 0x10000 for the shutdown of the library.
Returns
0.
Ghidra address:
EAR: 0x1000f0a0

◆ EAR_DLL_ShutDownChannel()

int __stdcall EAR_DLL_ShutDownChannel ( uint32_t channel)

Shut down a channel and its events.

A channel that is not yet shutting down only starts to fade out, unless the library is shutting down.

Parameters
channelThe channel, 0 for every channel, with 0x10000 for the shutdown of the library.
Returns
0.
Ghidra address:
EAR: 0x1000f0b0

◆ EarClearChannelExportWrapper()

int __stdcall EarClearChannelExportWrapper ( uint32_t channel,
int keepActive )
Parameters
channelThe channel, 0 for every channel.
keepActiveWhether the active events stop rather than being deleted.
Returns
Whether an active event was stopped.
Ghidra address:
EAR: 0x1000c320

◆ EAR_DLL_ClearChannel()

int __stdcall EAR_DLL_ClearChannel ( uint32_t channel,
int keepActive )

Delete the events of a channel, or stop the active ones.

Parameters
channelThe channel, 0 for every channel.
keepActiveWhether the active events stop rather than being deleted.
Returns
Whether an active event was stopped.
Ghidra address:
EAR: 0x1000c334

◆ EarChangeChannelControlExportWrapper()

uint32_t __stdcall EarChangeChannelControlExportWrapper ( uint32_t channel,
uint32_t control )
Parameters
channelThe channel, 0 for every channel.
controlThe control.
Returns
The result of the control.
Ghidra address:
EAR: 0x1000bb50

◆ EAR_DLL_ChangeChannelControl()

uint32_t __stdcall EAR_DLL_ChangeChannelControl ( uint32_t channel,
uint32_t control )

Change or query a channel.

A control with 0x80000000 queries an event, with 0x40000000 sets or queries the limits and the gain of the channel, and with 0x10000000 controls the CD audio. Otherwise the bits pause and resume (0x4, 0xc), mute and unmute (0x1, 0x3), and set the priority level, the smoothing, and the flags of the channel.

Parameters
channelThe channel, 0 for every channel.
controlThe control.
Returns
The result of a query, or g_earChannelControlResultFlags.
Ghidra address:
EAR: 0x1000bb64

◆ EarSetAttenuationLevelExportWrapper()

void __stdcall EarSetAttenuationLevelExportWrapper ( uint32_t channel,
uint32_t level )

Forward channel or master gain adjustment to EAR_DLL_SetAttenuationLevel().

Parameters
channelThe channel, or 0 for master attenuation.
levelThe attenuation level, in ten-thousandths.
Ghidra address:
EAR: 0x1000ef30

◆ EAR_DLL_SetAttenuationLevel()

void __stdcall EAR_DLL_SetAttenuationLevel ( uint32_t channel,
uint32_t level )

Set the gain a channel moves towards, or the master attenuation of every channel.

Parameters
channelThe channel, 0 for the master attenuation.
levelThe attenuation level, in ten-thousandths, at most 10000.
Ghidra address:
EAR: 0x1000ef44