Fix opus MS channel count. Explicitly disable native lib probe in OpusCodecFactory.
This commit is contained in:
parent
ccd47239ba
commit
fb0f3f83c4
1 changed files with 3 additions and 2 deletions
|
@ -48,6 +48,7 @@ namespace Ryujinx.Horizon.Sdk.Codec.Detail
|
||||||
|
|
||||||
public Decoder(int sampleRate, int channelsCount)
|
public Decoder(int sampleRate, int channelsCount)
|
||||||
{
|
{
|
||||||
|
OpusCodecFactory.AttemptToUseNativeLibrary = false;
|
||||||
_decoder = OpusCodecFactory.CreateDecoder(sampleRate, channelsCount);
|
_decoder = OpusCodecFactory.CreateDecoder(sampleRate, channelsCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,11 +82,11 @@ namespace Ryujinx.Horizon.Sdk.Codec.Detail
|
||||||
private readonly IOpusMultiStreamDecoder _decoder;
|
private readonly IOpusMultiStreamDecoder _decoder;
|
||||||
|
|
||||||
public int SampleRate => _decoder.SampleRate;
|
public int SampleRate => _decoder.SampleRate;
|
||||||
public int ChannelsCount { get; }
|
public int ChannelsCount => _decoder.NumChannels;
|
||||||
|
|
||||||
public MultiSampleDecoder(int sampleRate, int channelsCount, int streams, int coupledStreams, byte[] mapping)
|
public MultiSampleDecoder(int sampleRate, int channelsCount, int streams, int coupledStreams, byte[] mapping)
|
||||||
{
|
{
|
||||||
ChannelsCount = channelsCount;
|
OpusCodecFactory.AttemptToUseNativeLibrary = false;
|
||||||
_decoder = OpusCodecFactory.CreateMultiStreamDecoder(sampleRate, channelsCount, streams, coupledStreams, mapping);
|
_decoder = OpusCodecFactory.CreateMultiStreamDecoder(sampleRate, channelsCount, streams, coupledStreams, mapping);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue