forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Audio Compling Problems (lightmp3 related kinda)

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Shapyi



Joined: 25 Apr 2005
Posts: 95

PostPosted: Fri Jan 09, 2009 7:29 am    Post subject: Audio Compling Problems (lightmp3 related kinda) Reply with quote

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:
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:
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?
Back to top
View user's profile Send private message
NoEffex



Joined: 27 Nov 2008
Posts: 108

PostPosted: Fri Jan 09, 2009 9:01 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
psPea



Joined: 01 Sep 2007
Posts: 64

PostPosted: Fri Jan 09, 2009 9:59 am    Post subject: Reply with quote

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);
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Shapyi



Joined: 25 Apr 2005
Posts: 95

PostPosted: Fri Jan 09, 2009 10:01 am    Post subject: Reply with quote

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:
sceAudio_38553111 is now sceAudioSRCChReserve
sceAudio_5C37C0AE is now sceAudioSRCChRelease
sceAudio_E0727056 is now sceAudioSRCOutputBlocking


Thanks for the help guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group