mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Hacky implementation of sceVaudio, whatever the point of that API is...
This commit is contained in:
1 parent
14d26141a5
commit
a75e85aa3c
2 files changed
+20
-8
No files matched your search
@@ -27,7 +27,6 @@
|
||||
// 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 the first of the 8 channels.
|
||||
|
||||
|
||||
AudioChannel chans[8];
|
||||
|
||||
// Enqueues the buffer pointer on the channel. If channel buffer queue is full (2 items?) will block until it isn't.
|
||||
|
||||
+20
-7
@@ -18,20 +18,33 @@
|
||||
#include "HLE.h"
|
||||
#include "FunctionWrappers.h"
|
||||
#include "sceVaudio.h"
|
||||
#include "sceAudio.h"
|
||||
#include "__sceAudio.h"
|
||||
|
||||
u32 sceVaudioOutputBlocking(int vol, u32 buffer) {
|
||||
ERROR_LOG(HLE, "UNIMPL sceVaudioOutputBlocking(%i, %08x)", vol, buffer);
|
||||
return 0;
|
||||
}
|
||||
// Ultra hacky Vaudio implementation. Not sure what the point of this API is.
|
||||
|
||||
u32 sceVaudioChReserve(int sampleCount, int freq, int format) {
|
||||
ERROR_LOG(HLE, "UNIMPL sceVaudioChReserve(%i, %i, %i)", sampleCount, freq, format);
|
||||
WARN_LOG(HLE, "HACK sceVaudioChReserve(%i, %i, %i)", sampleCount, freq, format);
|
||||
chans[0].reserved = true;
|
||||
chans[0].sampleCount = sampleCount;
|
||||
chans[0].format = format;
|
||||
__AudioSetOutputFrequency(freq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 sceVaudioChRelease() {
|
||||
ERROR_LOG(HLE, "UNIMPL sceVaudioChRelease(...)");
|
||||
return 0;
|
||||
WARN_LOG(HLE, "HACK sceVaudioChRelease(...)");
|
||||
if (!chans[0].reserved) {
|
||||
return SCE_ERROR_AUDIO_CHANNEL_NOT_RESERVED;
|
||||
} else {
|
||||
chans[0].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);
|
||||
}
|
||||
|
||||
u32 sceVaudioSetEffectType(int effectType, int vol) {
|
||||
|
||||
Reference in new issue
Block a user