public void GotAudioRtp(IPEndPoint remoteEndPoint, uint ssrc, uint seqnum, uint timestamp, int payloadID, bool marker, byte[] payload)
 {
     if (_waveProvider != null && _audioEncoder != null && _audioEncoder.IsSupported(_selectedSinkFormat))
     {
         var pcmSample = _audioEncoder.DecodeAudio(payload, _selectedSinkFormat, AudioPlaybackRate);
         _waveProvider?.AddSamples(pcmSample, 0, pcmSample.Length);
     }
 }
        public void GotAudioRtp(IPEndPoint remoteEndPoint, uint ssrc, uint seqnum, uint timestamp, int payloadID, bool marker, byte[] payload)
        {
            if (_audioEncoder != null && _audioEncoder.IsSupported(_selectedSinkFormat))
            {
                var pcmSample = _audioEncoder.DecodeAudio(payload, _selectedSinkFormat, AudioPlaybackRate);

                lock (_pendingRemoteSamples)
                {
                    _pendingRemoteSamples.AddRange(pcmSample);
                }

                _remoteSampleReady.Set();
            }
        }