OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
Echo Effects

Functions

u8 audioDisableEcho (void)
 Disable echo for all voices.
u8 audioEnableEcho (u8 voiceMask)
 Enable echo for specific voices.
u8 audioSetEcho (u8 delay, s8 feedback, s8 volumeL, s8 volumeR)
 Configure echo parameters.
u8 audioSetEchoFilter (const s8 fir[8])
 Set FIR filter coefficients for echo.

Detailed Description

Function Documentation

◆ audioDisableEcho()

u8 audioDisableEcho ( void )

Disable echo for all voices.

◆ audioEnableEcho()

u8 audioEnableEcho ( u8 voiceMask)

Enable echo for specific voices.

Parameters
voiceMaskBitmask (bit 0 = voice 0, etc.)

◆ audioSetEcho()

u8 audioSetEcho ( u8 delay,
s8 feedback,
s8 volumeL,
s8 volumeR )

Configure echo parameters.

Parameters
delayEcho delay 1-7 (delay_ms = value * 16; values above 7 are clamped — the echo ring takes up to 14 KB from $C000, and the first call brings the sample area down from 62 KB to 46 KB: see audioGetFreeMemory())
feedbackFeedback amount (-128 to 127)
volumeLLeft echo volume (-128 to 127)
volumeRRight echo volume (-128 to 127)

Reconfiguration clears the whole echo ring before re-enabling echo writes (~9 ms per delay unit) — call at scene setup, not per frame. Call this BEFORE audioEnableEcho().

Returns
AUDIO_OK; AUDIO_ERR_NO_MEMORY when samples already loaded reach past $C000, where the ring goes (nothing is changed then); AUDIO_ERR_TIMEOUT if the driver does not answer

◆ audioSetEchoFilter()

u8 audioSetEchoFilter ( const s8 fir[8])

Set FIR filter coefficients for echo.

Parameters
firArray of 8 signed coefficients