mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-04 04:07:08 +00:00
Mp3: Fix errors on sceMp3NotifyAddStreamData.
This commit is contained in:
parent
5b9a3e6ca8
commit
709c9dc93c
@ -495,15 +495,16 @@ static int sceMp3GetInfoToAddStreamData(u32 mp3, u32 dstPtr, u32 towritePtr, u32
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int sceMp3NotifyAddStreamData(u32 mp3, int size) {
|
static int sceMp3NotifyAddStreamData(u32 mp3, int size) {
|
||||||
DEBUG_LOG(ME, "sceMp3NotifyAddStreamData(%08X, %i)", mp3, size);
|
|
||||||
|
|
||||||
AuCtx *ctx = getMp3Ctx(mp3);
|
AuCtx *ctx = getMp3Ctx(mp3);
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
ERROR_LOG(ME, "%s: bad mp3 handle %08x", __FUNCTION__, mp3);
|
if (mp3 >= MP3_MAX_HANDLES)
|
||||||
return -1;
|
return hleLogError(ME, ERROR_MP3_INVALID_HANDLE, "invalid handle");
|
||||||
|
return hleLogError(ME, ERROR_MP3_UNRESERVED_HANDLE, "unreserved handle");
|
||||||
|
} else if (ctx->AuBuf == 0) {
|
||||||
|
return hleLogError(ME, ERROR_MP3_UNRESERVED_HANDLE, "incorrect handle type");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx->AuNotifyAddStreamData(size);
|
return hleLogSuccessI(ME, ctx->AuNotifyAddStreamData(size));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sceMp3ReleaseMp3Handle(u32 mp3) {
|
static int sceMp3ReleaseMp3Handle(u32 mp3) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user