mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 13:27:58 +03:00
Stub audio functions
This commit is contained in:
parent
db51236165
commit
c20aadac60
7 changed files with 62 additions and 22 deletions
|
@ -32,6 +32,10 @@ set(SWA_GPU_CXX_SOURCES
|
|||
"gpu/window.cpp"
|
||||
)
|
||||
|
||||
set(SWA_APU_CXX_SOURCES
|
||||
"apu/audio.cpp"
|
||||
)
|
||||
|
||||
set(SWA_HID_CXX_SOURCES
|
||||
"hid/hid.cpp"
|
||||
)
|
||||
|
@ -42,6 +46,7 @@ set(SWA_CXX_SOURCES
|
|||
${SWA_KERNEL_CXX_SOURCES}
|
||||
${SWA_CPU_CXX_SOURCES}
|
||||
${SWA_GPU_CXX_SOURCES}
|
||||
${SWA_APU_CXX_SOURCES}
|
||||
${SWA_HID_CXX_SOURCES}
|
||||
)
|
||||
|
||||
|
|
21
UnleashedRecomp/apu/audio.cpp
Normal file
21
UnleashedRecomp/apu/audio.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include <stdafx.h>
|
||||
#include "audio.h"
|
||||
#include "cpu/code_cache.h"
|
||||
|
||||
#define AUDIO_DRIVER_KEY (uint32_t)('DAUD')
|
||||
|
||||
uint32_t XAudioRegisterRenderDriverClient(XLPDWORD callback, XLPDWORD driver)
|
||||
{
|
||||
*driver = AUDIO_DRIVER_KEY;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t XAudioUnregisterRenderDriverClient(DWORD driver)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t XAudioSubmitRenderDriverFrame(XLPDWORD callback, XLPDWORD driver)
|
||||
{
|
||||
return 0;
|
||||
}
|
5
UnleashedRecomp/apu/audio.h
Normal file
5
UnleashedRecomp/apu/audio.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
SWA_API uint32_t XAudioRegisterRenderDriverClient(XLPDWORD callback, XLPDWORD driver);
|
||||
SWA_API uint32_t XAudioUnregisterRenderDriverClient(DWORD driver);
|
||||
SWA_API uint32_t XAudioSubmitRenderDriverFrame(XLPDWORD callback, XLPDWORD driver);
|
1
UnleashedRecomp/apu/driver/xaudio_driver.h
Normal file
1
UnleashedRecomp/apu/driver/xaudio_driver.h
Normal file
|
@ -0,0 +1 @@
|
|||
#pragma once
|
|
@ -35,3 +35,8 @@ void* CodeCache::Find(uint32_t guest) const
|
|||
{
|
||||
return *reinterpret_cast<void**>(bucket + static_cast<uint64_t>(guest) * 2);
|
||||
}
|
||||
|
||||
PPCFunc* KeFindHostFunction(uint32_t guest)
|
||||
{
|
||||
return static_cast<PPCFunc*>(gCodeCache.Find(guest));
|
||||
}
|
||||
|
|
|
@ -13,4 +13,6 @@ struct CodeCache
|
|||
void* Find(uint32_t guest) const;
|
||||
};
|
||||
|
||||
extern CodeCache gCodeCache;
|
||||
PPCFunc* KeFindHostFunction(uint32_t guest);
|
||||
|
||||
extern CodeCache gCodeCache;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include <stdafx.h>
|
||||
#include <cpu/ppc_context.h>
|
||||
#include <cpu/guest_thread.h>
|
||||
#include <apu/audio.h>
|
||||
#include <apu/audio.h>
|
||||
#include "function.h"
|
||||
#include "xex.h"
|
||||
#include "xbox.h"
|
||||
#include "heap.h"
|
||||
#include "memory.h"
|
||||
// #include "audio.h"
|
||||
#include <memory>
|
||||
#include "xam.h"
|
||||
#include "xdm.h"
|
||||
|
@ -1507,26 +1508,26 @@ void XMACreateContext()
|
|||
printf("!!! STUB !!! XMACreateContext\n");
|
||||
}
|
||||
|
||||
uint32_t XAudioRegisterRenderDriverClient(XLPDWORD callback, XLPDWORD driver)
|
||||
{
|
||||
//printf("XAudioRegisterRenderDriverClient(): %x %x\n");
|
||||
|
||||
// *driver = apu::RegisterClient(callback[0], callback[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void XAudioUnregisterRenderDriverClient()
|
||||
{
|
||||
printf("!!! STUB !!! XAudioUnregisterRenderDriverClient\n");
|
||||
}
|
||||
|
||||
uint32_t XAudioSubmitRenderDriverFrame(uint32_t driver, void* samples)
|
||||
{
|
||||
// printf("!!! STUB !!! XAudioSubmitRenderDriverFrame\n");
|
||||
// apu::SubmitFrames(samples);
|
||||
|
||||
return 0;
|
||||
}
|
||||
//uint32_t XAudioRegisterRenderDriverClient(XLPDWORD callback, XLPDWORD driver)
|
||||
//{
|
||||
// //printf("XAudioRegisterRenderDriverClient(): %x %x\n");
|
||||
//
|
||||
// *driver = apu::RegisterClient(callback[0], callback[1]);
|
||||
// return 0;
|
||||
//}
|
||||
//
|
||||
//void XAudioUnregisterRenderDriverClient()
|
||||
//{
|
||||
// printf("!!! STUB !!! XAudioUnregisterRenderDriverClient\n");
|
||||
//}
|
||||
//
|
||||
//uint32_t XAudioSubmitRenderDriverFrame(uint32_t driver, void* samples)
|
||||
//{
|
||||
// // printf("!!! STUB !!! XAudioSubmitRenderDriverFrame\n");
|
||||
// apu::SubmitFrames(samples);
|
||||
//
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
GUEST_FUNCTION_HOOK(__imp__XGetVideoMode, VdQueryVideoMode); // XGetVideoMode
|
||||
GUEST_FUNCTION_HOOK(__imp__XNotifyGetNext, XNotifyGetNext);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue