libaac: fix compilation for me_wrapper / libatrac3plus

This commit is contained in:
Arthur Blot 2022-05-21 18:13:39 +02:00
parent 89b5930e02
commit 6e6e14daa0
2 changed files with 11 additions and 11 deletions

View File

@ -63,7 +63,7 @@ int sceAtracReinit(int numAT3Id, int numAT3plusId)
int i;
for (i = 0; i < numAT3Id + numAT3plusId; i++)
{
curId->codec.edramAddr = g_edramAddr;
curId->codec.edramAddr = (void *)g_edramAddr;
curId->codec.unk20 = 1;
if (i >= numAT3plusId)
{
@ -532,8 +532,8 @@ int sceAtracLowLevelDecode(int atracID, void *inBuf, int *arg2, void *outBuf, in
// 1234
if (sceAudiocodecDecode(&g_atracIds[atracID].codec, info->codec) != 0)
return 0x80630002;
*arg2 = g_atracIds[atracID].codec.unk28;
*arg4 = g_atracIds[atracID].codec.unk36;
*arg2 = g_atracIds[atracID].codec.readSample;
*arg4 = g_atracIds[atracID].codec.decodedSample;
return 0;
}
@ -729,7 +729,7 @@ int allocEdram(void)
ret = sceAudiocodecGetEDRAM(&g_atracIds[0].codec, 0x1001);
if (ret < 0)
return ret;
g_edramAddr = g_atracIds[0].codec.edramAddr;
g_edramAddr = (int)g_atracIds[0].codec.edramAddr;
return 0;
}

View File

@ -664,13 +664,13 @@ int sub_00001240(int codec, SceAudiocodecCodec *info, int error)
case 0x1000: //at3+
sceMeCore_driver_635397BB(106, &info->err, info->edramAddr);
if (error >= 256)
info->unk36 = 0;
info->decodedSample = 0;
return error < 256 ? -3 : -4;
case 0x1001://at3
sceMeCore_driver_635397BB(113, &info->err, info->edramAddr);
if (error >= 256)
info->unk36 = 0;
info->decodedSample = 0;
return error < 256 ? -3 : -4;
case 0x1002://mp3
@ -680,13 +680,13 @@ int sub_00001240(int codec, SceAudiocodecCodec *info, int error)
case 0x1003://aac
sceMeCore_driver_635397BB(145, &info->err, info->edramAddr);
if (error >= 256)
info->unk36 = 0;
info->decodedSample = 0;
return error < 256 ? -3 : -4;
case 0x1005://wma
sceMeCore_driver_635397BB(230, &info->err, info->edramAddr);
if (error < 0)
info->unk36 = 0;
info->decodedSample = 0;
return error >=0 ? -3 : -4;
}
return -1;
@ -699,7 +699,7 @@ int sceMeAudio_driver_9A9E21EE(u32 codec, SceAudiocodecCodec *info) //same -310C
return -2;
if (info->edramAddr == 0)
return SCE_ERROR_INVALID_POINTER;
info->unk36 = 0;
info->decodedSample = 0;
info->err = 0;
sceKernelDcacheWritebackInvalidateRange(info, 104);
int ret = 0;
@ -717,10 +717,10 @@ int sceMeAudio_driver_9A9E21EE(u32 codec, SceAudiocodecCodec *info) //same -310C
ret = sceMeCore_driver_FA398D71(140, info);
break;
case 0x1003:
ret = sceMeCore_driver_FA398D71(144, info->inBuf, &info->unk28, info->outBuf, &info->unk36, info->edramAddr);
ret = sceMeCore_driver_FA398D71(144, info->inBuf, &info->readSample, info->outBuf, &info->decodedSample, info->edramAddr);
break;
case 0x1005:
ret = sceMeCore_driver_FA398D71(229, info->inBuf, info->unk60, &info->unk64, info->outBuf, &info->unk36, &info->unk68, info->edramAddr);
ret = sceMeCore_driver_FA398D71(229, info->inBuf, info->unk60, &info->unk64, info->outBuf, &info->decodedSample, &info->unk68, info->edramAddr);
break;
default:
return -1;