sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ahx_rpc.h File Reference

Go to the source code of this file.

Macros

#define AHX_IRX   0xC001D0E
#define AHX_INIT   0x01
#define AHX_PLAY   0x02
#define AHX_PAUSE   0x03
#define AHX_QUIT   0x04
#define AHX_LOADSONG   0x05
#define AHX_SETVOLUME   0x06
#define AHX_SETBOOST   0x07
#define AHX_OVERSAMPLING   0x08
#define AHX_SUBSONG   0x09

Functions

int AHX_Init ()
int AHX_LoadSongBuffer (char *songdata, int songsize)
int AHX_LoadSong (char *filename)
int AHX_SubSong (int songNo)
int AHX_SetVolume (int volumePercentage)
int AHX_SetBoost (int boostValue)
int AHX_ToggleOversampling ()
int AHX_Quit ()
int AHX_Play ()
int AHX_Pause ()

Detailed Description

AHX EE-side RPC code.

Definition in file ahx_rpc.h.

Macro Definition Documentation

◆ AHX_INIT

#define AHX_INIT   0x01

Definition at line 21 of file ahx_rpc.h.

◆ AHX_IRX

#define AHX_IRX   0xC001D0E

Definition at line 20 of file ahx_rpc.h.

◆ AHX_LOADSONG

#define AHX_LOADSONG   0x05

Definition at line 25 of file ahx_rpc.h.

◆ AHX_OVERSAMPLING

#define AHX_OVERSAMPLING   0x08

Definition at line 28 of file ahx_rpc.h.

◆ AHX_PAUSE

#define AHX_PAUSE   0x03

Definition at line 23 of file ahx_rpc.h.

◆ AHX_PLAY

#define AHX_PLAY   0x02

Definition at line 22 of file ahx_rpc.h.

◆ AHX_QUIT

#define AHX_QUIT   0x04

Definition at line 24 of file ahx_rpc.h.

◆ AHX_SETBOOST

#define AHX_SETBOOST   0x07

Definition at line 27 of file ahx_rpc.h.

◆ AHX_SETVOLUME

#define AHX_SETVOLUME   0x06

Definition at line 26 of file ahx_rpc.h.

◆ AHX_SUBSONG

#define AHX_SUBSONG   0x09

Definition at line 29 of file ahx_rpc.h.

Function Documentation

◆ AHX_Init()

int AHX_Init ( )
extern

AHX Init

Sends a call the the loaded AHX IRX, telling it to set things up ready for loading a song.

Definition at line 75 of file ahx_rpc.c.

◆ AHX_LoadSong()

int AHX_LoadSong ( char * filename)
extern

AHX LongSongBuffer

This loads a song from disk etc. It loads the songdata into memory and passes it to LongSongBuffer.

Returns
number of subsongs.

Definition at line 162 of file ahx_rpc.c.

◆ AHX_LoadSongBuffer()

int AHX_LoadSongBuffer ( char * songdata,
int songsize )
extern

AHX LongSongBuffer

This loads a song from a buffer in memory. It copies [songsize] bytes from [songdata] to the IOP memory song buffer.

Returns
number of subsongs.

Definition at line 145 of file ahx_rpc.c.

◆ AHX_Pause()

int AHX_Pause ( )
extern

AHX Pause

Sends a call the the loaded AHX IRX, telling it to pause the currently loaded song.

Definition at line 94 of file ahx_rpc.c.

◆ AHX_Play()

int AHX_Play ( )
extern

AHX Play

Sends a call the the loaded AHX IRX, telling it to play the currently loaded song.

Definition at line 86 of file ahx_rpc.c.

◆ AHX_Quit()

int AHX_Quit ( )
extern

AHX Quit

Sends a call the the loaded AHX IRX, telling it to quit. This frees up IOP mem, quites threads, deletes semaphores and all that jazz....

Definition at line 137 of file ahx_rpc.c.

◆ AHX_SetBoost()

int AHX_SetBoost ( int boostValue)
extern

AHX Set Boost

Sends a call the the loaded AHX IRX, telling it to change the output boost value. Boost value multiplies the level of the output for the AHX Mixer. A boost value of 1 is twice as load as a boost value of 0. A boost value of 3 is twice as load as 2 etc etc (ala DB)

Definition at line 120 of file ahx_rpc.c.

◆ AHX_SetVolume()

int AHX_SetVolume ( int volumePercentage)
extern

AHX Set Volume

Sends a call the the loaded AHX IRX, telling it to change the output volume of the SPU2. volumePercentage argument can range from 0 (0% silence) to 100 (100% full volume)

Definition at line 111 of file ahx_rpc.c.

◆ AHX_SubSong()

int AHX_SubSong ( int songNo)
extern

AHX Play Subsong

Sends a call the the loaded AHX IRX, telling it to load subsong (songNo). You can determine the number of subsongs by checking the values returned by AHX_LoadSong() and AHX_LoadSongBuffer();

Definition at line 102 of file ahx_rpc.c.

◆ AHX_ToggleOversampling()

int AHX_ToggleOversampling ( )
extern

AHX Toggle Oversampling

Switches oversampling on/off. Oversampling produces a smoother output sound but uses a lot more CPU power. It sounds nasty/slows down for a lot of songs - use with caution (or not at all)

Definition at line 129 of file ahx_rpc.c.