fuzzzzy
06-02-2007, 10:20 PM
Ive tried a few things now, but i simply want to try and a play a test mp3 in the xmb. When I try it keeps on freezing. Here is my code:
#include <pspkernel.h>
#include <pspaudio.h>
#include <pspaudiolib.h>
#include <psppower.h>
#include "mp3player.h"
PSP_MODULE_INFO("voice", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
PSP_HEAP_SIZE_KB(1000);
int main_thread(SceSize args, void *argp) {
sceKernelDelayThread(30000000);
scePowerSetClockFrequency(333, 333, 166);
//pspAudioInit();
MP3_Init(1);
MP3_Load("ms0:/test.mp3");
MP3_Play();
while(MP3_EndOfStream() !=1) {}
MP3_Stop();
MP3_FreeTune();
sceKernelSleepThread();
return 0;
}
int module_start(SceSize args, void *argp) {
int thid;
/* Create a high priority thread */
thid = sceKernelCreateThread("voice", main_thread, 0x18, 0x1000, 0, NULL);//8, 64*1024, PSP_THREAD_ATTR_USER, NULL);
if(thid >= 0) sceKernelStartThread(thid, args, argp);
return 0;
}
And the makefile:
TARGET = voice
OBJS = mp3player.o main.o
BUILD_PRX = 1
INCDIR =
LIBDIR =
LIBS = -lmad -lpspaudiolib -lpspaudio -lpsppower
LDFLAGS =
CFLAGS = -Os -G0 -Wall -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
PSPSDK = $(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak
exports:
psp-build-exports -s exports.exp
Thnx in advance :) :) :) :) :) :) :) :) :) :)
#include <pspkernel.h>
#include <pspaudio.h>
#include <pspaudiolib.h>
#include <psppower.h>
#include "mp3player.h"
PSP_MODULE_INFO("voice", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
PSP_HEAP_SIZE_KB(1000);
int main_thread(SceSize args, void *argp) {
sceKernelDelayThread(30000000);
scePowerSetClockFrequency(333, 333, 166);
//pspAudioInit();
MP3_Init(1);
MP3_Load("ms0:/test.mp3");
MP3_Play();
while(MP3_EndOfStream() !=1) {}
MP3_Stop();
MP3_FreeTune();
sceKernelSleepThread();
return 0;
}
int module_start(SceSize args, void *argp) {
int thid;
/* Create a high priority thread */
thid = sceKernelCreateThread("voice", main_thread, 0x18, 0x1000, 0, NULL);//8, 64*1024, PSP_THREAD_ATTR_USER, NULL);
if(thid >= 0) sceKernelStartThread(thid, args, argp);
return 0;
}
And the makefile:
TARGET = voice
OBJS = mp3player.o main.o
BUILD_PRX = 1
INCDIR =
LIBDIR =
LIBS = -lmad -lpspaudiolib -lpspaudio -lpsppower
LDFLAGS =
CFLAGS = -Os -G0 -Wall -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
PSPSDK = $(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak
exports:
psp-build-exports -s exports.exp
Thnx in advance :) :) :) :) :) :) :) :) :) :)