9142aca48f
* Fix hwopus DecodeInterleaved implementation Also implement new variants of this api. This should fix #763 * Sample rate shouldn't be hardcoded This fix issues while opening Pokémon Let's Go pause menu. * Apply Ac_K's suggestion about EndianSwap * Address gdkchan's comment * Address Ac_k's comment
24 lines
668 B
C#
24 lines
668 B
C#
using Ryujinx.Common;
|
|
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Audio.Types
|
|
{
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
struct OpusPacketHeader
|
|
{
|
|
public uint length;
|
|
public uint finalRange;
|
|
|
|
public static OpusPacketHeader FromStream(BinaryReader reader)
|
|
{
|
|
OpusPacketHeader header = reader.ReadStruct<OpusPacketHeader>();
|
|
|
|
header.length = EndianSwap.FromBigEndianToPlatformEndian(header.length);
|
|
header.finalRange = EndianSwap.FromBigEndianToPlatformEndian(header.finalRange);
|
|
|
|
return header;
|
|
}
|
|
}
|
|
}
|