Commit graph

64 commits

Author SHA1 Message Date
jduncanator
8275bc3c08 Implement libsoundio as an alternative audio backend (#406)
* Audio: Implement libsoundio as an alternative audio backend

libsoundio will be preferred over OpenAL if it is available on the machine. If neither are available, it will fallback to a dummy audio renderer that outputs no sound.

* Audio: Fix SoundIoRingBuffer documentation

* Audio: Unroll and optimize the audio write callback

Copying one sample at a time is slow, this unrolls the most common audio channel layouts and manually copies the bytes between source and destination. This is over 2x faster than calling CopyBlockUnaligned every sample.

* Audio: Optimize the write callback further

This dramatically reduces the audio buffer copy time. When the sample size is one of handled sample sizes the buffer copy operation is almost 10x faster than CopyBlockAligned.

This works by copying full samples at a time, rather than the individual bytes that make up the sample. This allows for 2x or 4x faster copy operations depending on sample size.

* Audio: Fix typo in Stereo write callback

* Audio: Fix Surround (5.1) audio write callback

* Audio: Update Documentation

* Audio: Use built-in Unsafe.SizeOf<T>()

Built-in `SizeOf<T>()` is 10x faster than our `TypeSize<T>` helper. This also helps reduce code surface area.

* Audio: Keep fixed buffer style consistent

* Audio: Address styling nits

* Audio: More style nits

* Audio: Add additional documentation

* Audio: Move libsoundio bindings internal

As per discussion, moving the libsoundio native bindings into Ryujinx.Audio

* Audio: Bump Target Framework back up to .NET Core 2.1

* Audio: Remove voice mixing optimizations.

Leaves Saturation optimizations in place.
2018-11-15 03:22:50 +01:00
ReinUsesLisp
b3a4662be1 Move logging to Ryujinx.Common and make it a static class (#413) 2018-10-17 14:15:50 -03:00
gdkchan
dd3cb33c9f
Fix race condition on OpenALAudioOut (#448) 2018-10-12 18:47:53 -03:00
gdkchan
bec95cacc1
Ensure that buffers are available after a signal when GetReleasedBuffers is called (#369) 2018-09-18 00:12:47 -03:00
gdkchan
521751795a
Code style fixes and nits on the HLE project (#355)
* Some style fixes and nits on ITimeZoneService

* Remove some unneeded usings

* Remove the Ryujinx.HLE.OsHle.Handles namespace

* Remove hbmenu automatic load on process exit

* Rename Ns to Device, rename Os to System, rename SystemState to State

* Move Exceptions and Utilities out of OsHle

* Rename OsHle to HOS

* Rename OsHle folder to HOS

* IManagerDisplayService and ISystemDisplayService style fixes

* BsdError shouldn't be public

* Add a empty new line before using static

* Remove unused file

* Some style fixes on NPDM

* Exit gracefully when the application is closed

* Code style fixes on IGeneralService

* Add 0x prefix on values printed as hex

* Small improvements on finalization code

* Move ProcessId and ThreadId out of AThreadState

* Rename VFs to FileSystem

* FsAccessHeader shouldn't be public. Also fix file names casing

* More case changes on NPDM

* Remove unused files

* Move using to the correct place on NPDM

* Use properties on KernelAccessControlMmio

* Address PR feedback
2018-08-16 20:47:36 -03:00
ReinUsesLisp
b92189cb71 Sleep OpenAL thread (#313) 2018-08-01 00:48:49 -03:00
gdkchan
98c6ceede5
Audio Renderer improvements (#210)
* Partial voice implementation on audio renderer

* Implemented audren resampler (based on original impl)

* Fix BiquadFilter struct

* Pause audio playback on last stream buffer

* Split audren/audout files into separate folders, some minor cleanup

* Use AudioRendererParameter on GetWorkBufferSize aswell

* Bump audren version to REV4, name a few things, increase sample buffer size

* Remove useless new lines
2018-07-14 23:57:41 -03:00
gdkchan
791fe70810
Allow sample rate of 0 on OpenAudioOut, fix 5.1 sound output (#240) 2018-07-09 22:49:07 -03:00
Thomas Guillemard
2f25b34941 Add linux-x64 to RID property to make tests works on linux (#205) 2018-06-30 12:43:04 -03:00
ReinUsesLisp
a4020bb398 Port from OpenTK.NETCore to OpenTK.NetStandard (#176)
* Minor code changes

* Forgot to remove a method
2018-06-21 18:10:19 -03:00
gdkchan
f9f111bc85
Add intrinsics support (#121)
* Initial intrinsics support

* Update tests to work with the new Vector128 type and intrinsics

* Drop SSE4.1 requirement

* Fix copy-paste mistake
2018-05-11 20:10:27 -03:00
gdkchan
4314a8f3e5
[WIP] Add support for events (#60)
* Add support for events, move concept of domains to IpcService

* Support waiting for KThread, remove some test code, other tweaks

* Use move handle on NIFM since I can't test that now, it's better to leave it how it was
2018-03-19 15:58:46 -03:00
gdkchan
4940cf0ea5 Add BFI instruction, even more audout fixes 2018-03-16 00:42:44 -03:00
gdkchan
79a5939734
Improvements to audout (#58)
* Some audout refactoring and improvements

* More audio improvements

* Change ReadAsciiString to use long for the Size, avoids some casting
2018-03-15 21:06:24 -03:00