hrydgard/ppsspp — pull request #5993 by sum2012 (2014-05-01 01:10:01+00:00)
Title: Fix _AtracDecodeData

Fix #3552 ,Fix #5985
![1](https://cloud.githubusercontent.com/assets/2177532/2849130/47052f92-d0cd-11e3-9eea-1213b09dd87c.jpg)

PS:Match JPCSPTrace log in Yu Gi Oh Tag Force 1 :
https://gist.github.com/sum2012/188e51a1458d69f7f3f3

I am c++ noob,Please help to solve
6>sceAtrac.obj : warning LNK4006: "public: int __cdecl Atrac::Analyze(void)" (?Analyze@Atrac@@QEAAHXZ) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "void __cdecl Register_sceAtrac3plus(void)" (?Register_sceAtrac3plus@@YAXXZ) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl _AtracAddStreamData(int,unsigned char *,unsigned int)" (?_AtracAddStreamData@@YAIHPEAEI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl _AtracDecodeData(int,unsigned char *,unsigned int *,unsigned int *,int *)" (?_AtracDecodeData@@YAIHPEAEPEAI1PEAH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "void __cdecl _AtracGenarateContext(struct Atrac *,struct SceAtracId *)" (?_AtracGenarateContext@@YAXPEAUAtrac@@PEAUSceAtracId@@@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl _AtracGetIDByContext(unsigned int)" (?_AtracGetIDByContext@@YAHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl _AtracSetData(int,unsigned int,unsigned int,bool)" (?_AtracSetData@@YAHHII_N@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl _AtracSetData(struct Atrac *,unsigned int,unsigned int)" (?_AtracSetData@@YAHPEAUAtrac@@II@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "void __cdecl __AtracDoState(class PointerWrap &)" (?__AtracDoState@@YAXAEAVPointerWrap@@@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "void __cdecl __AtracInit(void)" (?__AtracInit@@YAXXZ) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl __AtracSetContext(struct Atrac *)" (?__AtracSetContext@@YAHPEAUAtrac@@@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "void __cdecl __AtracShutdown(void)" (?__AtracShutdown@@YAXXZ) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl __AtracUpdateOutputMode(struct Atrac *,int)" (?__AtracUpdateOutputMode@@YAHPEAUAtrac@@H@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl _sceAtracGetContextAddress(int)" (?_sceAtracGetContextAddress@@YAHH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl createAtrac(struct Atrac *,int)" (?createAtrac@@YAHPEAUAtrac@@H@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl deleteAtrac(int)" (?deleteAtrac@@YAHH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "struct Atrac * __cdecl getAtrac(int)" (?getAtrac@@YAPEAUAtrac@@H@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl getCodecType(unsigned int)" (?getCodecType@@YAHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "bool __cdecl initAT3Decoder(struct Atrac *,unsigned int)" (?initAT3Decoder@@YA_NPEAUAtrac@@I@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "bool __cdecl initAT3plusDecoder(struct Atrac *,unsigned int)" (?initAT3plusDecoder@@YA_NPEAUAtrac@@I@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracAddStreamData(int,unsigned int)" (?sceAtracAddStreamData@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracDecodeData(int,unsigned int,unsigned int,unsigned int,unsigned int)" (?sceAtracDecodeData@@YAIHIIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracEndEntry(void)" (?sceAtracEndEntry@@YAIXZ) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetAtracID(int)" (?sceAtracGetAtracID@@YAIH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetBitrate(int,unsigned int)" (?sceAtracGetBitrate@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetBufferInfoForResetting(int,int,unsigned int)" (?sceAtracGetBufferInfoForResetting@@YAIHHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetChannel(int,unsigned int)" (?sceAtracGetChannel@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetInternalErrorInfo(int,unsigned int)" (?sceAtracGetInternalErrorInfo@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetLoopStatus(int,unsigned int,unsigned int)" (?sceAtracGetLoopStatus@@YAIHII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetMaxSample(int,unsigned int)" (?sceAtracGetMaxSample@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetNextDecodePosition(int,unsigned int)" (?sceAtracGetNextDecodePosition@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetNextSample(int,unsigned int)" (?sceAtracGetNextSample@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracGetOutputChannel(int,unsigned int)" (?sceAtracGetOutputChannel@@YAHHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetRemainFrame(int,unsigned int)" (?sceAtracGetRemainFrame@@YAIHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetSecondBufferInfo(int,unsigned int,unsigned int)" (?sceAtracGetSecondBufferInfo@@YAIHII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetSoundSample(int,unsigned int,unsigned int,unsigned int)" (?sceAtracGetSoundSample@@YAIHIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracGetStreamDataInfo(int,unsigned int,unsigned int,unsigned int)" (?sceAtracGetStreamDataInfo@@YAIHIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracIsSecondBufferNeeded(int)" (?sceAtracIsSecondBufferNeeded@@YAHH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracLowLevelDecode(int,unsigned int,unsigned int,unsigned int,unsigned int)" (?sceAtracLowLevelDecode@@YAHHIIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracLowLevelInitDecoder(int,unsigned int)" (?sceAtracLowLevelInitDecoder@@YAHHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracReinit(int,int)" (?sceAtracReinit@@YAHHH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracReleaseAtracID(int)" (?sceAtracReleaseAtracID@@YAIH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracResetPlayPosition(int,int,int,int)" (?sceAtracResetPlayPosition@@YAIHHHH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracSetAA3DataAndGetID(unsigned int,int,int,unsigned int)" (?sceAtracSetAA3DataAndGetID@@YAHIHHI@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracSetAA3HalfwayBufferAndGetID(unsigned int,unsigned int,unsigned int)" (?sceAtracSetAA3HalfwayBufferAndGetID@@YAHIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracSetData(int,unsigned int,unsigned int)" (?sceAtracSetData@@YAIHII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracSetDataAndGetID(unsigned int,int)" (?sceAtracSetDataAndGetID@@YAHIH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracSetHalfwayBuffer(int,unsigned int,unsigned int,unsigned int)" (?sceAtracSetHalfwayBuffer@@YAIHIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracSetHalfwayBufferAndGetID(unsigned int,unsigned int,unsigned int)" (?sceAtracSetHalfwayBufferAndGetID@@YAHIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracSetLoopNum(int,int)" (?sceAtracSetLoopNum@@YAIHH@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracSetMOutData(int,unsigned int,unsigned int)" (?sceAtracSetMOutData@@YAIHII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracSetMOutDataAndGetID(unsigned int,unsigned int)" (?sceAtracSetMOutDataAndGetID@@YAHII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracSetMOutHalfwayBuffer(int,unsigned int,unsigned int,unsigned int)" (?sceAtracSetMOutHalfwayBuffer@@YAHHIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "int __cdecl sceAtracSetMOutHalfwayBufferAndGetID(unsigned int,unsigned int,unsigned int)" (?sceAtracSetMOutHalfwayBufferAndGetID@@YAHIII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracSetSecondBuffer(int,unsigned int,unsigned int)" (?sceAtracSetSecondBuffer@@YAIHII@Z) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "unsigned int __cdecl sceAtracStartEntry(void)" (?sceAtracStartEntry@@YAIXZ) already defined in sceUtility.obj; second definition ignored
6>sceAtrac.obj : warning LNK4006: "bool Use_PSP_AV_MODULE_ATRAC3PLUS" (?Use_PSP_AV_MODULE_ATRAC3PLUS@@3_NA) already defined in sceUtility.obj; second definition ignored

Please also help to check wether I do Staus code is correct.