Audio Compling Problems (lightmp3 related kinda)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Shapyi
Posts: 95
Joined: Mon Apr 25, 2005 9:31 am

Audio Compling Problems (lightmp3 related kinda)

Post by Shapyi »

I am trying to put the hardware playing portion of lightmp3 into a standalone library which I can use in other homebrew applications. When I try to compile I get these errors:

Code: Select all

psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150   -c -o mp3playerME.o mp3playerME.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150   -c -o clock.o clock.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150   -c -o id3.o id3.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150   -c -o player.o player.c
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150  -L. -L/usr/local/pspdev/psp/sdk/lib   mp3playerME.o clock.o id3.o player.o
main.o -lpspaudiolib -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudio -lm -lstdc+
+ -lmad -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet
_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o als
ample.elf
player.o: In function `audioOutput':
player.c:(.text+0x200): undefined reference to `sceAudio_E0727056'
player.o: In function `releaseAudio':
player.c:(.text+0x220): undefined reference to `sceAudio_5C37C0AE'
player.o: In function `setAudioFrequency':
player.c:(.text+0x230): undefined reference to `sceAudio_38553111'
collect2: ld returned 1 exit status
make: *** [alsample.elf] Error 1
Here is my make file:

Code: Select all

TARGET = alsample
OBJS = mp3playerME.o clock.o id3.o player.o main.o

INCDIR = 
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR = 
LDFLAGS = 
LIBS = -lpspaudiolib -lpsppower -lpspmpeg -lpspaudiocodec -lpspaudio -lm -lstdc++ -lmad

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Audiolib Wave Generator

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Right now it isn't a library but it will be. I recently upgraded my toolchain with the latest SVN release and I searched the forums. Any ideas?
NoEffex
Posts: 106
Joined: Thu Nov 27, 2008 6:48 am

Post by NoEffex »

if it's not in the pspsdk library, it's probably in a .S file in the lightmp3 source. You'd just add it to your objects, and if it has a header, use that, else you forgot to include something.
Programming with:
Geany + Latest PSPSDK from svn
psPea
Posts: 60
Joined: Sat Sep 01, 2007 12:51 pm

Post by psPea »

i believe those 3 indefined references refer to these 3 functions you'll have to figure out which is which, which shouldn't be difficult since they all have different prototypes

int sceAudioSRCChReserve(int samplecount, int freq, int channels);
int sceAudioSRCChRelease(void);
int sceAudioSRCOutputBlocking(int vol, void *buf);
Shapyi
Posts: 95
Joined: Mon Apr 25, 2005 9:31 am

Post by Shapyi »

I was trying to compile a version of it from more than a year ago and my SDK is now recent. I fixed the problems.

Here is the solution for anyone who has the same problem:

Code: Select all

sceAudio_38553111 is now sceAudioSRCChReserve
sceAudio_5C37C0AE is now sceAudioSRCChRelease
sceAudio_E0727056 is now sceAudioSRCOutputBlocking
Thanks for the help guys.
Post Reply