Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Reverse of the sceMp3 library (from 5.50 firmware), by Geecko
- //
- #include "sceMp3.h"
- /* Typedefs */
- typedef struct
- {
- SceUInt32 used; // 0 (boolean)
- SceUInt32 unk[47];
- } SceMp3Handle;
- /* Global variables */
- static SceUInt32 unk0_struct[16]; // 0-63
- static SceUInt32 mp3_codec_struct[32]; // 64-191 FIXME size 65 ?
- static SceMp3Handle handle_struct[2]; // 192-575
- /* Internal functions */
- SceInt32 sub_00000000()
- {
- SceInt32 ret, v0;
- ret = sceAudiocodecCheckNeedMem(mp3_codec_struct, PSP_CODEC_MP3);
- if (ret < 0)
- {
- return ret;
- }
- v0 = (mp3_codec_struct[4] + 63) & 0xFFFFFFC0;
- unk0_struct[5] = v0;
- mp3_codec_struct[4] = 2*v0;
- ret = sceAudiocodecGetEDRAM(mp3_codec_struct, PSP_CODEC_MP3);
- if (ret < 0)
- {
- return ret;
- }
- mp3_codec_struct[4] = unk0_struct[3];
- return 0;
- }
- void sub_0000007C(void) // TODO
- {
- }
- void sub_0000014C(void) // TODO
- {
- }
- void sub_00000F04(int a0) // FIXME
- {
- }
- void sub_0000105C(void) // TODO
- {
- }
- void sub_00001108(void) // TODO
- {
- }
- void sub_0000118C(void) // TODO
- {
- }
- /* Main functions */
- SceInt32 sceMp3ReserveMp3Handle(SceMp3InitArg* args) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3ReleaseMp3Handle(SceUInt32 handle)
- {
- SceInt32 intr_state;
- if (handle >= 2)
- {
- return 0x80671001;
- }
- intr_state = sceKernelCpuSuspendIntr();
- if (handle_struct[handle].used > 0)
- {
- handle_struct[handle].used = 0;
- }
- sceKernelCpuResumeIntr(intr_state);
- return 0;
- }
- SceInt32 sceMp3InitResource() // TODO
- {
- return 0;
- }
- SceInt32 sceMp3TermResource()
- {
- SceInt32 i, ret;
- for (i=0; i<2; i++)
- {
- ret = sceMp3ReleaseMp3Handle(i);
- if (ret < 0)
- {
- return ret;
- }
- }
- ret = sub_00000F04(0);
- if (ret < 0)
- {
- return ret;
- }
- return 0;
- }
- SceInt32 sceMp3Init(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3Decode(SceUInt32 handle, SceShort16** dst) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3GetInfoToAddStreamData
- (SceUInt32 handle, SceUChar8** dst, SceInt32* size, SceInt32* pos) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3NotifyAddStreamData(SceUInt32 handle, SceInt32 size) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3CheckStreamDataNeeded(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3SetLoopNum(SceUInt32 handle, SceInt32 num) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3GetLoopNum(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3GetSumDecodedSample(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3GetMaxOutputSample(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3GetSamplingRate(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3GetBitRate(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3GetMp3ChannelNum(SceUInt32 handle) // TODO
- {
- return 0;
- }
- SceInt32 sceMp3ResetPlayPosition(SceUInt32 handle) // TODO
- {
- return 0;
- }
- /* Module functions */
- void module_start(void) // FIXME
- {
- }
- int module_stop()
- {
- SceInt32 ret = sceMp3TermResource();
- if (ret < 0)
- {
- return ret;
- }
- return 0;
- }
- // EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement