Remove audio rate throttling, it's better to frame rate throttle. Gets rid of the slowdown that audio caused.

This commit is contained in:
Henrik Rydgard committed 2012-11-23 10:35:28 +01:00
1 parent a385ec6056
commit f3aeadedfa
4 files changed
+70 -47

No files matched your search

+27 -13
View File
@@ -307,14 +307,17 @@ void sceAudioOutput2OutputBlocking()
chans[0].leftVolume = vol;
chans[0].rightVolume = vol;
chans[0].sampleAddress = dataPtr;
RETURN(chans[0].sampleCount);
__AudioEnqueue(chans[0], 0, true);
RETURN(0);
u32 retval = __AudioEnqueue(chans[0], 0, true);
if (retval < 0)
RETURN(retval);
}
void sceAudioOutput2ChangeLength()
u32 sceAudioOutput2ChangeLength(u32 sampleCount)
{
ERROR_LOG(HLE,"UNIMPL sceAudioOutput2ChangeLength");
RETURN(0);
WARN_LOG(HLE,"sceAudioOutput2ChangeLength(%i)");
chans[0].sampleCount = sampleCount;
return 0;
}
u32 sceAudioOutput2GetRestSample()
@@ -343,20 +346,22 @@ u32 sceAudioSetFrequency(u32 freq) {
const HLEFunction sceAudio[] =
{
{0x01562ba3, sceAudioOutput2Reserve, "sceAudioOutput2Reserve"}, // N+, Super Stardust Portable uses these
// Newer simplified single channel audio output. Presumably for games that use Atrac3
// directly from Sas instead of playing it on a separate audio channel.
{0x01562ba3, sceAudioOutput2Reserve, "sceAudioOutput2Reserve"},
{0x2d53f36e, sceAudioOutput2OutputBlocking, "sceAudioOutput2OutputBlocking"},
{0x63f2889c, sceAudioOutput2ChangeLength, "sceAudioOutput2ChangeLength"},
{0x63f2889c, WrapU_U<sceAudioOutput2ChangeLength>, "sceAudioOutput2ChangeLength"},
{0x647cef33, WrapU_V<sceAudioOutput2GetRestSample>, "sceAudioOutput2GetRestSample"},
{0x43196845, sceAudioOutput2Release, "sceAudioOutput2Release"},
{0x38553111, 0, "sceAudioSRCChReserve"},
{0x5C37C0AE, 0, "sceAudioSRCChRelease"},
{0x80F1F7E0, sceAudioInit, "sceAudioInit"},
{0x80F1F7E0, sceAudioInit, "sceAudioInit"},
{0x210567F7, sceAudioEnd, "sceAudioEnd"},
{0x927AC32B, 0, "sceAudioSetVolumeOffset"},
{0xA2BEAA6C, WrapU_U<sceAudioSetFrequency>, "sceAudioSetFrequency"},
{0xE0727056, 0, "sceAudioSRCOutputBlocking"},
{0x8c1009b2, WrapU_UUU<sceAudioOutput>, "sceAudioOutput"},
{0x927AC32B, 0, "sceAudioSetVolumeOffset"},
// The oldest and standard audio interface. Supports 8 channels, most games use 1-2.
{0x8c1009b2, WrapU_UUU<sceAudioOutput>, "sceAudioOutput"},
{0x136CAF51, WrapV_UUU<sceAudioOutputBlocking>, "sceAudioOutputBlocking"},
{0xE2D56B2D, WrapU_UUUU<sceAudioOutputPanned>, "sceAudioOutputPanned"},
{0x13F592BC, WrapV_UUUU<sceAudioOutputPannedBlocking>, "sceAudioOutputPannedBlocking"}, //(u32, u32, u32, void *)Output sound, blocking
@@ -367,8 +372,17 @@ const HLEFunction sceAudio[] =
{0xCB2E439E, WrapU_UU<sceAudioSetChannelDataLen>, "sceAudioSetChannelDataLen"}, //(u32, u32)
{0x95FD0C2D, WrapU_UU<sceAudioChangeChannelConfig>, "sceAudioChangeChannelConfig"},
{0xB7E1D8E7, WrapU_UUU<sceAudioChangeChannelVolume>, "sceAudioChangeChannelVolume"},
// I guess these are like the others but do sample rate conversion?
{0x38553111, 0, "sceAudioSRCChReserve"},
{0x5C37C0AE, 0, "sceAudioSRCChRelease"},
{0xE0727056, 0, "sceAudioSRCOutputBlocking"},
// Never seen these used
{0x41efade7, 0, "sceAudioOneshotOutput"},
{0xB61595C0, 0, "sceAudioLoopbackTest"},
// Microphone interface
{0x7de61688, 0, "sceAudioInputInit"},
{0xE926D3FB, 0, "sceAudioInputInitEx"},
{0x6d4bec68, 0, "sceAudioInput"},