Misc audio fixes (#1348)
Changes: Implement software surround downmixing (fix #796). Fix a crash when no audio renderer were created when stopping emulation. NOTE: This PR also disable support of 5.1 surround on the OpenAL backend as we cannot detect if the hardware directly support it. (the downmixing applied by OpenAL on Windows is terribly slow)
This commit is contained in:
parent
a389dd59bd
commit
5b26e4ef94
11 changed files with 302 additions and 30 deletions
|
@ -12,6 +12,9 @@ namespace Ryujinx.Audio
|
|||
public ALFormat Format { get; private set; }
|
||||
public PlaybackState State { get; set; }
|
||||
|
||||
public int HardwareChannels { get; }
|
||||
public int VirtualChannels { get; }
|
||||
|
||||
private ReleaseCallback _callback;
|
||||
|
||||
private ConcurrentDictionary<long, int> _buffers;
|
||||
|
@ -21,13 +24,16 @@ namespace Ryujinx.Audio
|
|||
|
||||
private bool _disposed;
|
||||
|
||||
public OpenALAudioTrack(int sampleRate, ALFormat format, ReleaseCallback callback)
|
||||
public OpenALAudioTrack(int sampleRate, ALFormat format, int hardwareChannels, int virtualChannels, ReleaseCallback callback)
|
||||
{
|
||||
SampleRate = sampleRate;
|
||||
Format = format;
|
||||
State = PlaybackState.Stopped;
|
||||
SourceId = AL.GenSource();
|
||||
|
||||
HardwareChannels = hardwareChannels;
|
||||
VirtualChannels = virtualChannels;
|
||||
|
||||
_callback = callback;
|
||||
|
||||
_buffers = new ConcurrentDictionary<long, int>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue