wavelength 1.0.0
Loading...
Searching...
No Matches
softfx.h File Reference
Include dependency graph for softfx.h:

Go to the source code of this file.

Classes

struct  InitArgs
 Argument of kSoftFxCommandInit. More...
struct  CommandHeader
 Header of one command in a kSoftFxCommandConcatenation buffer. More...
struct  CaptureFrame
 One transfer of captured samples. More...

Enumerations

enum  SoftFxCommand {
  kSoftFxCommandInit = 100 , kSoftFxCommandShutdown = 101 , kSoftFxCommandStart = 102 , kSoftFxCommandStop = 103 ,
  kSoftFxCommandIgnored = 104 , kSoftFxCommandStreamData = 105 , kSoftFxCommandSetEffect = 106 , kSoftFxCommandSetParams = 107 ,
  kSoftFxCommandConcatenation = 108 , kSoftFxCommandRouteInput = 109 , kSoftFxCommandRouteVoices = 110 , kSoftFxCommandSetVolume = 111 ,
  kSoftFxCommandSetMonoStream = 112
}
 RPC function numbers. More...
enum  Effect {
  kEffectSilence = 0 , kEffectStream = 1 , kEffectSweptFilter = 2 , kEffectStutter = 3 ,
  kEffectBypass = 4 , kEffectFilter = 5 , kEffectEcho = 6 , kEffectFilterVariant = 7 ,
  kEffectTrackingEcho = 8 , kEffectDistortedFilter = 9
}
 Effects a captured block can run through. More...

Functions

int start (int argc, char **argv)
 Module entry.

Variables

constexpr unsigned int kSoftFxRpcServer = 0x75433776
 The softFX module captures the output of SPU2 core 0 block by block, runs one effect over each block, and writes the result back to SPU2 memory.
int g_nEffect
 The selected Effect.

Enumeration Type Documentation

◆ SoftFxCommand

RPC function numbers.

The argument buffer is an int unless noted.

Enumerator
kSoftFxCommandInit 

Start the module. The buffer is an InitArgs.

kSoftFxCommandShutdown 

Does nothing.

kSoftFxCommandStart 

Start capturing.

kSoftFxCommandStop 

Stop capturing after a few more interrupts.

kSoftFxCommandIgnored 

Does nothing.

kSoftFxCommandStreamData 

Append the buffer to the stream; empty ends it.

kSoftFxCommandSetEffect 

Select an Effect.

kSoftFxCommandSetParams 

Two EffectParams, left then right.

kSoftFxCommandConcatenation 

A run of CommandHeader records and their data.

kSoftFxCommandRouteInput 

Select the core 0 mixer input pair, 0 to 2.

kSoftFxCommandRouteVoices 

Nonzero sets mixer bits 8 and 9 of core 0.

kSoftFxCommandSetVolume 

Set the captured input volume.

kSoftFxCommandSetMonoStream 

Nonzero mixes the stream to mono.

◆ Effect

enum Effect

Effects a captured block can run through.

Enumerator
kEffectSilence 

Output silence.

kEffectStream 

Output the stream the EE sends.

kEffectSweptFilter 

The resonant filter; new parameters set interpolation steps.

kEffectStutter 

Gate the input on a phase accumulator.

kEffectBypass 

Copy the input.

kEffectFilter 

The resonant filter.

kEffectEcho 

A mono echo with two taps.

kEffectFilterVariant 

The resonant filter.

kEffectTrackingEcho 

An echo whose taps follow zero crossings.

kEffectDistortedFilter 

The resonant filter with a hard clip.

Function Documentation

◆ start()

int start ( int argc,
char ** argv )

Module entry.

A negative argument count unloads the module.

Parameters
argcArgument count, negated to unload.
argvArguments.
Returns
A ModuleStartResult.
Ghidra address:
NTSC-U/C: 0x00000114
Ghidra address:
PAL: 0x00000114

Variable Documentation

◆ kSoftFxRpcServer

unsigned int kSoftFxRpcServer = 0x75433776
constexpr

The softFX module captures the output of SPU2 core 0 block by block, runs one effect over each block, and writes the result back to SPU2 memory.

The EE controls it through a SIF RPC server. SIF RPC server identifier of the module.

◆ g_nEffect

int g_nEffect
extern

The selected Effect.