mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-24 15:37:10 +02:00
Basic audio support
Implement IAudioOut. Small corrections on AudIAudioRenderer. Add glitched audio playback support through OpenAL.
This commit is contained in:
parent
64d34f2882
commit
9f2aea4059
5 changed files with 211 additions and 7 deletions
|
@ -1,15 +1,20 @@
|
|||
using Ryujinx.OsHle.Handles;
|
||||
using Ryujinx.OsHle.Ipc;
|
||||
|
||||
namespace Ryujinx.OsHle.Objects
|
||||
{
|
||||
class AudIAudioRenderer
|
||||
{
|
||||
public static long RequestUpdateAudioRenderer(ServiceCtx Context)
|
||||
{
|
||||
//buffer < unknown, 5, 0 >) -> (buffer < unknown, 6, 0 >, buffer < unknown, 6, 0 >
|
||||
|
||||
long Position = Context.Request.ReceiveBuff[0].Position;
|
||||
|
||||
//0x40 bytes header
|
||||
Context.Memory.WriteInt32(Position + 0x4, 0xb0); //Behavior Out State Size? (note: this is the last section)
|
||||
Context.Memory.WriteInt32(Position + 0x8, 0x18e0); //Memory Pool Out State Size?
|
||||
Context.Memory.WriteInt32(Position + 0xc, 0x600); //Voice Out State Size?
|
||||
Context.Memory.WriteInt32(Position + 0x4, 0xb0); //Behavior Out State Size? (note: this is the last section)
|
||||
Context.Memory.WriteInt32(Position + 0x8, 0x18e0); //Memory Pool Out State Size?
|
||||
Context.Memory.WriteInt32(Position + 0xc, 0x600); //Voice Out State Size?
|
||||
Context.Memory.WriteInt32(Position + 0x14, 0xe0); //Effect Out State Size?
|
||||
Context.Memory.WriteInt32(Position + 0x1c, 0x20); //Sink Out State Size?
|
||||
Context.Memory.WriteInt32(Position + 0x20, 0x10); //Performance Out State Size?
|
||||
|
@ -28,8 +33,17 @@ namespace Ryujinx.OsHle.Objects
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static long StopAudioRenderer(ServiceCtx Context)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static long QuerySystemEvent(ServiceCtx Context)
|
||||
{
|
||||
int Handle = Context.Ns.Os.Handles.GenerateId(new HEvent());
|
||||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue