Beispiel #1
0
        // Token: 0x0600015F RID: 351 RVA: 0x000047BC File Offset: 0x000029BC
        public unsafe static void OpusGetPacketMetrics(ReadOnlySpan <byte> opus, int samplingRate, out int channels, out int frames, out int samplesPerFrame, out int frameSize)
        {
            fixed(byte *pinnableReference = opus.GetPinnableReference())
            {
                byte *opusData = pinnableReference;

                frames          = Interop._OpusGetPacketFrameCount(opusData, opus.Length);
                samplesPerFrame = Interop._OpusGetPacketSamplePerFrameCount(opusData, samplingRate);
                channels        = Interop._OpusGetPacketChanelCount(opusData);
            }

            frameSize = frames * samplesPerFrame;
        }