Try to get rid of SIZE_32 macro

This commit is contained in:
Nekotekina 2018-09-03 18:46:14 +03:00
parent 7bccdbf157
commit ce4c4696dd
18 changed files with 82 additions and 87 deletions

View file

@ -857,7 +857,7 @@ s32 cellAdecGetPcmItem(u32 handle, vm::pptr<CellAdecPcmItem> pcmItem)
}
pcm->pcmHandle = 0; // ???
pcm->pcmAttr.bsiInfo_addr = pcm.addr() + SIZE_32(CellAdecPcmItem);
pcm->pcmAttr.bsiInfo_addr = pcm.addr() + u32{sizeof(CellAdecPcmItem)};
pcm->startAddr = 0x00000312; // invalid address (no output)
pcm->size = af.size;
pcm->status = CELL_OK;
@ -869,10 +869,10 @@ s32 cellAdecGetPcmItem(u32 handle, vm::pptr<CellAdecPcmItem> pcmItem)
if (adecIsAtracX(adec->type))
{
auto atx = vm::ptr<CellAdecAtracXInfo>::make(pcm.addr() + SIZE_32(CellAdecPcmItem));
auto atx = vm::ptr<CellAdecAtracXInfo>::make(pcm.addr() + u32{sizeof(CellAdecPcmItem)});
atx->samplingFreq = frame->sample_rate;
atx->nbytes = frame->nb_samples * SIZE_32(float);
atx->nbytes = frame->nb_samples * u32{sizeof(float)};
if (frame->channels == 1)
{
atx->channelConfigIndex = 1;
@ -897,7 +897,7 @@ s32 cellAdecGetPcmItem(u32 handle, vm::pptr<CellAdecPcmItem> pcmItem)
}
else if (adec->type == CELL_ADEC_TYPE_MP3)
{
auto mp3 = vm::ptr<CellAdecMP3Info>::make(pcm.addr() + SIZE_32(CellAdecPcmItem));
auto mp3 = vm::ptr<CellAdecMP3Info>::make(pcm.addr() + u32{sizeof(CellAdecPcmItem)});
// TODO
memset(mp3.get_ptr(), 0, sizeof(CellAdecMP3Info));