Better returns for XAudio.

This commit is contained in:
Ben Vanik 2014-01-13 20:50:56 -08:00
parent e1bb5bc860
commit d73aa419d1
2 changed files with 4 additions and 2 deletions

View File

@ -40,6 +40,8 @@ using PPCContext = alloy::frontend::ppc::PPCContext;
#define SHIM_SET_MEM_16(a, v) (*(uint16_t*)SHIM_MEM_ADDR(a)) = XESWAP16(v)
#define SHIM_SET_MEM_32(a, v) (*(uint32_t*)SHIM_MEM_ADDR(a)) = XESWAP32(v)
#define SHIM_SET_MEM_64(a, v) (*(uint64_t*)SHIM_MEM_ADDR(a)) = XESWAP64(v)
#define SHIM_SET_MEM_F32(a, v) (*(float*)SHIM_MEM_ADDR(a)) = XESWAPF32BE(v)
#define SHIM_SET_MEM_F64(a, v) (*(double*)SHIM_MEM_ADDR(a)) = XESWAPF64BE(v)
#define SHIM_GPR_16(n) (uint16_t)(ppc_state->r[n])
#define SHIM_GPR_32(n) (uint32_t)(ppc_state->r[n])

View File

@ -60,7 +60,7 @@ SHIM_CALL XAudioGetSpeakerConfig_shim(
"XAudioGetSpeakerConfig(%.8X)",
config_ptr);
SHIM_SET_MEM_32(config_ptr, 1);
SHIM_SET_MEM_32(config_ptr, 0x00010001);
SHIM_SET_RETURN(X_ERROR_SUCCESS);
}
@ -95,7 +95,7 @@ SHIM_CALL XAudioGetVoiceCategoryVolume_shim(
unk, out_ptr);
// Expects a floating point single. Volume %?
SHIM_SET_MEM_32(out_ptr, 0);
SHIM_SET_MEM_F32(out_ptr, 1.0f);
SHIM_SET_RETURN(X_ERROR_SUCCESS);
}