mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Init ctx->mp3DecodedBytes/mp3SumDecodedSamples/mp3LoopNum
This commit is contained in:
parent
a4e9ca40e4
commit
81887cead3
1 changed files with 6 additions and 4 deletions
|
@ -323,9 +323,9 @@ u32 sceMp3ReserveMp3Handle(u32 mp3Addr) {
|
|||
|
||||
memset(ctx, 0, sizeof(Mp3Context));
|
||||
|
||||
if (!Memory::IsValidAddress(mp3Addr))
|
||||
WARN_LOG_REPORT(ME, "sceMp3ReserveMp3Handle(%08x) invalid address",mp3Addr)
|
||||
else {
|
||||
if (!Memory::IsValidAddress(mp3Addr)) {
|
||||
WARN_LOG_REPORT(ME, "sceMp3ReserveMp3Handle(%08x): invalid address", mp3Addr)
|
||||
} else {
|
||||
ctx->mp3StreamStart = Memory::Read_U64(mp3Addr);
|
||||
ctx->mp3StreamEnd = Memory::Read_U64(mp3Addr + 8);
|
||||
ctx->mp3Buf = Memory::Read_U32(mp3Addr + 16);
|
||||
|
@ -335,7 +335,9 @@ u32 sceMp3ReserveMp3Handle(u32 mp3Addr) {
|
|||
}
|
||||
ctx->readPosition = ctx->mp3StreamStart;
|
||||
ctx->mp3MaxSamples = ctx->mp3PcmBufSize / 4 ;
|
||||
|
||||
ctx->mp3DecodedBytes = 0;
|
||||
ctx->mp3SumDecodedSamples = 0;
|
||||
ctx->mp3LoopNum = -1;
|
||||
ctx->mp3Channels = 2;
|
||||
ctx->mp3Bitrate = 128;
|
||||
ctx->mp3SamplingRate = 44100;
|
||||
|
|
Loading…
Add table
Reference in a new issue