Lameguy64 / PSn00bSDK

The most powerful open source SDK for the PS1 (as far as open source PS1 SDKs go). Not recommended for beginner use.
Other
819 stars 66 forks source link

error: 'SS_SERIAL_A' undeclared #40

Closed ElvargThemSelf closed 1 year ago

ElvargThemSelf commented 2 years ago

I'm trying to compile a xalib under PSN00BSDK, and I get this following error during compilation:

/usr/local/mipsel-psx-elf/bin/mipsel-psx-elf-gcc -g -msoft-float -march=r3000 -mtune=r3000 -mabi=32  -mdivide
-breaks -O2 -ffreestanding -fno-builtin -nostdlib -fdata-sections -ffunction-sections -fsigned-char -fno-strict-
                -G0 -mno-abicalls -mno-gpopt -I../include -I../lzp -c xa.c -o build/xa.o 
xa.c: In function 'XAcallback':
xa.c:29:5: warning: implicit declaration of function 'SsSetSerialVol' [-Wimplicit-function-declaration]
   29 |     SsSetSerialVol(SS_SERIAL_A, 0, 0);
      |     ^~~~~~~~~~~~~~
xa.c:29:20: error: 'SS_SERIAL_A' undeclared (first use in this function)
   29 |     SsSetSerialVol(SS_SERIAL_A, 0, 0);
      |                    ^~~~~~~~~~~
xa.c:29:20: note: each undeclared identifier is reported only once for each function it appears in
xa.c: In function 'XAsetup':
xa.c:86:16: warning: assignment to 'CdlCB' {aka 'void (*)(int,  unsigned char *)'} from 'long int' makes pointer
 from integer without a cast [-Wint-conversion]
   86 |  XAoldCallback = CdReadyCallback((CdlCB)XAcallback);
      |                ^
xa.c: In function 'XAremove':
xa.c:105:17: error: 'SS_SERIAL_A' undeclared (first use in this function)
  105 |  SsSetSerialVol(SS_SERIAL_A, 0, 0);
      |                 ^~~~~~~~~~~
xa.c: In function 'XAsetVolume':
xa.c:126:17: error: 'SS_SERIAL_A' undeclared (first use in this function)
  126 |  SsSetSerialVol(SS_SERIAL_A, volleft, volright);
      |                 ^~~~~~~~~~~
xa.c: In function 'XAplayChannel':
xa.c:139:19: error: 'SS_SERIAL_A' undeclared (first use in this function)
  139 |  SsSetSerialVol  (SS_SERIAL_A, 0, 0);
      |                   ^~~~~~~~~~~
make[1]: *** [makefile:42: build/xa.o] Error 1

I need some serious help

Lameguy64 commented 2 years ago

PSn00bSDK's psxspu does not support the SS sound subsystem as libspu given away by SsSetSerialVol being undeclared at compile time. In fact what is currently implemented in psxspu is pretty half-baked and frankly quite limited.

ElvargThemSelf commented 2 years ago

Ok, but are you planning to implement them anytime in the near future?

spicyjpeg commented 1 year ago

The official SDK's libgs and libsnd are high-level libraries that make heavy use of proprietary file formats and are well out of the scope of PSn00bSDK. Implementing their API would be a waste of effort for the most part, as they are inefficient, bloated and poorly documented. A custom MIDI sequencer library might be added in the future instead, but there are currently no plans to do so.