mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-06 21:47:44 +00:00
Don't overlay Vaudio with multichannel.
It seems to share living space with Output2/SRC.
This commit is contained in:
parent
8f81deae1c
commit
d4f3137a2c
@ -56,7 +56,7 @@ void AudioChannel::clear()
|
||||
// There's a second Audio api called Audio2 that only has one channel, I guess the 8 channel api was overkill.
|
||||
// We simply map it to an extra channel after the 8 channels, since they can be used concurrently.
|
||||
|
||||
// The extra channel is for SRC/Output2.
|
||||
// The extra channel is for SRC/Output2/Vaudio.
|
||||
AudioChannel chans[PSP_AUDIO_CHANNEL_MAX + 1];
|
||||
|
||||
// Enqueues the buffer pointer on the channel. If channel buffer queue is full (2 items?) will block until it isn't.
|
||||
|
@ -46,6 +46,7 @@ const int PSP_AUDIO_CHANNEL_MAX = 8;
|
||||
|
||||
const int PSP_AUDIO_CHANNEL_SRC = 8;
|
||||
const int PSP_AUDIO_CHANNEL_OUTPUT2 = 8;
|
||||
const int PSP_AUDIO_CHANNEL_VAUDIO = 8;
|
||||
|
||||
struct AudioChannelWaitInfo
|
||||
{
|
||||
@ -83,7 +84,7 @@ struct AudioChannel
|
||||
void clear();
|
||||
};
|
||||
|
||||
// The extra channel is for SRC/Output2.
|
||||
// The extra channel is for SRC/Output2/Vaudio (who all share, apparently.)
|
||||
extern AudioChannel chans[PSP_AUDIO_CHANNEL_MAX + 1];
|
||||
|
||||
void Register_sceAudio();
|
||||
|
@ -25,26 +25,26 @@
|
||||
|
||||
u32 sceVaudioChReserve(int sampleCount, int freq, int format) {
|
||||
WARN_LOG(HLE, "HACK sceVaudioChReserve(%i, %i, %i)", sampleCount, freq, format);
|
||||
chans[0].reserved = true;
|
||||
chans[0].sampleCount = sampleCount;
|
||||
chans[0].format = format;
|
||||
chans[PSP_AUDIO_CHANNEL_VAUDIO].reserved = true;
|
||||
chans[PSP_AUDIO_CHANNEL_VAUDIO].sampleCount = sampleCount;
|
||||
chans[PSP_AUDIO_CHANNEL_VAUDIO].format = format;
|
||||
__AudioSetOutputFrequency(freq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sceVaudioChRelease() {
|
||||
WARN_LOG(HLE, "HACK sceVaudioChRelease(...)");
|
||||
if (!chans[0].reserved) {
|
||||
if (!chans[PSP_AUDIO_CHANNEL_VAUDIO].reserved) {
|
||||
return SCE_ERROR_AUDIO_CHANNEL_NOT_RESERVED;
|
||||
} else {
|
||||
chans[0].reserved = false;
|
||||
chans[PSP_AUDIO_CHANNEL_VAUDIO].reserved = false;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sceVaudioOutputBlocking(int vol, u32 buffer) {
|
||||
WARN_LOG(HLE, "HACK sceVaudioOutputBlocking(%i, %08x)", vol, buffer);
|
||||
return __AudioEnqueue(chans[0], 0, true);
|
||||
return __AudioEnqueue(chans[PSP_AUDIO_CHANNEL_VAUDIO], 0, true);
|
||||
}
|
||||
|
||||
u32 sceVaudioSetEffectType(int effectType, int vol) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user