concentus.oggfile
concentus.oggfile copied to clipboard
ShortsToBytes methods can be changed into smaller code
Just use:
short[] packets = opus.DecodeNextPacket();
byte[] buffer = new byte[packets.Length * 2];
Buffer.BlockCopy(packets, 0, buffer, 0, buffer.Length);
Yeah, technically true. My only worry is if the endianness of the machine would affect the results, since the resulting byte array must be little-endian after the copy (that is to say, the 8-bit array must be the same as a list of 16-bit little endian values)