aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Audio/AudioIn/AudioIn.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-02-22 16:58:33 -0300
committerGitHub <noreply@github.com>2024-02-22 16:58:33 -0300
commitd4d0a48bfe89d6e8e12ce16829bb2c440b56007c (patch)
tree2376566ed2c06181b3dbc547b1f99f5b533d918b /src/Ryujinx.HLE/HOS/Services/Audio/AudioIn/AudioIn.cs
parent57d8afd0c99bb43d1ba1e3cc630d257c5da92741 (diff)
Migrate Audio service to new IPC (#6285)
* Migrate audren to new IPC * Migrate audout * Migrate audin * Migrate hwopus * Bye bye old audio service * Switch volume control to IHardwareDeviceDriver * Somewhat unrelated changes * Remove Concentus reference from HLE * Implement OpenAudioRendererForManualExecution * Remove SetVolume/GetVolume methods that are not necessary * Remove SetVolume/GetVolume methods that are not necessary (2) * Fix incorrect volume update * PR feedback * PR feedback * Stub audrec * Init outParameter * Make FinalOutputRecorderParameter/Internal readonly * Make FinalOutputRecorder IDisposable * Fix HardwareOpusDecoderManager parameter buffers * Opus work buffer size and error handling improvements * Add AudioInProtocolName enum * Fix potential divisions by zero
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Audio/AudioIn/AudioIn.cs')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Audio/AudioIn/AudioIn.cs108
1 files changed, 0 insertions, 108 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Audio/AudioIn/AudioIn.cs b/src/Ryujinx.HLE/HOS/Services/Audio/AudioIn/AudioIn.cs
deleted file mode 100644
index acf83f48..00000000
--- a/src/Ryujinx.HLE/HOS/Services/Audio/AudioIn/AudioIn.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using Ryujinx.Audio.Common;
-using Ryujinx.Audio.Input;
-using Ryujinx.Audio.Integration;
-using Ryujinx.HLE.HOS.Kernel;
-using Ryujinx.HLE.HOS.Kernel.Threading;
-using Ryujinx.HLE.HOS.Services.Audio.AudioRenderer;
-using System;
-
-namespace Ryujinx.HLE.HOS.Services.Audio.AudioIn
-{
- class AudioIn : IAudioIn
- {
- private readonly AudioInputSystem _system;
- private readonly uint _processHandle;
- private readonly KernelContext _kernelContext;
-
- public AudioIn(AudioInputSystem system, KernelContext kernelContext, uint processHandle)
- {
- _system = system;
- _kernelContext = kernelContext;
- _processHandle = processHandle;
- }
-
- public ResultCode AppendBuffer(ulong bufferTag, ref AudioUserBuffer buffer)
- {
- return (ResultCode)_system.AppendBuffer(bufferTag, ref buffer);
- }
-
- public ResultCode AppendUacBuffer(ulong bufferTag, ref AudioUserBuffer buffer, uint handle)
- {
- return (ResultCode)_system.AppendUacBuffer(bufferTag, ref buffer, handle);
- }
-
- public bool ContainsBuffer(ulong bufferTag)
- {
- return _system.ContainsBuffer(bufferTag);
- }
-
- public void Dispose()
- {
- Dispose(true);
- }
-
- protected virtual void Dispose(bool disposing)
- {
- if (disposing)
- {
- _system.Dispose();
-
- _kernelContext.Syscall.CloseHandle((int)_processHandle);
- }
- }
-
- public bool FlushBuffers()
- {
- return _system.FlushBuffers();
- }
-
- public uint GetBufferCount()
- {
- return _system.GetBufferCount();
- }
-
- public ResultCode GetReleasedBuffers(Span<ulong> releasedBuffers, out uint releasedCount)
- {
- return (ResultCode)_system.GetReleasedBuffers(releasedBuffers, out releasedCount);
- }
-
- public AudioDeviceState GetState()
- {
- return _system.GetState();
- }
-
- public float GetVolume()
- {
- return _system.GetVolume();
- }
-
- public KEvent RegisterBufferEvent()
- {
- IWritableEvent outEvent = _system.RegisterBufferEvent();
-
- if (outEvent is AudioKernelEvent kernelEvent)
- {
- return kernelEvent.Event;
- }
- else
- {
- throw new NotImplementedException();
- }
- }
-
- public void SetVolume(float volume)
- {
- _system.SetVolume(volume);
- }
-
- public ResultCode Start()
- {
- return (ResultCode)_system.Start();
- }
-
- public ResultCode Stop()
- {
- return (ResultCode)_system.Stop();
- }
- }
-}