Пример #1
0
    private void ProcessPendingEncode(float[] pcm)
    {
        int num;

        byte[] buffer             = USpeakAudioClipCompressor.CompressAudioData(pcm, 1, out num, this.lastBandMode, this.codecMgr.Codecs[this.lastCodec], LocalGain);
        USpeakFrameContainer item = new USpeakFrameContainer {
            Samples     = (ushort)num,
            encodedData = buffer
        };

        this.sendBuffer.Add(item);
    }
Пример #2
0
    void ProcessPendingEncode(float[] pcm)
    {
        // encode data and add it to the send buffer
        int s;

        byte[] b = USpeakAudioClipCompressor.CompressAudioData(pcm, 1, out s, bandWidthMode, LocalGain);

        USpeakFrameContainer cont = default(USpeakFrameContainer);

        cont.Samples     = (ushort)s;
        cont.encodedData = b;
        sendBuffer.Add(cont);
    }
Пример #3
0
    private void ProcessPendingEncode(float[] pcm)
    {
        int num;

        byte[] numArray = USpeakAudioClipCompressor.CompressAudioData(pcm, 1, out num, this.lastBandMode, this.codecMgr.Codecs[this.lastCodec], USpeaker.LocalGain);
        USpeakFrameContainer uSpeakFrameContainer = new USpeakFrameContainer()
        {
            Samples     = (ushort)num,
            encodedData = numArray
        };

        this.sendBuffer.Add(uSpeakFrameContainer);
    }