mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
cellSysutilBgmPlayback fix
This commit is contained in:
parent
458322e548
commit
5ef3b80596
2 changed files with 52 additions and 34 deletions
|
@ -257,23 +257,38 @@ struct CellAudioInDeviceConfiguration
|
|||
u8 reserved[31];
|
||||
};
|
||||
|
||||
enum CellBgmPlaybackStatusState
|
||||
enum CellSysutilBgmPlaybackStatusState
|
||||
{
|
||||
CELL_BGMPLAYBACK_STATUS_PLAY = 0,
|
||||
CELL_BGMPLAYBACK_STATUS_STOP = 1
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_PLAY = 0,
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_STOP = 1
|
||||
};
|
||||
|
||||
enum CellBgmPlaybackStatusEnabled
|
||||
enum CellSysutilBgmPlaybackStatusEnabled
|
||||
{
|
||||
CELL_BGMPLAYBACK_STATUS_ENABLE = 0,
|
||||
CELL_BGMPLAYBACK_STATUS_DISABLE = 1
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_ENABLE = 0,
|
||||
CELL_SYSUTIL_BGMPLAYBACK_STATUS_DISABLE = 1
|
||||
};
|
||||
|
||||
struct CellBgmPlaybackStatus
|
||||
struct CellSysutilBgmPlaybackStatus
|
||||
{
|
||||
u8 playbackState;
|
||||
u8 enabled;
|
||||
u8 playerState;
|
||||
u8 enableState;
|
||||
char contentId[16];
|
||||
u8 fadeRatio;
|
||||
u8 currentFadeRatio;
|
||||
char reserved[13];
|
||||
};
|
||||
|
||||
struct CellSysutilBgmPlaybackStatus2
|
||||
{
|
||||
u8 playerState;
|
||||
char reserved[7];
|
||||
};
|
||||
|
||||
struct CellSysutilBgmPlaybackExtraParam
|
||||
{
|
||||
be_t<s32> systemBgmFadeInTime;
|
||||
be_t<s32> systemBgmFadeOutTime;
|
||||
be_t<s32> gameBgmFadeInTime;
|
||||
be_t<s32> gameBgmFadeOutTime;
|
||||
char reserved[8];
|
||||
};
|
||||
|
|
|
@ -919,22 +919,24 @@ int cellHddGameCheck(u32 version, u32 dirName_addr, u32 errDialog, mem_func_ptr_
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
bool bgm_playback_enabled = false;
|
||||
bool bgm_playback_enabled = true;
|
||||
|
||||
int cellSysutilEnableBgmPlayback()
|
||||
{
|
||||
cellSysutil->Warning("cellSysutilEnableBgmPlayback()");
|
||||
|
||||
// TODO
|
||||
bgm_playback_enabled = true;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSysutilEnableBgmPlaybackEx()
|
||||
int cellSysutilEnableBgmPlaybackEx(mem_ptr_t<CellSysutilBgmPlaybackExtraParam> param)
|
||||
{
|
||||
cellSysutil->Warning("cellSysutilEnableBgmPlaybackEx()");
|
||||
cellSysutil->Warning("cellSysutilEnableBgmPlaybackEx(param_addr=0x%x)", param.GetAddr());
|
||||
|
||||
bgm_playback_enabled = true;
|
||||
// TODO
|
||||
bgm_playback_enabled = true;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -943,42 +945,43 @@ int cellSysutilDisableBgmPlayback()
|
|||
{
|
||||
cellSysutil->Warning("cellSysutilDisableBgmPlayback()");
|
||||
|
||||
// TODO
|
||||
bgm_playback_enabled = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSysutilDisableBgmPlaybackEx()
|
||||
int cellSysutilDisableBgmPlaybackEx(mem_ptr_t<CellSysutilBgmPlaybackExtraParam> param)
|
||||
{
|
||||
cellSysutil->Warning("cellSysutilDisableBgmPlaybackEx()");
|
||||
|
||||
bgm_playback_enabled = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSysutilGetBgmPlaybackStatus(mem_ptr_t<CellBgmPlaybackStatus> status)
|
||||
{
|
||||
cellSysutil->Warning("cellSysutilGetBgmPlaybackStatus(status=0x%x)", status.GetAddr());
|
||||
cellSysutil->Warning("cellSysutilDisableBgmPlaybackEx(param_addr=0x%x)", param.GetAddr());
|
||||
|
||||
// TODO
|
||||
status->playbackState = CELL_BGMPLAYBACK_STATUS_STOP;
|
||||
status->enabled = bgm_playback_enabled ? CELL_BGMPLAYBACK_STATUS_ENABLE : CELL_BGMPLAYBACK_STATUS_DISABLE;
|
||||
status->fadeRatio = 0; // volume ratio
|
||||
bgm_playback_enabled = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSysutilGetBgmPlaybackStatus(mem_ptr_t<CellSysutilBgmPlaybackStatus> status)
|
||||
{
|
||||
cellSysutil->Log("cellSysutilGetBgmPlaybackStatus(status_addr=0x%x)", status.GetAddr());
|
||||
|
||||
// TODO
|
||||
status->playerState = CELL_SYSUTIL_BGMPLAYBACK_STATUS_STOP;
|
||||
status->enableState = bgm_playback_enabled ? CELL_SYSUTIL_BGMPLAYBACK_STATUS_ENABLE : CELL_SYSUTIL_BGMPLAYBACK_STATUS_DISABLE;
|
||||
status->currentFadeRatio = 0; // current volume ratio (0%)
|
||||
memset(status->contentId, 0, sizeof(status->contentId));
|
||||
memset(status->reserved, 0, sizeof(status->reserved));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSysutilGetBgmPlaybackStatus2(mem_ptr_t<CellBgmPlaybackStatus> status2)
|
||||
int cellSysutilGetBgmPlaybackStatus2(mem_ptr_t<CellSysutilBgmPlaybackStatus2> status2)
|
||||
{
|
||||
cellSysutil->Warning("cellSysutilGetBgmPlaybackStatus2(status=0x%x)", status2.GetAddr());
|
||||
cellSysutil->Log("cellSysutilGetBgmPlaybackStatus2(status2_addr=0x%x)", status2.GetAddr());
|
||||
|
||||
// TODO
|
||||
status2->playbackState = CELL_BGMPLAYBACK_STATUS_STOP;
|
||||
status2->enabled = bgm_playback_enabled ? CELL_BGMPLAYBACK_STATUS_ENABLE : CELL_BGMPLAYBACK_STATUS_DISABLE;
|
||||
status2->fadeRatio = 0; // volume ratio
|
||||
memset(status2->contentId, 0, sizeof(status2->contentId));
|
||||
status2->playerState = CELL_SYSUTIL_BGMPLAYBACK_STATUS_STOP;
|
||||
memset(status2->reserved, 0, sizeof(status2->reserved));
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue