pspmp3.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspmp3.h - Prototypes for the sceMp3 library
00007  *
00008  * Copyright (c) 2008 David Perry <tias_dp@hotmail.com>
00009  * Copyright (c) 2008 Alexander Berl <raphael@fx-world.org>
00010  *
00011  * $Id: $
00012  */
00013 
00014 #ifndef __SCELIBMP3_H__
00015 #define __SCELIBMP3_H__
00016 
00017 #include <psptypes.h>
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023 typedef struct SceMp3InitArg {
00025         SceUInt32       mp3StreamStart;
00027         SceUInt32       unk1;
00029         SceUInt32       mp3StreamEnd;
00031         SceUInt32       unk2;
00033         SceVoid*        mp3Buf;
00035         SceInt32        mp3BufSize;
00037         SceVoid*        pcmBuf;
00039         SceInt32        pcmBufSize;
00040 } SceMp3InitArg;
00041 
00049 SceInt32 sceMp3ReserveMp3Handle(SceMp3InitArg* args);
00050 
00058 SceInt32 sceMp3ReleaseMp3Handle(SceInt32 handle);
00059 
00065 SceInt32 sceMp3InitResource();
00066 
00072 SceInt32 sceMp3TermResource();
00073 
00081 SceInt32 sceMp3Init(SceInt32 handle);
00082 
00091 SceInt32 sceMp3Decode(SceInt32 handle, SceShort16** dst);
00092 
00103 SceInt32 sceMp3GetInfoToAddStreamData(SceInt32 handle, SceUChar8** dst, SceInt32* towrite, SceInt32* srcpos);
00104 
00113 SceInt32 sceMp3NotifyAddStreamData(SceInt32 handle, SceInt32 size);
00114 
00122 SceInt32 sceMp3CheckStreamDataNeeded(SceInt32 handle);
00123 
00132 SceInt32 sceMp3SetLoopNum(SceInt32 handle, SceInt32 loop);
00133 
00141 SceInt32 sceMp3GetLoopNum(SceInt32 handle);
00142 
00150 SceInt32 sceMp3GetSumDecodedSample(SceInt32 handle);
00151 
00159 SceInt32 sceMp3GetMaxOutputSample(SceInt32 handle);
00160 
00168 SceInt32 sceMp3GetSamplingRate(SceInt32 handle);
00169 
00177 SceInt32 sceMp3GetBitRate(SceInt32 handle);
00178 
00186 SceInt32 sceMp3GetMp3ChannelNum(SceInt32 handle);
00187 
00195 SceInt32 sceMp3ResetPlayPosition(SceInt32 handle); 
00196 
00197 
00198 #ifdef __cplusplus
00199 }
00200 #endif
00201 
00202 #endif